Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_var.h
Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Lines | struct ifnet { | ||||
uint8_t if_numa_domain; /* NUMA domain of device */ | 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 */ | u_short if_idxgen; /* ... and its generation count */ | ||||
char if_xname[IFNAMSIZ]; /* external name (name + unit) */ | char if_xname[IFNAMSIZ]; /* external name (name + unit) */ | ||||
char *if_description; /* interface description */ | char *if_description; /* interface description */ | ||||
/* Variable fields that are touched by the stack and drivers. */ | /* Variable fields that are touched by the stack and drivers. */ | ||||
int if_flags; /* up/down, broadcast, etc. */ | int if_flags; /* up/down, broadcast, etc. */ | ||||
int if_drv_flags; /* driver-managed status flags */ | int if_drv_flags; /* driver-managed status flags */ | ||||
int if_capabilities; /* interface features & capabilities */ | int if_capabilities; /* interface features & capabilities */ | ||||
int if_capenable; /* enabled features & capabilities */ | int if_capenable; /* enabled features & capabilities */ | ||||
▲ Show 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Look up an ifnet given its index. The returned value protected from | * Look up an ifnet given its index. The returned value protected from | ||||
* being freed by the network epoch. The _ref variant also acquires a | * being freed by the network epoch. The _ref variant also acquires a | ||||
* reference that must be freed using if_rele(). | * reference that must be freed using if_rele(). | ||||
*/ | */ | ||||
struct ifnet *ifnet_byindex(u_int); | struct ifnet *ifnet_byindex(u_int); | ||||
struct ifnet *ifnet_byindex_ref(u_int); | struct ifnet *ifnet_byindex_ref(u_int); | ||||
/* | |||||
* ifnet_byindexgen() looks up ifnet by index and generation count, | |||||
* attempting to restore a weak pointer that had been stored across | |||||
* the epoch. | |||||
*/ | |||||
struct ifnet *ifnet_byindexgen(uint16_t idx, uint16_t gen); | |||||
/* | /* | ||||
* Given the index, ifaddr_byindex() returns the one and only | * Given the index, ifaddr_byindex() returns the one and only | ||||
* link-level ifaddr for the interface. You are not supposed to use | * link-level ifaddr for the interface. You are not supposed to use | ||||
* it to traverse the list of addresses associated to the interface. | * it to traverse the list of addresses associated to the interface. | ||||
*/ | */ | ||||
struct ifaddr *ifaddr_byindex(u_short idx); | struct ifaddr *ifaddr_byindex(u_short idx); | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |