summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_var.h
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-10-26 15:05:42 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-10-26 15:05:42 +0000
commit4ddb3c290aad6182191ad24babc5bc01f57b75a3 (patch)
treec2b333f62f885aab4b645c20786438a256000859 /sys/netinet6/in6_var.h
parent7d8adc66b5e5226092377e2b475f9ef528ff9464 (diff)
Kill deprecated IPv6 ioctl(2)s.
ok florian@, sthen@, jsg@
Diffstat (limited to 'sys/netinet6/in6_var.h')
-rw-r--r--sys/netinet6/in6_var.h35
1 files changed, 11 insertions, 24 deletions
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 2432502ca31..0bb9a50566b 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_var.h,v 1.70 2017/10/24 09:36:13 jsg Exp $ */
+/* $OpenBSD: in6_var.h,v 1.71 2017/10/26 15:05:41 mpi Exp $ */
/* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */
/*
@@ -278,40 +278,21 @@ struct in6_aliasreq {
#define IFA_IN6(x) (&((struct sockaddr_in6 *)((x)->ifa_addr))->sin6_addr)
#define IFA_DSTIN6(x) (&((struct sockaddr_in6 *)((x)->ifa_dstaddr))->sin6_addr)
-#ifdef _KERNEL
-#define IN6_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \
- (((d)->s6_addr32[0] ^ (a)->s6_addr32[0]) & (m)->s6_addr32[0]) == 0 && \
- (((d)->s6_addr32[1] ^ (a)->s6_addr32[1]) & (m)->s6_addr32[1]) == 0 && \
- (((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \
- (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 )
-#endif /* _KERNEL */
-
-#define SIOCGIFADDR_IN6 _IOWR('i', 33, struct in6_ifreq)
+#define SIOCDIFADDR_IN6 _IOW('i', 25, struct in6_ifreq)
+#define SIOCAIFADDR_IN6 _IOW('i', 26, struct in6_aliasreq)
#define SIOCGIFDSTADDR_IN6 _IOWR('i', 34, struct in6_ifreq)
#define SIOCGIFNETMASK_IN6 _IOWR('i', 37, struct in6_ifreq)
-#define SIOCDIFADDR_IN6 _IOW('i', 25, struct in6_ifreq)
-#define SIOCAIFADDR_IN6 _IOW('i', 26, struct in6_aliasreq)
-
#define SIOCGIFAFLAG_IN6 _IOWR('i', 73, struct in6_ifreq)
#define SIOCGIFINFO_IN6 _IOWR('i', 108, struct in6_ndireq)
-#define SIOCSNDFLUSH_IN6 _IOWR('i', 77, struct in6_ifreq)
#define SIOCGNBRINFO_IN6 _IOWR('i', 78, struct in6_nbrinfo)
-#define SIOCSPFXFLUSH_IN6 _IOWR('i', 79, struct in6_ifreq)
-#define SIOCSRTRFLUSH_IN6 _IOWR('i', 80, struct in6_ifreq)
#define SIOCGIFALIFETIME_IN6 _IOWR('i', 81, struct in6_ifreq)
-#define SIOCGIFSTAT_IN6 _IOWR('i', 83, struct in6_ifreq)
-#define SIOCGIFSTAT_ICMP6 _IOWR('i', 84, struct in6_ifreq)
-#define SIOCSIFINFO_FLAGS _IOWR('i', 87, struct in6_ndireq) /* XXX */
-
-#define SIOCGETSGCNT_IN6 _IOWR('u', 106, \
- struct sioc_sg_req6) /* get s,g pkt cnt */
-#define SIOCGETMIFCNT_IN6 _IOWR('u', 107, \
- struct sioc_mif_req6) /* get pkt cnt per if */
+#define SIOCGETSGCNT_IN6 _IOWR('u', 106, struct sioc_sg_req6)
+#define SIOCGETMIFCNT_IN6 _IOWR('u', 107, struct sioc_mif_req6)
#define IN6_IFF_ANYCAST 0x01 /* anycast address */
#define IN6_IFF_TENTATIVE 0x02 /* tentative address */
@@ -322,6 +303,12 @@ struct in6_aliasreq {
#define IN6_IFF_PRIVACY 0x80 /* RFC 4941 temporary address */
#ifdef _KERNEL
+#define IN6_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \
+ (((d)->s6_addr32[0] ^ (a)->s6_addr32[0]) & (m)->s6_addr32[0]) == 0 && \
+ (((d)->s6_addr32[1] ^ (a)->s6_addr32[1]) & (m)->s6_addr32[1]) == 0 && \
+ (((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \
+ (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 )
+
#define IN6_ARE_SCOPE_CMP(a,b) ((a)-(b))
#define IN6_ARE_SCOPE_EQUAL(a,b) ((a)==(b))