Take a stab at namespace protection. For now, only the obvious problems are

addressed, the culprit being the lack of a namespace definition for an IPv6-
extended <netinet/in.h> in XNS5.2 D2.0; I'll try to work something out and
submit it to the review WG.
This commit is contained in:
kleink 1999-07-03 14:04:57 +00:00
parent 4531426e5f
commit dd24133620
1 changed files with 18 additions and 10 deletions

View File

@ -65,7 +65,9 @@
#ifndef _NETINET6_IN6_H_
#define _NETINET6_IN6_H_
#if !defined(_XOPEN_SOURCE)
#include <sys/queue.h>
#endif
/*
* Identification of the network protocol stack
@ -110,25 +112,27 @@
/*
* IPv6 address
*/
struct in6_addr {
struct in6_addr {
union {
u_int32_t u6_addr32[4];
u_int16_t u6_addr16[8];
u_int8_t u6_addr8[16];
} u6_addr; /* 128 bit IP6 address */
u_int32_t __u6_addr32[4];
u_int16_t __u6_addr16[8];
u_int8_t __u6_addr8[16];
} __u6_addr; /* 128-bit IP6 address */
};
#define s6_addr32 u6_addr.u6_addr32
#define s6_addr16 u6_addr.u6_addr16
#define s6_addr8 u6_addr.u6_addr8
#define s6_addr u6_addr.u6_addr8
#define s6_addr32 __u6_addr.__u6_addr32
#define s6_addr16 __u6_addr.__u6_addr16
#define s6_addr8 __u6_addr.__u6_addr8
#define s6_addr __u6_addr.__u6_addr8
#define INET6_ADDRSTRLEN 46
/*
* Socket address for IPv6
*/
#if !defined(_XOPEN_SOURCE)
#define SIN6_LEN
#endif
struct sockaddr_in6 {
u_char sin6_len; /* length of this struct(sa_family_t)*/
u_char sin6_family; /* AF_INET6 (sa_family_t) */
@ -301,10 +305,12 @@ extern const struct in6_addr in6addr_linklocal_allrouters;
/*
* IP6 route structure
*/
struct route_in6 {
#if !defined(_XOPEN_SOURCE)
struct route_in6 {
struct rtentry *ro_rt;
struct sockaddr_in6 ro_dst;
};
#endif
/*
* Options for use with [gs]etsockopt at the IPV6 level.
@ -374,6 +380,7 @@ struct in6_pktinfo {
#define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
#define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
#if !defined(_XOPEN_SOURCE)
/*
* Definitions for inet6 sysctl operations.
*
@ -504,6 +511,7 @@ struct in6_pktinfo {
&ip6_gif_hlim, \
0, \
}
#endif /* !_XOPEN_SOURCE */
#ifdef _KERNEL
struct cmsghdr;