|
Description
|
xxxxx@xxxxx.com 2008-July-09
The changes for:
6701744 kernel au_to_in_addr_ex() bug in handling v4-mapped addresses
putback to snv_91 incorrectly treat in_addr_t and 'struct in_addr' as the
same. Luckily, the changes only reference the size of these two which
turns out to be the same. Still, the netinet/in.h header file states:
/*
* Note: IPv4 address data structures usage conventions.
* The "in_addr_t" type below (required by Unix standards)
* is NOT a typedef of "struct in_addr" and violates the usual
* conventions where "struct <name>" and <name>_t are corresponding
* typedefs.
* To minimize confusion, kernel data structures/usage prefers use
* of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
* The user level APIs continue to follow the historic popular
* practice of using "struct in_addr".
*/
Ideally the routine would reference ip_addr_t in place of both in_addr_t
and 'struct in_addr'. While macros aren't strictly typed, the prototype
documented for IN6_V4MAPPED_TO_IPADDR in netinet/in.h takes an ip_addr_t as
the second argument as well:
* void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
Thanks to William Roche for pointing this out.
.
|