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.
#include <sys/types.h> #include <sys/errno.h> #include <net/if.h> int find_input_type (type, m, ac, header_pointer) ushort type; struct mbuf * m; struct arpcom * ac; caddr_t header_pointer;
Item | Description |
---|---|
type | Specifies the protocol type. |
m | Points to the mbuf buffer containing the packet to distribute. |
ac | Points to the network common portion (arpcom) of the
network interface on which the packet was received. This common
portion is defined as follows:
|
header_pointer | Points to the buffer containing the input packet header. |
The find_input_type kernel service finds the given packet type in the Network Input table and distributes the input packet contained in the mbuf buffer pointed to by the m value. The ac parameter is passed to services that do not have a queued interface.
The find_input_type kernel service can be called from either the process or interrupt environment.
Item | Description |
---|---|
0 | Indicates that the protocol type was successfully found. |
ENOENT | Indicates that the service could not find the type in the Network Input table. |