diff options
Diffstat (limited to 'sys/net/if_var.h')
| -rw-r--r-- | sys/net/if_var.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index a995dfd8ae8a..07914f5b1daf 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -80,6 +80,7 @@ struct vnet; #include <sys/mbuf.h> #include <sys/eventhandler.h> #include <sys/buf_ring.h> +#include <net/vnet.h> #endif /* _KERNEL */ #include <sys/lock.h> /* XXX */ #include <sys/mutex.h> /* XXX */ @@ -779,11 +780,16 @@ struct ifnet *ifnet_byindex_ref(u_short idx); */ struct ifaddr *ifaddr_byindex(u_short idx); -#ifdef VIMAGE_GLOBALS -extern struct ifnethead ifnet; -extern struct ifnet *loif; /* first loopback interface */ -extern int if_index; -#endif +VNET_DECLARE(struct ifnethead, ifnet); +VNET_DECLARE(struct ifgrouphead, ifg_head); +VNET_DECLARE(int, if_index); +VNET_DECLARE(struct ifnet *, loif); /* first loopback interface */ + +#define V_ifnet VNET_GET(ifnet) +#define V_ifg_head VNET_GET(ifg_head) +#define V_if_index VNET_GET(if_index) +#define V_loif VNET_GET(loif) + extern int ifqmaxlen; int if_addgroup(struct ifnet *, const char *); |
