Raw sockets problem?
Bruce M Simpson
bms at spc.org
Sun Jan 9 21:25:25 PST 2005
On Sat, Jan 08, 2005 at 11:34:57PM +0100, Ivan Voras wrote:
> I use it in this code:
>
> /* get interface name by index */
...
Please consider using if_nameindex() or if_nametoindex(), which will retrieve
the getifaddrs() list for you and considerably simplify the code fragment
you've provided.
These are specified by RFC 2553 and are used in many places within the XORP
open source router.
Regards,
BMS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 167 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050110/382e3b02/attachment.bin
More information about the freebsd-hackers
mailing list