Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if_var.h
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
struct ifnet { | struct ifnet { | ||||
/* General book keeping of interface lists. */ | /* General book keeping of interface lists. */ | ||||
CK_STAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained (CK_) */ | CK_STAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained (CK_) */ | ||||
LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ | LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ | ||||
CK_STAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if (CK_) */ | CK_STAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if (CK_) */ | ||||
/* protected by if_addr_lock */ | /* protected by if_addr_lock */ | ||||
u_char if_alloctype; /* if_type at time of allocation */ | u_char if_alloctype; /* if_type at time of allocation */ | ||||
uint8_t if_numa_domain; /* NUMA domain of device */ | |||||
/* Driver and protocol specific information that remains stable. */ | /* Driver and protocol specific information that remains stable. */ | ||||
void *if_softc; /* pointer to driver state */ | void *if_softc; /* pointer to driver state */ | ||||
void *if_llsoftc; /* link layer softc */ | void *if_llsoftc; /* link layer softc */ | ||||
void *if_l2com; /* pointer to protocol bits */ | void *if_l2com; /* pointer to protocol bits */ | ||||
const char *if_dname; /* driver name */ | const char *if_dname; /* driver name */ | ||||
int if_dunit; /* unit or IF_DUNIT_NONE */ | int if_dunit; /* unit or IF_DUNIT_NONE */ | ||||
u_short if_index; /* numeric abbreviation for this if */ | u_short if_index; /* numeric abbreviation for this if */ | ||||
short if_index_reserved; /* spare space to grow if_index */ | short if_index_reserved; /* spare space to grow if_index */ | ||||
▲ Show 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | struct ifnet { | ||||
* binary interface. | * binary interface. | ||||
*/ | */ | ||||
int if_ispare[4]; /* general use */ | int if_ispare[4]; /* general use */ | ||||
}; | }; | ||||
/* for compatibility with other BSDs */ | /* for compatibility with other BSDs */ | ||||
#define if_name(ifp) ((ifp)->if_xname) | #define if_name(ifp) ((ifp)->if_xname) | ||||
#define IF_NODOM 255 | |||||
/* | /* | ||||
* Locks for address lists on the network interface. | * Locks for address lists on the network interface. | ||||
*/ | */ | ||||
#define IF_ADDR_LOCK_INIT(if) mtx_init(&(if)->if_addr_lock, "if_addr_lock", NULL, MTX_DEF) | #define IF_ADDR_LOCK_INIT(if) mtx_init(&(if)->if_addr_lock, "if_addr_lock", NULL, MTX_DEF) | ||||
#define IF_ADDR_LOCK_DESTROY(if) mtx_destroy(&(if)->if_addr_lock) | #define IF_ADDR_LOCK_DESTROY(if) mtx_destroy(&(if)->if_addr_lock) | ||||
#define IF_ADDR_WLOCK(if) mtx_lock(&(if)->if_addr_lock) | #define IF_ADDR_WLOCK(if) mtx_lock(&(if)->if_addr_lock) | ||||
#define IF_ADDR_WUNLOCK(if) mtx_unlock(&(if)->if_addr_lock) | #define IF_ADDR_WUNLOCK(if) mtx_unlock(&(if)->if_addr_lock) | ||||
▲ Show 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | |||||
#define MCDPRINTF(...) | #define MCDPRINTF(...) | ||||
#endif | #endif | ||||
int if_addgroup(struct ifnet *, const char *); | int if_addgroup(struct ifnet *, const char *); | ||||
int if_delgroup(struct ifnet *, const char *); | int if_delgroup(struct ifnet *, const char *); | ||||
int if_addmulti(struct ifnet *, struct sockaddr *, struct ifmultiaddr **); | int if_addmulti(struct ifnet *, struct sockaddr *, struct ifmultiaddr **); | ||||
int if_allmulti(struct ifnet *, int); | int if_allmulti(struct ifnet *, int); | ||||
struct ifnet* if_alloc(u_char); | struct ifnet* if_alloc(u_char); | ||||
struct ifnet* if_alloc_dev(u_char, device_t dev); | |||||
struct ifnet* if_alloc_domain(u_char, int numa_domain); | |||||
void if_attach(struct ifnet *); | void if_attach(struct ifnet *); | ||||
void if_dead(struct ifnet *); | void if_dead(struct ifnet *); | ||||
int if_delmulti(struct ifnet *, struct sockaddr *); | int if_delmulti(struct ifnet *, struct sockaddr *); | ||||
void if_delmulti_ifma(struct ifmultiaddr *); | void if_delmulti_ifma(struct ifmultiaddr *); | ||||
void if_delmulti_ifma_flags(struct ifmultiaddr *, int flags); | void if_delmulti_ifma_flags(struct ifmultiaddr *, int flags); | ||||
void if_detach(struct ifnet *); | void if_detach(struct ifnet *); | ||||
void if_purgeaddrs(struct ifnet *); | void if_purgeaddrs(struct ifnet *); | ||||
void if_delallmulti(struct ifnet *); | void if_delallmulti(struct ifnet *); | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |