Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Take a stab at namespace protection. For now, ...
details: https://anonhg.NetBSD.org/src/rev/eb803698c9f1
branches: trunk
changeset: 474320:eb803698c9f1
user: kleink <kleink%NetBSD.org@localhost>
date: Sat Jul 03 14:04:57 1999 +0000
description:
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.
diffstat:
sys/netinet6/in6.h | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diffs (80 lines):
diff -r af762be23124 -r eb803698c9f1 sys/netinet6/in6.h
--- a/sys/netinet6/in6.h Sat Jul 03 13:58:31 1999 +0000
+++ b/sys/netinet6/in6.h Sat Jul 03 14:04:57 1999 +0000
@@ -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 @@
/*
* 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 @@
#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 @@
&ip6_gif_hlim, \
0, \
}
+#endif /* !_XOPEN_SOURCE */
#ifdef _KERNEL
struct cmsghdr;
Home |
Main Index |
Thread Index |
Old Index