diff options
author | 2014-03-20 13:19:06 +0000 | |
---|---|---|
committer | 2014-03-20 13:19:06 +0000 | |
commit | 9532dee04480e6b9fce63174864419626b252371 (patch) | |
tree | 227f5306fa6a4cfdd5483edd9e308d41ac46fe31 | |
parent | Add back various #includes of err.h, unistd.h, ctype.h, ioctl.h to (diff) | |
download | wireguard-openbsd-9532dee04480e6b9fce63174864419626b252371.tar.xz wireguard-openbsd-9532dee04480e6b9fce63174864419626b252371.zip |
Do not pull <sys/tree.h> unconditionally in <net/if.h>, only the address
tree and the 80211 nodes need it.
ok henning@, mikeb@
-rw-r--r-- | sys/net/if.c | 12 | ||||
-rw-r--r-- | sys/net/if_var.h | 11 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.h | 4 |
3 files changed, 15 insertions, 12 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b7afe2de869..90408dac42e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.281 2014/03/19 13:49:12 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.282 2014/03/20 13:19:06 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -76,6 +76,7 @@ #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/timeout.h> +#include <sys/tree.h> #include <sys/protosw.h> #include <sys/kernel.h> #include <sys/ioctl.h> @@ -152,12 +153,21 @@ int if_group_egress_build(void); void if_link_state_change_task(void *, void *); +struct ifaddr_item { + RB_ENTRY(ifaddr_item) ifai_entry; + struct sockaddr *ifai_addr; + struct ifaddr *ifai_ifa; + struct ifaddr_item *ifai_next; + u_int ifai_rdomain; +}; + int ifai_cmp(struct ifaddr_item *, struct ifaddr_item *); void ifa_item_insert(struct sockaddr *, struct ifaddr *, struct ifnet *); void ifa_item_remove(struct sockaddr *, struct ifaddr *, struct ifnet *); #ifndef SMALL_KERNEL void ifa_print_rb(void); #endif + RB_HEAD(ifaddr_items, ifaddr_item) ifaddr_items = RB_INITIALIZER(&ifaddr_items); RB_PROTOTYPE(ifaddr_items, ifaddr_item, ifai_entry, ifai_cmp); RB_GENERATE(ifaddr_items, ifaddr_item, ifai_entry, ifai_cmp); diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 27403cfc6da..6b1cc75c543 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.4 2014/01/21 10:18:26 mpi Exp $ */ +/* $OpenBSD: if_var.h,v 1.5 2014/03/20 13:19:06 mpi Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -37,7 +37,6 @@ #define _NET_IF_VAR_H_ #include <sys/queue.h> -#include <sys/tree.h> #include <altq/if_altq.h> #ifdef _KERNEL #include <net/hfsc.h> @@ -297,14 +296,6 @@ struct ifaddr { }; #define IFA_ROUTE RTF_UP /* route installed */ -struct ifaddr_item { - RB_ENTRY(ifaddr_item) ifai_entry; - struct sockaddr *ifai_addr; - struct ifaddr *ifai_ifa; - struct ifaddr_item *ifai_next; - u_int ifai_rdomain; -}; - /* * Interface multicast address. */ diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 99a27ca080d..20e2d52f424 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.h,v 1.44 2013/03/24 17:01:23 claudio Exp $ */ +/* $OpenBSD: ieee80211_node.h,v 1.45 2014/03/20 13:19:06 mpi Exp $ */ /* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */ /*- @@ -33,6 +33,8 @@ #ifndef _NET80211_IEEE80211_NODE_H_ #define _NET80211_IEEE80211_NODE_H_ +#include <sys/tree.h> + #define IEEE80211_PSCAN_WAIT 5 /* passive scan wait */ #define IEEE80211_TRANS_WAIT 5 /* transition wait */ #define IEEE80211_INACT_WAIT 5 /* inactivity timer interval */ |