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_source)
 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 52 of file netdevice.h.


Field Documentation

const char* net_protocol::name

Protocol name.

Definition at line 54 of file netdevice.h.

Referenced by arp_resolve(), arp_rx(), pxenv_undi_isr(), and pxenv_undi_transmit().

int( * net_protocol::rx)(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_source)

Process received packet.

Parameters:
iobuf I/O buffer
netdev Network device
ll_source Link-layer source address
This method takes ownership of the I/O buffer.

Referenced by net_rx().

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

Transcribe network-layer address.

Parameters:
net_addr Network-layer address
Return values:
string Human-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.

Referenced by arp_resolve(), and arp_rx().

Network-layer protocol.

This is an ETH_P_XXX constant, in network-byte order

Definition at line 83 of file netdevice.h.

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

Network-layer address length.

Definition at line 85 of file netdevice.h.

Referenced by arp_find_entry(), arp_resolve(), and arp_rx().


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

Generated on Tue Apr 6 20:02:07 2010 for gPXE by  doxygen 1.5.7.1