Data Fields
net_protocol Struct Reference

A network-layer protocol. More...

#include <netdevice.h>

Data Fields

const char * name
 Protocol name.
int(* rx )(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest, const void *ll_source, unsigned int flags)
 Process received packet.
const char *(* ntoa )(const void *net_addr)
 Transcribe network-layer address.
uint16_t net_proto
 Network-layer protocol.
uint8_t net_addr_len
 Network-layer address length.

Detailed Description

A network-layer protocol.

Definition at line 64 of file netdevice.h.

Field Documentation

const char* net_protocol::name
int( * net_protocol::rx)(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest, const void *ll_source, unsigned int flags)

Process received packet.

iobufI/O buffer
netdevNetwork device
ll_destLink-layer destination address
ll_sourceLink-layer source address
flagsPacket flags
Return values:
rcReturn status code

This method takes ownership of the I/O buffer.

Definition at line 79 of file netdevice.h.

Referenced by net_rx().

const char*( * net_protocol::ntoa)(const void *net_addr)

Transcribe network-layer address.

net_addrNetwork-layer address
Return values:
stringHuman-readable transcription of address

This method should convert the network-layer address into a human-readable format (e.g. dotted quad notation for IPv4).

The buffer used to hold the transcription is statically allocated.

Definition at line 94 of file netdevice.h.

Referenced by arp_rx(), arp_tx_request(), efi_pxe_ip_ntoa(), efi_pxe_start(), efi_pxe_udp_read(), neighbour_create(), neighbour_destroy(), neighbour_discover(), neighbour_discovered(), neighbour_expired(), neighbour_tx(), and nstat().

Network-layer protocol.

This is an ETH_P_XXX constant, in network-byte order

Definition at line 99 of file netdevice.h.

Referenced by arp_find_protocol(), arp_tx_request(), net_rx(), net_tx(), and pxenv_undi_transmit().

The documentation for this struct was generated from the following file: