Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_gif.c
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
static VNET_DEFINE(int, parallel_tunnels) = 0; | static VNET_DEFINE(int, parallel_tunnels) = 0; | ||||
#endif | #endif | ||||
#define V_parallel_tunnels VNET(parallel_tunnels) | #define V_parallel_tunnels VNET(parallel_tunnels) | ||||
SYSCTL_INT(_net_link_gif, OID_AUTO, parallel_tunnels, | SYSCTL_INT(_net_link_gif, OID_AUTO, parallel_tunnels, | ||||
CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(parallel_tunnels), 0, | CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(parallel_tunnels), 0, | ||||
"Allow parallel tunnels?"); | "Allow parallel tunnels?"); | ||||
/* copy from src/sys/net/if_ethersubr.c */ | |||||
static const u_char etherbroadcastaddr[ETHER_ADDR_LEN] = | |||||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | |||||
#ifndef ETHER_IS_BROADCAST | |||||
#define ETHER_IS_BROADCAST(addr) \ | |||||
(bcmp(etherbroadcastaddr, (addr), ETHER_ADDR_LEN) == 0) | |||||
#endif | |||||
static int | static int | ||||
gif_clone_create(struct if_clone *ifc, int unit, caddr_t params) | gif_clone_create(struct if_clone *ifc, int unit, caddr_t params) | ||||
{ | { | ||||
struct gif_softc *sc; | struct gif_softc *sc; | ||||
sc = malloc(sizeof(struct gif_softc), M_GIF, M_WAITOK | M_ZERO); | sc = malloc(sizeof(struct gif_softc), M_GIF, M_WAITOK | M_ZERO); | ||||
sc->gif_fibnum = curthread->td_proc->p_fibnum; | sc->gif_fibnum = curthread->td_proc->p_fibnum; | ||||
GIF2IFP(sc) = if_alloc(IFT_GIF); | GIF2IFP(sc) = if_alloc(IFT_GIF); | ||||
▲ Show 20 Lines • Show All 888 Lines • Show Last 20 Lines |