iPXE
Data Structures | Defines | 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...

Defines

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

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.

Variables

struct neighbour_discovery ndp_discovery
 NDP neighbour discovery protocol.

Detailed Description

Neighbour discovery protocol.

Definition in file ndp.h.


Define Documentation

#define NDP_OPTION_BLKSZ   8U

NDP option block size.

Definition at line 27 of file ndp.h.

Referenced by ndp_fetch(), ndp_register_settings(), ndp_rx_options(), and ndp_tx_ll_addr().

#define NDP_OPT_LL_SOURCE   1

NDP source link-layer address option.

Definition at line 30 of file ndp.h.

Referenced by ndp_tx_request(), and ndp_tx_router_solicitation().

#define NDP_OPT_LL_TARGET   2

NDP target link-layer address option.

Definition at line 33 of file ndp.h.

Referenced by ndp_rx_neighbour_solicitation_ll_source().

#define NDP_OPT_PREFIX   3

NDP prefix information option.

Definition at line 44 of file ndp.h.

Referenced by ndp_register_settings().

#define NDP_PREFIX_ON_LINK   0x80

NDP on-link flag.

Definition at line 65 of file ndp.h.

Referenced by ndp_prefix_fetch_len6(), and ndp_rx_router_advertisement_prefix().

#define NDP_PREFIX_AUTONOMOUS   0x40

NDP autonomous address configuration flag.

Definition at line 68 of file ndp.h.

Referenced by ndp_prefix_fetch_ip6(), ndp_register_settings(), and ndp_rx_router_advertisement_prefix().

#define NDP_OPT_RDNSS   25

NDP recursive DNS server option.

Definition at line 71 of file ndp.h.

#define NDP_OPT_DNSSL   31

NDP DNS search list option.

Definition at line 86 of file ndp.h.

#define NDP_NEIGHBOUR_ROUTER   0x80

NDP router flag.

Definition at line 129 of file ndp.h.

#define NDP_NEIGHBOUR_SOLICITED   0x40

NDP solicited flag.

Definition at line 132 of file ndp.h.

Referenced by ndp_rx_neighbour_solicitation_ll_source().

#define NDP_NEIGHBOUR_OVERRIDE   0x20

NDP override flag.

Definition at line 135 of file ndp.h.

Referenced by ndp_rx_neighbour_solicitation_ll_source().

#define NDP_ROUTER_MANAGED   0x80

NDP managed address configuration.

Definition at line 156 of file ndp.h.

Referenced by ipv6conf_rx_router_advertisement().

#define NDP_ROUTER_OTHER   0x40

NDP other configuration.

Definition at line 159 of file ndp.h.

Referenced by ipv6conf_rx_router_advertisement().

#define NDP_SETTINGS_NAME   "ndp"

NDP settings block name.

Definition at line 204 of file ndp.h.

Referenced by ndp_register_settings().


Function Documentation

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 
) [inline, static]

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.

References ndp_discovery, and neighbour_tx().

Referenced by ipv6_tx().

                                                   {

        return neighbour_tx ( iobuf, netdev, &ipv6_protocol, net_dest,
                              &ndp_discovery, net_source, ll_source );
}

Variable Documentation

NDP neighbour discovery protocol.

Definition at line 148 of file ndp.c.

Referenced by ndp_tx().