summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-06-11 02:54:03 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-06-11 02:54:03 +0000
commit7f93664b229028f63dd25d327e7dca5392f41ed1 (patch)
tree6a1660b85d181dcf04c344ff15ce09332ffbbf3a /sys/netinet
parent7ea94b99c24b51b034e1a8f6c7f29fa713eb9c17 (diff)
- sync up MLD declaration with RFC3542 (s/MLD6/MLD/)
- routing header declaration with RFC3542 (note: sizeof(ip6_rthdr0) has changed!) also, sync up with RFC2460 routing header definition (no "strict" source routing mode any more) part of advanced API update (RFC2292 -> 3542). markus, todd, millert, henning ok
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/icmp6.h63
1 files changed, 45 insertions, 18 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h
index 0785ca5aa63..abfc4c732ef 100644
--- a/sys/netinet/icmp6.h
+++ b/sys/netinet/icmp6.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: icmp6.h,v 1.26 2003/06/02 23:28:13 millert Exp $ */
-/* $KAME: icmp6.h,v 1.71 2002/05/27 04:18:29 itojun Exp $ */
+/* $OpenBSD: icmp6.h,v 1.27 2003/06/11 02:54:02 itojun Exp $ */
+/* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,12 +94,21 @@ struct icmp6_hdr {
#define ICMP6_ECHO_REQUEST 128 /* echo service */
#define ICMP6_ECHO_REPLY 129 /* echo reply */
+#define MLD_LISTENER_QUERY 130 /* multicast listener query */
+#define MLD_LISTENER_REPORT 131 /* multicast listener report */
+#define MLD_LISTENER_DONE 132 /* multicast listener done */
+
+/* RFC2292 decls */
#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
-#define MLD6_LISTENER_QUERY 130 /* multicast listener query */
#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
-#define MLD6_LISTENER_REPORT 131 /* multicast listener report */
#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
-#define MLD6_LISTENER_DONE 132 /* multicast listener done */
+
+#ifndef _KERNEL
+/* the followings are for backward compatibility to old KAME apps. */
+#define MLD6_LISTENER_QUERY MLD_LISTENER_QUERY
+#define MLD6_LISTENER_REPORT MLD_LISTENER_REPORT
+#define MLD6_LISTENER_DONE MLD_LISTENER_DONE
+#endif
#define ND_ROUTER_SOLICIT 133 /* router solicitation */
#define ND_ROUTER_ADVERT 134 /* router advertisment */
@@ -117,8 +126,14 @@ struct icmp6_hdr {
#define ICMP6_NI_REPLY 140 /* node information reply */
/* The definitions below are experimental. TBA */
-#define MLD6_MTRACE_RESP 200 /* mtrace response(to sender) */
-#define MLD6_MTRACE 201 /* mtrace messages */
+#define MLD_MTRACE_RESP 200 /* mtrace response(to sender) */
+#define MLD_MTRACE 201 /* mtrace messages */
+
+#ifndef _KERNEL
+/* the followings are for backward compatibility to old KAME apps. */
+#define MLD6_MTRACE_RESP MLD_MTRACE_RESP
+#define MLD6_MTRACE MLD_MTRACE
+#endif
#define ICMP6_MAXTYPE 201
@@ -157,16 +172,28 @@ struct icmp6_hdr {
/*
* Multicast Listener Discovery
*/
-struct mld6_hdr {
- struct icmp6_hdr mld6_hdr;
- struct in6_addr mld6_addr; /* multicast address */
+struct mld_hdr {
+ struct icmp6_hdr mld_icmp6_hdr;
+ struct in6_addr mld_addr; /* multicast address */
} __attribute__((__packed__));
-#define mld6_type mld6_hdr.icmp6_type
-#define mld6_code mld6_hdr.icmp6_code
-#define mld6_cksum mld6_hdr.icmp6_cksum
-#define mld6_maxdelay mld6_hdr.icmp6_data16[0]
-#define mld6_reserved mld6_hdr.icmp6_data16[1]
+/* definitions to provide backward compatibility to old KAME applications */
+#ifndef _KERNEL
+#define mld6_hdr mld_hdr
+#define mld6_type mld_type
+#define mld6_code mld_code
+#define mld6_cksum mld_cksum
+#define mld6_maxdelay mld_maxdelay
+#define mld6_reserved mld_reserved
+#define mld6_addr mld_addr
+#endif
+
+/* shortcut macro definitions */
+#define mld_type mld_icmp6_hdr.icmp6_type
+#define mld_code mld_icmp6_hdr.icmp6_code
+#define mld_cksum mld_icmp6_hdr.icmp6_cksum
+#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
+#define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
/*
* Neighbor Discovery
@@ -648,13 +675,13 @@ do { \
case ICMP6_ECHO_REPLY: \
icmp6_ifstat_inc(ifp, ifs6_out_echoreply); \
break; \
- case MLD6_LISTENER_QUERY: \
+ case MLD_LISTENER_QUERY: \
icmp6_ifstat_inc(ifp, ifs6_out_mldquery); \
break; \
- case MLD6_LISTENER_REPORT: \
+ case MLD_LISTENER_REPORT: \
icmp6_ifstat_inc(ifp, ifs6_out_mldreport); \
break; \
- case MLD6_LISTENER_DONE: \
+ case MLD_LISTENER_DONE: \
icmp6_ifstat_inc(ifp, ifs6_out_mlddone); \
break; \
case ND_ROUTER_SOLICIT: \