[fpc-pascal] TUN/TAP

Jorge Aldo G. de F. Junior jagfj80 at gmail.com
Wed Oct 7 09:42:24 CEST 2009


thats h2pas result of compilling this structure into pascal. But thanks for
the tip.

2009/10/7 Jürgen Hestermann <juergen.hestermann at gmx.de>

>
>
> > Jorge Aldo G. de F. Junior schrieb:
>
>> type ifreq = record
>>          ifr_ifrn : record
>>              case longint of
>>                 0 : ( ifrn_name : array[0..15] of char );
>>              end;
>>          ifr_ifru : record
>>              case longint of
>>                 0 : ( ifru_addr : sockaddr );
>>                 1 : ( ifru_dstaddr : sockaddr );
>>                 2 : ( ifru_broadaddr : sockaddr );
>>                 3 : ( ifru_netmask : sockaddr );
>>                 4 : ( ifru_hwaddr : sockaddr );
>>                 5 : ( ifru_flags : smallint );
>>                 6 : ( ifru_ivalue : longint );
>>                 7 : ( ifru_mtu : longint );
>>                 8 : ( ifru_map : ifmap );
>>                 9 : ( ifru_slave : array[0..15] of char );
>>                 10 : ( ifru_newname : array[0..15] of char );
>>                 11 : ( ifru_data : __caddr_t );
>>              end;
>>       end;
>>
>>
> What is the reason of the first case statement in the record? There is only
> one variant so you can omit it.
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20091007/7ba17754/attachment.html>


More information about the fpc-pascal mailing list