Address Family Domain and Network Interface Device Driver Kernel Services

The Address Family Domain and Network Interface Device Driver services enable address family domains (Protocols) and network interface drivers to add and remove themselves from network switch tables.

The if_attach service and if_detach services add and remove network interfaces from the Network Interface List. Protocols search this list to determine an appropriate interface on which to transmit a packet.

Protocols use the add_input_type and del_input_type services to notify network interface drivers that the protocol is available to handle packets of a certain type. The Network Interface Driver uses the find_input_type service to distribute packets to a protocol.

The add_netisr and del_netisr services add and delete network software interrupt handlers. Address families add and delete themselves from the Address Family Domain switch table by using the add_domain_af and del_domain_af services. The Address Family Domain switch table is a list of all available protocols that can be used in the socket subroutine.

The Address Family Domain and Network Interface Device Driver services are:

Item Description
add_domain_af Adds an address family to the Address Family domain switch table.
add_input_type Adds a new input type to the Network Input table.
add_netisr Adds a network software interrupt service to the Network Interrupt table.
del_domain_af Deletes an address family from the Address Family domain switch table.
del_input_type Deletes an input type from the Network Input table.
del_netisr Deletes a network software interrupt service routine from the Network Interrupt table.
find_input_type Finds the given packet type in the Network Input Interface switch table and distributes the input packet according to the table entry for that type.
if_attach Adds a network interface to the network interface list.
if_detach Deletes a network interface from the network interface list.
ifunit Returns a pointer to the ifnet structure of the requested interface.
schednetisr Schedules or invokes a network software interrupt service routine.