Computing.Net > Forums > Unix > AF_INET6 in Linux and FreeBSD

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

AF_INET6 in Linux and FreeBSD

Reply to Message Icon

Name: Godgory
Date: June 2, 2007 at 06:56:38 Pacific
OS: linux 2.6 / FreeBSD 5
CPU/Ram: AMD Athlon Barton 2600+/5
Comment:

Hi,

Simple question:
why is AF_INET6 defined differently in Linux and in FreeBSD (socket.h) with values of 10 and 28 respectively? How do these 2 OS'es interoperate via ipv6?

Thanks.
Alex.



Sponsored Link
Ads by Google

Response Number 1
Name: fpmurphy
Date: June 3, 2007 at 09:50:31 Pacific
Reply:

AF-* simply defines the protocol address family.

See RFC 2553:

3.1 IPv6 Address Family and Protocol Family

A new address family name, AF_INET6, is defined in <sys/socket.h>. The AF_INET6 definition distinguishes between the original
sockaddr_in address data structure, and the new sockaddr_in6 data structure.

So long as your code uses the AF_INET6 define rather than a hard coded value and you recompile for each platform, it makes no difference what the value is.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: AF_INET6 in Linux and FreeBSD

CUPS printer from Linux to BSD www.computing.net/answers/unix/cups-printer-from-linux-to-bsd/6594.html

Want to compile/run comer's tcp/ip www.computing.net/answers/unix/want-to-compilerun-comers-tcpip/6905.html

Gentoo Linux to FreeBSD www.computing.net/answers/unix/gentoo-linux-to-freebsd/6648.html