iPXE
neighmgmt.h File Reference

Neighbour management. More...

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
void nstat (void)
 Print neighbour table.

Detailed Description

Neighbour management.

Definition in file neighmgmt.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ nstat()

void nstat ( void )
extern

Print neighbour table.

Definition at line 41 of file neighmgmt.c.

41 {
42 struct neighbour *neighbour;
43 struct net_device *netdev;
46
49 ll_protocol = netdev->ll_protocol;
51 printf ( "%s %s %s is %s %s", netdev->name, net_protocol->name,
54 ( neighbour->discovery ? "(incomplete)" :
56 if ( neighbour->discovery )
57 printf ( " (%s)", neighbour->discovery->name );
58 printf ( "\n" );
59 }
60}
static struct net_device * netdev
Definition gdbudp.c:53
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
Definition list.h:432
struct list_head neighbours
The neighbour cache.
Definition neighbour.c:67
A link-layer protocol.
Definition netdevice.h:115
const char * name
Protocol name.
Definition netdevice.h:117
const char *(* ntoa)(const void *ll_addr)
Transcribe link-layer address.
Definition netdevice.h:164
const char * name
Name.
Definition neighbour.h:22
A neighbour cache entry.
Definition neighbour.h:38
struct neighbour_discovery * discovery
Neighbour discovery protocol (if discovery is ongoing)
Definition neighbour.h:54
struct net_protocol * net_protocol
Network-layer protocol.
Definition neighbour.h:47
struct net_device * netdev
Network device.
Definition neighbour.h:45
uint8_t ll_dest[MAX_LL_ADDR_LEN]
Link-layer destination address.
Definition neighbour.h:51
uint8_t net_dest[MAX_NET_ADDR_LEN]
Network-layer destination address.
Definition neighbour.h:49
A network device.
Definition netdevice.h:353
A network-layer protocol.
Definition netdevice.h:65
const char * name
Protocol name.
Definition netdevice.h:67
const char *(* ntoa)(const void *net_addr)
Transcribe network-layer address.
Definition netdevice.h:95
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465

References neighbour::discovery, list_for_each_entry, neighbour::ll_dest, ll_protocol::name, neighbour_discovery::name, net_protocol::name, neighbours, neighbour::net_dest, neighbour::net_protocol, neighbour::netdev, netdev, ll_protocol::ntoa, net_protocol::ntoa, and printf().

Referenced by COMMAND(), and nstat_exec().