iPXE
|
Neighbour discovery. More...
#include <stdint.h>
#include <ipxe/refcnt.h>
#include <ipxe/list.h>
#include <ipxe/netdevice.h>
#include <ipxe/retry.h>
Go to the source code of this file.
Data Structures | |
struct | neighbour_discovery |
A neighbour discovery protocol. More... | |
struct | neighbour |
A neighbour cache entry. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | neighbour_has_ll_dest (struct neighbour *neighbour) |
Test if neighbour cache entry has a valid link-layer address. More... | |
int | neighbour_tx (struct io_buffer *iobuf, struct net_device *netdev, struct net_protocol *net_protocol, const void *net_dest, struct neighbour_discovery *discovery, const void *net_source, const void *ll_source) |
Transmit packet, determining link-layer address via neighbour discovery. More... | |
int | neighbour_update (struct net_device *netdev, struct net_protocol *net_protocol, const void *net_dest, const void *ll_dest) |
Update existing neighbour cache entry. More... | |
int | neighbour_define (struct net_device *netdev, struct net_protocol *net_protocol, const void *net_dest, const void *ll_dest) |
Define neighbour cache entry. More... | |
Variables | |
struct list_head | neighbours |
The neighbour cache. More... | |
Neighbour discovery.
Definition in file neighbour.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Test if neighbour cache entry has a valid link-layer address.
neighbour | Neighbour cache entry |
has_ll_dest | Neighbour cache entry has a valid link-layer address |
Definition at line 70 of file neighbour.h.
References neighbour::timer.
Referenced by neighbour_tx(), and nstat().
int neighbour_tx | ( | struct io_buffer * | iobuf, |
struct net_device * | netdev, | ||
struct net_protocol * | net_protocol, | ||
const void * | net_dest, | ||
struct neighbour_discovery * | discovery, | ||
const void * | net_source, | ||
const void * | ll_source | ||
) |
Transmit packet, determining link-layer address via neighbour discovery.
iobuf | I/O buffer |
netdev | Network device |
discovery | Neighbour discovery protocol |
net_protocol | Network-layer protocol |
net_dest | Destination network-layer address |
net_source | Source network-layer address |
ll_source | Source link-layer address |
rc | Return status code |
Definition at line 299 of file neighbour.c.
References DBGC2, neighbour::discovery, ENOMEM, io_buffer::list, list_add_tail, neighbour::ll_dest, net_protocol::name, net_device::name, neighbour_create(), neighbour_discover(), neighbour_find(), neighbour_has_ll_dest(), neighbour::net_dest, neighbour::net_source, net_tx(), netdev, net_protocol::ntoa, and neighbour::tx_queue.
int neighbour_update | ( | struct net_device * | netdev, |
struct net_protocol * | net_protocol, | ||
const void * | net_dest, | ||
const void * | ll_dest | ||
) |
Update existing neighbour cache entry.
netdev | Network device |
net_protocol | Network-layer protocol |
net_dest | Destination network-layer address |
ll_dest | Destination link-layer address |
rc | Return status code |
Definition at line 338 of file neighbour.c.
References ENOENT, neighbour::ll_dest, neighbour_discovered(), neighbour_find(), neighbour::net_dest, and netdev.
Referenced by arp_rx(), and ndp_rx_neighbour_advertisement_ll_target().
int neighbour_define | ( | struct net_device * | netdev, |
struct net_protocol * | net_protocol, | ||
const void * | net_dest, | ||
const void * | ll_dest | ||
) |
Define neighbour cache entry.
netdev | Network device |
net_protocol | Network-layer protocol |
net_dest | Destination network-layer address |
ll_dest | Destination link-layer address, if known |
rc | Return status code |
Definition at line 363 of file neighbour.c.
References ENOMEM, neighbour::ll_dest, neighbour_create(), neighbour_discovered(), neighbour_find(), neighbour::net_dest, and netdev.
Referenced by ndp_rx_neighbour_solicitation_ll_source(), and ndp_rx_router_advertisement_ll_source().
struct list_head neighbours |
The neighbour cache.
Definition at line 52 of file neighbour.c.
Referenced by neighbour_create(), neighbour_discard(), neighbour_find(), neighbour_flush(), and nstat().