summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_var.h
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2002-06-08 21:22:02 +0000
committeritojun <itojun@openbsd.org>2002-06-08 21:22:02 +0000
commitd8a7e3a701bd700a8a8835b69db2e106f957907c (patch)
tree6257fbf0d620979209b57e383f146582085a81e4 /sys/netinet6/in6_var.h
parentcomment out paragraph that does not fit to openbsd-current (diff)
downloadwireguard-openbsd-d8a7e3a701bd700a8a8835b69db2e106f957907c.tar.xz
wireguard-openbsd-d8a7e3a701bd700a8a8835b69db2e106f957907c.zip
sync with latest KAME in6_ifaddr/prefix/default router manipulation.
behavior changes: - two iocts used by ndp(8) are now obsolete (backward compat provided). use sysctl path instead. - lo0 does not get ::1 automatically. it will get ::1 when lo0 comes up.
Diffstat (limited to 'sys/netinet6/in6_var.h')
-rw-r--r--sys/netinet6/in6_var.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 71aa8830f4c..b25ee7a5826 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_var.h,v 1.19 2002/06/08 00:06:58 itojun Exp $ */
+/* $OpenBSD: in6_var.h,v 1.20 2002/06/08 21:22:02 itojun Exp $ */
/* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */
/*
@@ -80,7 +80,7 @@
* hour rule for hosts). they should never be modified by nd6_timeout or
* anywhere else.
* userland -> kernel: accept pltime/vltime
- * kernel -> userland: throuw up everything
+ * kernel -> userland: throw up everything
* in kernel: modify preferred/expire only
*/
struct in6_addrlifetime {
@@ -111,8 +111,17 @@ struct in6_ifaddr {
/* list of multicast addresses */
int ia6_flags;
- struct in6_addrlifetime ia6_lifetime; /* NULL = infty */
- struct ifprefix *ia6_ifpr; /* back pointer to ifprefix */
+ struct in6_addrlifetime ia6_lifetime;
+ time_t ia6_createtime; /* the creation time of this address, which is
+ * currently used for temporary addresses only.
+ */
+ time_t ia6_updatetime;
+
+ /* back pointer to the ND prefix (for autoconfigured addresses only) */
+ struct nd_prefix *ia6_ndpr;
+
+ /* multicast addresses joined from the kernel */
+ LIST_HEAD(, in6_multi_mship) ia6_memberships;
};
/*
@@ -270,7 +279,8 @@ struct in6_prflags {
struct prf_ra {
u_char onlink : 1;
u_char autonomous : 1;
- u_char reserved : 6;
+ u_char router : 1;
+ u_char reserved : 5;
} prf_ra;
u_char prf_reserved1;
u_short prf_reserved2;
@@ -352,8 +362,6 @@ struct in6_rrenumreq {
#define IFA_IN6(x) (&((struct sockaddr_in6 *)((x)->ifa_addr))->sin6_addr)
#define IFA_DSTIN6(x) (&((struct sockaddr_in6 *)((x)->ifa_dstaddr))->sin6_addr)
-#define IFPR_IN6(x) (&((struct sockaddr_in6 *)((x)->ifpr_prefix))->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 && \
@@ -426,6 +434,10 @@ struct in6_rrenumreq {
#define IN6_IFF_DUPLICATED 0x04 /* DAD detected duplicate */
#define IN6_IFF_DETACHED 0x08 /* may be detached from the link */
#define IN6_IFF_DEPRECATED 0x10 /* deprecated address */
+#define IN6_IFF_NODAD 0x20 /* don't perform DAD on this address
+ * (used only at first SIOC* call)
+ */
+#define IN6_IFF_AUTOCONF 0x40 /* autoconfigurable address. */
/* do not input/output */
#define IN6_IFF_NOTREADY (IN6_IFF_TENTATIVE|IN6_IFF_DUPLICATED)
@@ -491,7 +503,7 @@ struct in6_multi {
#ifdef _KERNEL
/*
* Structure used by macros below to remember position when stepping through
- * all of eht in6_multi records.
+ * all of the in6_multi records.
*/
struct in6_multistep {
struct in6_ifaddr *i_ia;
@@ -555,19 +567,19 @@ do { \
IN6_NEXT_MULTI((step), (in6m)); \
} while (0)
-int in6_ifinit(struct ifnet *, struct in6_ifaddr *, struct sockaddr_in6 *,
- int);
struct in6_multi *in6_addmulti(struct in6_addr *, struct ifnet *, int *);
void in6_delmulti(struct in6_multi *);
struct in6_multi_mship *in6_joingroup(struct ifnet *, struct in6_addr *, int *);
int in6_leavegroup(struct in6_multi_mship *);
-void in6_ifscrub(struct ifnet *, struct in6_ifaddr *);
int in6_ifindex2scopeid(int);
-int in6_mask2len(struct in6_addr *);
+int in6_mask2len(struct in6_addr *, u_char *);
int in6_control(struct socket *, u_long, caddr_t, struct ifnet *,
struct proc *);
-void in6_purgeaddr(struct ifaddr *, struct ifnet *);
+int in6_update_ifa(struct ifnet *, struct in6_aliasreq *,
+ struct in6_ifaddr *);
+void in6_purgeaddr(struct ifaddr *);
int in6if_do_dad(struct ifnet *);
+void in6_purgeif(struct ifnet *);
void in6_savemkludge(struct in6_ifaddr *);
void in6_setmaxmtu(void);
void *in6_domifattach(struct ifnet *);
@@ -582,11 +594,9 @@ int in6_addr2scopeid(struct ifnet *, struct in6_addr *);
int in6_matchlen(struct in6_addr *, struct in6_addr *);
int in6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int);
void in6_prefixlen2mask(struct in6_addr *, int);
-int in6_prefix_ioctl(struct socket *, u_long, caddr_t, struct ifnet *);
-int in6_prefix_add_ifid(int, struct in6_ifaddr *);
-void in6_prefix_remove_ifid(int, struct in6_ifaddr *);
void in6_purgeprefix(struct ifnet *);
+int in6_is_addr_deprecated(struct sockaddr_in6 *);
struct inpcb;
int in6_embedscope(struct in6_addr *, const struct sockaddr_in6 *,
struct inpcb *, struct ifnet **);