ll_protocol Struct Reference

A link-layer protocol. More...

#include <netdevice.h>


Data Fields

const char * name
 Protocol name.
int(* push )(struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto)
 Add link-layer header.
int(* pull )(struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto)
 Remove link-layer header.
void(* init_addr )(const void *hw_addr, void *ll_addr)
 Initialise link-layer address.
const char *(* ntoa )(const void *ll_addr)
 Transcribe link-layer address.
int(* mc_hash )(unsigned int af, const void *net_addr, void *ll_addr)
 Hash multicast address.
int(* eth_addr )(const void *ll_addr, void *eth_addr)
 Generate Ethernet-compatible compressed link-layer address.
uint16_t ll_proto
 Link-layer protocol.
uint8_t hw_addr_len
 Hardware address length.
uint8_t ll_addr_len
 Link-layer address length.
uint8_t ll_header_len
 Link-layer header length.


Detailed Description

A link-layer protocol.

Definition at line 92 of file netdevice.h.


Field Documentation

const char* ll_protocol::name

Protocol name.

Definition at line 94 of file netdevice.h.

Referenced by add_ndp_entry(), arp_resolve(), arp_rx(), ndp_resolve(), and pxenv_undi_get_information().

int( * ll_protocol::push)(struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto)

Add link-layer header.

Parameters:
netdev Network device
iobuf I/O buffer
ll_dest Link-layer destination address
ll_source Source link-layer address
net_proto Network-layer protocol, in network-byte order
Return values:
rc Return status code

Referenced by efi_snp_transmit(), net_tx(), and pxenv_undi_transmit().

int( * ll_protocol::pull)(struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto)

Remove link-layer header.

Parameters:
netdev Network device
iobuf I/O buffer
Return values:
ll_dest Link-layer destination address
ll_source Source link-layer address
net_proto Network-layer protocol, in network-byte order
rc Return status code

Referenced by efi_snp_receive(), net_step(), and pxenv_undi_isr().

void( * ll_protocol::init_addr)(const void *hw_addr, void *ll_addr)

Initialise link-layer address.

Parameters:
hw_addr Hardware address
ll_addr Link-layer address to fill in

Referenced by efi_snp_set_mode(), pxenv_undi_get_information(), and register_netdev().

const char*( * ll_protocol::ntoa)(const void *ll_addr)

Transcribe link-layer address.

Parameters:
ll_addr Link-layer address
Return values:
string Human-readable transcription of address
This method should convert the link-layer address into a human-readable format.

The buffer used to hold the transcription is statically allocated.

Referenced by add_ndp_entry(), arp_resolve(), arp_rx(), efi_snp_station_address(), efi_snp_transmit(), legacy_probe(), ndp_resolve(), netdev_addr(), pxe_dump_mcast_list(), pxenv_undi_get_information(), pxenv_undi_get_mcast_address(), pxenv_undi_set_station_address(), and pxenv_undi_transmit().

int( * ll_protocol::mc_hash)(unsigned int af, const void *net_addr, void *ll_addr)

Hash multicast address.

Parameters:
af Address family
net_addr Network-layer address
ll_addr Link-layer address to fill in
Return values:
rc Return status code

Referenced by efi_snp_mcast_ip_to_mac(), ipv4_ll_addr(), and pxenv_undi_get_mcast_address().

int( * ll_protocol::eth_addr)(const void *ll_addr, void *eth_addr)

Generate Ethernet-compatible compressed link-layer address.

Parameters:
ll_addr Link-layer address
eth_addr Ethernet-compatible address to fill in

Referenced by ibft_fill_nic().

Link-layer protocol.

This is an ARPHRD_XXX constant, in network byte order.

Definition at line 162 of file netdevice.h.

Referenced by arp_resolve(), arp_rx(), dhcp_create_packet(), dhcp_create_request(), efi_snp_driver_start(), efi_snp_set_mode(), and pxenv_undi_get_information().

Hardware address length.

Definition at line 164 of file netdevice.h.

Referenced by dhcp_chaddr().

Link-layer header length.

Definition at line 168 of file netdevice.h.

Referenced by efi_snp_receive(), efi_snp_set_mode(), efi_snp_transmit(), and pxenv_undi_transmit().


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

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