diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-02-26 18:45:19 +0100 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-03 18:22:48 +0100 |
commit | 9fa4711e364e9aa779d6b8d12220bbb63dbb1f3d (patch) | |
tree | ebc79b31b75241d0cf16de5c60d194cfcda00628 /include/netinet | |
parent | a82ba03b6ff449bdfdae4ad360c2ab59bda09ef4 (diff) |
guard IPv6 stuff
disable IPv6 related stuff if feature is disabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Diffstat (limited to 'include/netinet')
-rw-r--r-- | include/netinet/in.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/netinet/in.h b/include/netinet/in.h index 6327001ee..235194bbe 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -194,6 +194,7 @@ struct in_addr #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */ +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* IPv6 address */ struct in6_addr { @@ -218,8 +219,10 @@ libc_hidden_proto(in6addr_loopback) #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } -#define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 +#endif + +#define INET_ADDRSTRLEN 16 #if 1 /*def __UCLIBC_HAS_IPV4__*/ @@ -238,6 +241,7 @@ struct sockaddr_in }; #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* Ditto, for IPv6. */ struct sockaddr_in6 { @@ -247,6 +251,7 @@ struct sockaddr_in6 struct in6_addr sin6_addr; /* IPv6 address */ uint32_t sin6_scope_id; /* IPv6 scope-id */ }; +#endif #if defined __USE_MISC || defined __USE_GNU @@ -274,6 +279,7 @@ struct ip_mreq_source #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ /* Likewise, for IPv6. */ struct ipv6_mreq { @@ -283,6 +289,7 @@ struct ipv6_mreq /* local interface */ unsigned int ipv6mr_interface; }; +#endif #if defined __USE_MISC || defined __USE_GNU @@ -403,6 +410,7 @@ libc_hidden_proto(htons) # endif #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define IN6_IS_ADDR_UNSPECIFIED(a) \ (((__const uint32_t *) (a))[0] == 0 \ && ((__const uint32_t *) (a))[1] == 0 \ @@ -441,6 +449,7 @@ libc_hidden_proto(htons) && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \ && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \ && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) +#endif #if defined __USE_MISC || defined __USE_GNU /* Bind socket to a privileged IP port. */ @@ -455,6 +464,7 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) #endif +#if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define IN6_IS_ADDR_MC_NODELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) @@ -476,13 +486,14 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) -#if defined __USE_GNU && defined __UCLIBC_HAS_IPV6__ +#ifdef __USE_GNU /* IPv6 packet information. */ struct in6_pktinfo { struct in6_addr ipi6_addr; /* src/dst IPv6 address */ unsigned int ipi6_ifindex; /* send/recv interface index */ }; +#endif /* IPv6 MTU information. */ struct ip6_mtuinfo @@ -493,6 +504,7 @@ struct ip6_mtuinfo #endif #if 0 /*def __USE_GNU*/ +#ifdef __UCLIBC_HAS_IPV6__ /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __THROW __attribute_deprecated__; @@ -540,6 +552,7 @@ extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW; extern int inet6_rth_segments (__const void *__bp) __THROW; extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) __THROW; +#endif /* Multicast source filter support. */ |