iPXE
Data Structures | Macros | Functions | Variables
ndp.h File Reference

Neighbour discovery protocol. More...

#include <stdint.h>
#include <ipxe/in.h>
#include <ipxe/ipv6.h>
#include <ipxe/icmpv6.h>
#include <ipxe/neighbour.h>

Go to the source code of this file.

Data Structures

struct  ndp_option_header
 An NDP option header. More...
 
struct  ndp_ll_addr_option
 NDP source or target link-layer address option. More...
 
struct  ndp_prefix_information_option
 NDP prefix information. More...
 
struct  ndp_rdnss_option
 NDP recursive DNS server. More...
 
struct  ndp_dnssl_option
 NDP DNS search list. More...
 
union  ndp_option
 An NDP option. More...
 
struct  ndp_neighbour_header
 An NDP neighbour solicitation or advertisement header. More...
 
struct  ndp_router_advertisement_header
 An NDP router advertisement header. More...
 
struct  ndp_router_solicitation_header
 An NDP router solicitation header. More...
 
union  ndp_header
 An NDP header. More...
 

Macros

#define NDP_OPTION_BLKSZ   8U
 NDP option block size. More...
 
#define NDP_OPT_LL_SOURCE   1
 NDP source link-layer address option. More...
 
#define NDP_OPT_LL_TARGET   2
 NDP target link-layer address option. More...
 
#define NDP_OPT_PREFIX   3
 NDP prefix information option. More...
 
#define NDP_PREFIX_ON_LINK   0x80
 NDP on-link flag. More...
 
#define NDP_PREFIX_AUTONOMOUS   0x40
 NDP autonomous address configuration flag. More...
 
#define NDP_OPT_RDNSS   25
 NDP recursive DNS server option. More...
 
#define NDP_OPT_DNSSL   31
 NDP DNS search list option. More...
 
#define NDP_NEIGHBOUR_ROUTER   0x80
 NDP router flag. More...
 
#define NDP_NEIGHBOUR_SOLICITED   0x40
 NDP solicited flag. More...
 
#define NDP_NEIGHBOUR_OVERRIDE   0x20
 NDP override flag. More...
 
#define NDP_ROUTER_MANAGED   0x80
 NDP managed address configuration. More...
 
#define NDP_ROUTER_OTHER   0x40
 NDP other configuration. More...
 
#define NDP_SETTINGS_NAME   "ndp"
 NDP settings block name. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static int ndp_tx (struct io_buffer *iobuf, struct net_device *netdev, const void *net_dest, const void *net_source, const void *ll_source)
 Transmit packet, determining link-layer address via NDP. More...
 

Variables

struct neighbour_discovery ndp_discovery
 NDP neighbour discovery protocol. More...
 

Detailed Description

Neighbour discovery protocol.

Definition in file ndp.h.

Macro Definition Documentation

◆ NDP_OPTION_BLKSZ

#define NDP_OPTION_BLKSZ   8U

NDP option block size.

Definition at line 27 of file ndp.h.

◆ NDP_OPT_LL_SOURCE

#define NDP_OPT_LL_SOURCE   1

NDP source link-layer address option.

Definition at line 30 of file ndp.h.

◆ NDP_OPT_LL_TARGET

#define NDP_OPT_LL_TARGET   2

NDP target link-layer address option.

Definition at line 33 of file ndp.h.

◆ NDP_OPT_PREFIX

#define NDP_OPT_PREFIX   3

NDP prefix information option.

Definition at line 44 of file ndp.h.

◆ NDP_PREFIX_ON_LINK

#define NDP_PREFIX_ON_LINK   0x80

NDP on-link flag.

Definition at line 65 of file ndp.h.

◆ NDP_PREFIX_AUTONOMOUS

#define NDP_PREFIX_AUTONOMOUS   0x40

NDP autonomous address configuration flag.

Definition at line 68 of file ndp.h.

◆ NDP_OPT_RDNSS

#define NDP_OPT_RDNSS   25

NDP recursive DNS server option.

Definition at line 71 of file ndp.h.

◆ NDP_OPT_DNSSL

#define NDP_OPT_DNSSL   31

NDP DNS search list option.

Definition at line 86 of file ndp.h.

◆ NDP_NEIGHBOUR_ROUTER

#define NDP_NEIGHBOUR_ROUTER   0x80

NDP router flag.

Definition at line 129 of file ndp.h.

◆ NDP_NEIGHBOUR_SOLICITED

#define NDP_NEIGHBOUR_SOLICITED   0x40

NDP solicited flag.

Definition at line 132 of file ndp.h.

◆ NDP_NEIGHBOUR_OVERRIDE

#define NDP_NEIGHBOUR_OVERRIDE   0x20

NDP override flag.

Definition at line 135 of file ndp.h.

◆ NDP_ROUTER_MANAGED

#define NDP_ROUTER_MANAGED   0x80

NDP managed address configuration.

Definition at line 156 of file ndp.h.

◆ NDP_ROUTER_OTHER

#define NDP_ROUTER_OTHER   0x40

NDP other configuration.

Definition at line 159 of file ndp.h.

◆ NDP_SETTINGS_NAME

#define NDP_SETTINGS_NAME   "ndp"

NDP settings block name.

Definition at line 204 of file ndp.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ ndp_tx()

static int ndp_tx ( struct io_buffer iobuf,
struct net_device netdev,
const void *  net_dest,
const void *  net_source,
const void *  ll_source 
)
inlinestatic

Transmit packet, determining link-layer address via NDP.

Parameters
iobufI/O buffer
netdevNetwork device
net_destDestination network-layer address
net_sourceSource network-layer address
ll_sourceSource link-layer address
Return values
rcReturn status code

Definition at line 195 of file ndp.h.

197  {
198 
199  return neighbour_tx ( iobuf, netdev, &ipv6_protocol, net_dest,
200  &ndp_discovery, net_source, ll_source );
201 }
struct neighbour_discovery ndp_discovery
NDP neighbour discovery protocol.
Definition: ndp.c:148
static struct net_device * netdev
Definition: gdbudp.c:52
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.
Definition: neighbour.c:299

References ndp_discovery, neighbour_tx(), and netdev.

Referenced by ipv6_tx().

Variable Documentation

◆ ndp_discovery

struct neighbour_discovery ndp_discovery

NDP neighbour discovery protocol.

Definition at line 148 of file ndp.c.

Referenced by ndp_tx().