iPXE
Data Fields
net_protocol Struct Reference

A network-layer protocol. More...

#include <netdevice.h>

Data Fields

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

Detailed Description

A network-layer protocol.

Definition at line 64 of file netdevice.h.

Field Documentation

◆ name

const char* net_protocol::name

◆ rx

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.

Parameters
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().

◆ ntoa

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

Transcribe network-layer address.

Parameters
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().

◆ net_proto

uint16_t net_protocol::net_proto

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(), pxenv_undi_isr(), and pxenv_undi_transmit().

◆ net_addr_len

uint8_t net_protocol::net_addr_len

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