ifnet Struct Reference
#include
<stdapis/net/if_var.h>
Detailed Description
Structure defining a network interface.
ifnet and its related packet queues are protected by if_serializer. Callers of if_output, if_ioctl, if_start, if_watchdog, if_init, if_resolvemulti, and if_poll hold if_serializer. Device drivers usually use the same serializer for their interrupt but this is not required. However, the device driver must be holding if_serializer when it calls if_input. Note that the serializer may be temporarily released within if_input to avoid a deadlock (e.g. when fast-forwarding or bridging packets between interfaces).
If a device driver installs the same serializer for its interrupt as for ifnet, then the driver only really needs to worry about further serialization in timeout based entry points. All other entry points will already be serialized. Older ISA drivers still using the old interrupt infrastructure will have to obtain and release the serializer in their interrupt routine themselves.
Member Attribute Documentation
if_addrhead
struct ifaddrhead | if_addrhead |
if_afdata
if_amcount
if_bpf
if_bridge
if_broadcastaddr
if_capabilities
if_capenable
if_carp
if_data
if_dname
if_dunit
if_flags
if_index
if_linkmib
if_linkmiblen
if_lladdr
if_multiaddrs
struct ifmultihead | if_multiaddrs |
if_pcount
if_poll_unused
if_prefixhead
struct ifprefixhead | if_prefixhead |
if_serializer
struct lwkt_serialize * | if_serializer |
if_softc
if_timer
if_xname
Member Function Documentation
TAILQ_ENTRY ( ifnet )
if_init ( void * )
if_input ( struct ifnet *, struct mbuf * )
void | if_input | ( | struct ifnet * | , |
| struct mbuf * | |
| ) | |
if_ioctl ( struct ifnet *, u_long, caddr_t, struct ucred * )
int | if_ioctl | ( | struct ifnet * | , |
| u_long | , |
| caddr_t | , |
| struct ucred * | |
| ) | |
if_output ( struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry * )
if_resolvemulti ( struct ifnet *, struct sockaddr **, struct sockaddr * )
if_start ( struct ifnet * )
void | if_start | ( | struct ifnet * | | ) | |
if_watchdog ( struct ifnet * )
void | if_watchdog | ( | struct ifnet * | | ) | |