X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fnet%2Fipv6.h;h=9573c8d1915370d04df50ead4345cd128eaf1f73;hb=e773e4faa19c54c2f32ddd16add2919588488bd9;hp=9059e0ed7fe375e70d12740a1703526d89aba944;hpb=6f4fc423b96c8fdf6f5c8b8ad79b75b7fb5a5c59;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 9059e0e..9573c8d 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -377,6 +377,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a) a->s6_addr32[2] | a->s6_addr32[3] ) == 0); } +static inline int ipv6_addr_v4mapped(const struct in6_addr *a) +{ + return ((a->s6_addr32[0] | a->s6_addr32[1]) == 0 && + a->s6_addr32[2] == htonl(0x0000ffff)); +} + /* * find the first different bit between two addresses * length of address must be a multiple of 32bits