NDP (Neighbor Discovery Protocol) More...

#include "core/net.h"

Go to the source code of this file.

Data Structures

struct  NdpQueueItem
 NDP queue item. More...
 
struct  NdpNeighborCacheEntry
 Neighbor cache entry. More...
 
struct  NdpDestCacheEntry
 Destination cache entry. More...
 
struct  NdpContext
 NDP context. More...
 

Macros

#define NDP_SUPPORT   ENABLED
 
#define NDP_TICK_INTERVAL   200
 
#define NDP_NEIGHBOR_CACHE_SIZE   8
 
#define NDP_DEST_CACHE_SIZE   8
 
#define NDP_MAX_PENDING_PACKETS   2
 
#define NDP_MAX_RTR_ADVERT_INTERVAL   600000
 
#define NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL   16000
 
#define NDP_MAX_INITIAL_RTR_ADVERTISEMENTS   3
 
#define NDP_MAX_FINAL_RTR_ADVERTISEMENTS   3
 
#define NDP_MIN_DELAY_BETWEEN_RAS   3000
 
#define NDP_MAX_RA_DELAY_TIME   500
 
#define NDP_MIN_RTR_SOLICITATION_DELAY   0
 
#define NDP_MAX_RTR_SOLICITATION_DELAY   1000
 
#define NDP_RTR_SOLICITATION_INTERVAL   4000
 
#define NDP_MAX_RTR_SOLICITATIONS   3
 
#define NDP_MAX_MULTICAST_SOLICIT   3
 
#define NDP_MAX_UNICAST_SOLICIT   3
 
#define NDP_DUP_ADDR_DETECT_TRANSMITS   1
 
#define NDP_MAX_ANYCAST_DELAY_TIME   1000
 
#define NDP_MAX_NEIGHBOR_ADVERTISEMENT   3
 
#define NDP_REACHABLE_TIME   30000
 
#define NDP_RETRANS_TIMER   1000
 
#define NDP_DELAY_FIRST_PROBE_TIME   5000
 
#define NDP_HOP_LIMIT   255
 
#define NDP_INFINITE_LIFETIME   0xFFFFFFFF
 

Typedefs

struct {
   uint8_t   type
 
   uint8_t   code
 
   uint16_t   checksum
 
   uint32_t   reserved
 
   uint8_t   options []
 
NdpRouterSolMessage
 Router Solicitation message. More...
 
struct {
   uint8_t   type
 
   uint8_t   code
 
   uint16_t   checksum
 
   uint8_t   curHopLimit
 
   uint8_t   reserved: 2
 
   uint8_t   p: 1
 
   uint8_t   prf: 2
 
   uint8_t   h: 1
 
   uint8_t   o: 1
 
   uint8_t   m: 1
 
   uint16_t   routerLifetime
 
   uint32_t   reachableTime
 
   uint32_t   retransTimer
 
   uint8_t   options []
 
NdpRouterAdvMessage
 Router Advertisement message. More...
 
struct {
   uint8_t   type
 
   uint8_t   code
 
   uint16_t   checksum
 
   uint32_t   reserved
 
   Ipv6Addr   targetAddr
 
   uint8_t   options []
 
NdpNeighborSolMessage
 Neighbor Solicitation message. More...
 
struct {
   uint8_t   type
 
   uint8_t   code
 
   uint16_t   checksum
 
   uint32_t   reserved1: 5
 
   uint32_t   o: 1
 
   uint32_t   s: 1
 
   uint32_t   r: 1
 
   uint32_t   reserved2: 24
 
   Ipv6Addr   targetAddr
 
   uint8_t   options []
 
NdpNeighborAdvMessage
 Neighbor Advertisement message. More...
 
struct {
   uint8_t   type
 
   uint8_t   code
 
   uint16_t   checksum
 
   uint32_t   reserved
 
   Ipv6Addr   targetAddr
 
   Ipv6Addr   destAddr
 
   uint8_t   options []
 
NdpRedirectMessage
 Redirect message. More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint8_t   value []
 
NdpOption
 Neighbor Discovery option general format. More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   MacAddr   linkLayerAddr
 
NdpLinkLayerAddrOption
 Source/Target Link-Layer Address option. More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint8_t   prefixLength
 
   uint8_t   reserved1: 5
 
   uint8_t   r: 1
 
   uint8_t   a: 1
 
   uint8_t   l: 1
 
   uint32_t   validLifetime
 
   uint32_t   preferredLifetime
 
   uint32_t   reserved2
 
   Ipv6Addr   prefix
 
NdpPrefixInfoOption
 Prefix Information option (PIO) More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint16_t   reserved1
 
   uint32_t   reserved2
 
   uint8_t   ipPacket []
 
NdpRedirectedHeaderOption
 Redirected Header option (RHO) More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint16_t   reserved
 
   uint32_t   mtu
 
NdpMtuOption
 MTU option. More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint8_t   prefixLength
 
   uint8_t   reserved2: 3
 
   uint8_t   prf: 2
 
   uint8_t   reserved1: 3
 
   uint32_t   routeLifetime
 
   Ipv6Addr   prefix
 
NdpRouteInfoOption
 Route Information option (RIO) More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint16_t   reserved
 
   uint32_t   lifetime
 
   Ipv6Addr   address []
 
NdpRdnssOption
 Recursive DNS Server option (RDNSS) More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint16_t   reserved
 
   uint32_t   lifetime
 
   uint8_t   domainNames []
 
NdpDnsslOption
 DNS Search List option (DNSSL) More...
 
struct {
   uint8_t   type
 
   uint8_t   length
 
   uint8_t   contextLength
 
   uint8_t   cid: 4
 
   uint8_t   c: 1
 
   uint8_t   reserved1: 3
 
   uint16_t   reserved2
 
   uint16_t   validLifetime
 
   Ipv6Addr   contextPrefix
 
NdpContextOption
 6LoWPAN Context option (6CO) More...
 

Enumerations

enum  NdpOptionType {
  NDP_OPT_SOURCE_LINK_LAYER_ADDR = 1, NDP_OPT_TARGET_LINK_LAYER_ADDR = 2, NDP_OPT_PREFIX_INFORMATION = 3, NDP_OPT_REDIRECTED_HEADER = 4,
  NDP_OPT_MTU = 5, NDP_OPT_ROUTE_INFORMATION = 24, NDP_OPT_RECURSIVE_DNS_SERVER = 25, NDP_OPT_DNS_SEARCH_LIST = 31,
  NDP_OPT_6LOWPAN_CONTEXT = 34, NDP_OPT_ANY = 255
}
 Neighbor Discovery options. More...
 
enum  NdpRouterSelPreference { NDP_ROUTER_SEL_PREFERENCE_MEDIUM = 0, NDP_ROUTER_SEL_PREFERENCE_HIGH = 1, NDP_ROUTER_SEL_PREFERENCE_RESERVED = 2, NDP_ROUTER_SEL_PREFERENCE_LOW = 3 }
 Router selection preferences. More...
 
enum  NdpState {
  NDP_STATE_NONE = 0, NDP_STATE_INCOMPLETE = 1, NDP_STATE_REACHABLE = 2, NDP_STATE_STALE = 3,
  NDP_STATE_DELAY = 4, NDP_STATE_PROBE = 5, NDP_STATE_PERMANENT = 6
}
 Neighbor cache entry states. More...
 

Functions

error_t ndpInit (NetInterface *interface)
 Neighbor cache initialization. More...
 
error_t ndpResolve (NetInterface *interface, const Ipv6Addr *ipAddr, MacAddr *macAddr)
 Address resolution using Neighbor Discovery protocol. More...
 
error_t ndpEnqueuePacket (NetInterface *srcInterface, NetInterface *destInterface, const Ipv6Addr *ipAddr, NetBuffer *buffer, size_t offset)
 Enqueue an IPv6 packet waiting for address resolution. More...
 
void ndpTick (NetInterface *interface)
 NDP timer handler. More...
 
void ndpLinkChangeEvent (NetInterface *interface)
 Callback function for link change event. More...
 
void ndpProcessRouterAdv (NetInterface *interface, Ipv6PseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset, uint8_t hopLimit)
 Router Advertisement message processing. More...
 
void ndpProcessNeighborSol (NetInterface *interface, Ipv6PseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset, uint8_t hopLimit)
 Neighbor Solicitation message processing. More...
 
void ndpProcessNeighborAdv (NetInterface *interface, Ipv6PseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset, uint8_t hopLimit)
 Neighbor Advertisement message processing. More...
 
void ndpProcessRedirect (NetInterface *interface, Ipv6PseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset, uint8_t hopLimit)
 Redirect message processing. More...
 
error_t ndpSendRouterSol (NetInterface *interface)
 Send a Router Solicitation message. More...
 
error_t ndpSendNeighborSol (NetInterface *interface, const Ipv6Addr *targetIpAddr, bool_t multicast)
 Send a Neighbor Solicitation message. More...
 
error_t ndpSendNeighborAdv (NetInterface *interface, const Ipv6Addr *targetIpAddr, const Ipv6Addr *destIpAddr)
 Send a Neighbor Advertisement message. More...
 
error_t ndpSendRedirect (NetInterface *interface, const Ipv6Addr *targetAddr, const NetBuffer *ipPacket, size_t ipPacketOffset)
 Send a Redirect message. More...
 
void ndpDumpRouterSolMessage (const NdpRouterSolMessage *message)
 Dump Router Solicitation message for debugging purpose. More...
 
void ndpDumpRouterAdvMessage (const NdpRouterAdvMessage *message)
 Dump Router Advertisement message for debugging purpose. More...
 
void ndpDumpNeighborSolMessage (const NdpNeighborSolMessage *message)
 Dump Neighbor Solicitation message for debugging purpose. More...
 
void ndpDumpNeighborAdvMessage (const NdpNeighborAdvMessage *message)
 Dump Neighbor Advertisement message for debugging purpose. More...
 
void ndpDumpRedirectMessage (const NdpRedirectMessage *message)
 Dump Redirect message for debugging purpose. More...
 

Variables

systime_t ndpTickCounter
 

Detailed Description

NDP (Neighbor Discovery Protocol)

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file ndp.h.

Macro Definition Documentation

◆ NDP_DELAY_FIRST_PROBE_TIME

#define NDP_DELAY_FIRST_PROBE_TIME   5000

Definition at line 191 of file ndp.h.

◆ NDP_DEST_CACHE_SIZE

#define NDP_DEST_CACHE_SIZE   8

Definition at line 58 of file ndp.h.

◆ NDP_DUP_ADDR_DETECT_TRANSMITS

#define NDP_DUP_ADDR_DETECT_TRANSMITS   1

Definition at line 156 of file ndp.h.

◆ NDP_HOP_LIMIT

#define NDP_HOP_LIMIT   255

Definition at line 197 of file ndp.h.

◆ NDP_INFINITE_LIFETIME

#define NDP_INFINITE_LIFETIME   0xFFFFFFFF

Definition at line 200 of file ndp.h.

◆ NDP_MAX_ANYCAST_DELAY_TIME

#define NDP_MAX_ANYCAST_DELAY_TIME   1000

Definition at line 163 of file ndp.h.

◆ NDP_MAX_FINAL_RTR_ADVERTISEMENTS

#define NDP_MAX_FINAL_RTR_ADVERTISEMENTS   3

Definition at line 93 of file ndp.h.

◆ NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL

#define NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL   16000

Definition at line 79 of file ndp.h.

◆ NDP_MAX_INITIAL_RTR_ADVERTISEMENTS

#define NDP_MAX_INITIAL_RTR_ADVERTISEMENTS   3

Definition at line 86 of file ndp.h.

◆ NDP_MAX_MULTICAST_SOLICIT

#define NDP_MAX_MULTICAST_SOLICIT   3

Definition at line 142 of file ndp.h.

◆ NDP_MAX_NEIGHBOR_ADVERTISEMENT

#define NDP_MAX_NEIGHBOR_ADVERTISEMENT   3

Definition at line 170 of file ndp.h.

◆ NDP_MAX_PENDING_PACKETS

#define NDP_MAX_PENDING_PACKETS   2

Definition at line 65 of file ndp.h.

◆ NDP_MAX_RA_DELAY_TIME

#define NDP_MAX_RA_DELAY_TIME   500

Definition at line 107 of file ndp.h.

◆ NDP_MAX_RTR_ADVERT_INTERVAL

#define NDP_MAX_RTR_ADVERT_INTERVAL   600000

Definition at line 72 of file ndp.h.

◆ NDP_MAX_RTR_SOLICITATION_DELAY

#define NDP_MAX_RTR_SOLICITATION_DELAY   1000

Definition at line 121 of file ndp.h.

◆ NDP_MAX_RTR_SOLICITATIONS

#define NDP_MAX_RTR_SOLICITATIONS   3

Definition at line 135 of file ndp.h.

◆ NDP_MAX_UNICAST_SOLICIT

#define NDP_MAX_UNICAST_SOLICIT   3

Definition at line 149 of file ndp.h.

◆ NDP_MIN_DELAY_BETWEEN_RAS

#define NDP_MIN_DELAY_BETWEEN_RAS   3000

Definition at line 100 of file ndp.h.

◆ NDP_MIN_RTR_SOLICITATION_DELAY

#define NDP_MIN_RTR_SOLICITATION_DELAY   0

Definition at line 114 of file ndp.h.

◆ NDP_NEIGHBOR_CACHE_SIZE

#define NDP_NEIGHBOR_CACHE_SIZE   8

Definition at line 51 of file ndp.h.

◆ NDP_REACHABLE_TIME

#define NDP_REACHABLE_TIME   30000

Definition at line 177 of file ndp.h.

◆ NDP_RETRANS_TIMER

#define NDP_RETRANS_TIMER   1000

Definition at line 184 of file ndp.h.

◆ NDP_RTR_SOLICITATION_INTERVAL

#define NDP_RTR_SOLICITATION_INTERVAL   4000

Definition at line 128 of file ndp.h.

◆ NDP_SUPPORT

#define NDP_SUPPORT   ENABLED

Definition at line 37 of file ndp.h.

◆ NDP_TICK_INTERVAL

#define NDP_TICK_INTERVAL   200

Definition at line 44 of file ndp.h.

Typedef Documentation

◆ NdpContextOption

typedef { ... } NdpContextOption

6LoWPAN Context option (6CO)

◆ NdpDnsslOption

typedef { ... } NdpDnsslOption

DNS Search List option (DNSSL)

◆ NdpLinkLayerAddrOption

typedef { ... } NdpLinkLayerAddrOption

Source/Target Link-Layer Address option.

◆ NdpMtuOption

typedef { ... } NdpMtuOption

MTU option.

◆ NdpNeighborAdvMessage

typedef { ... } NdpNeighborAdvMessage

Neighbor Advertisement message.

◆ NdpNeighborSolMessage

typedef { ... } NdpNeighborSolMessage

Neighbor Solicitation message.

◆ NdpOption

typedef { ... } NdpOption

Neighbor Discovery option general format.

◆ NdpPrefixInfoOption

typedef { ... } NdpPrefixInfoOption

Prefix Information option (PIO)

◆ NdpRdnssOption

typedef { ... } NdpRdnssOption

Recursive DNS Server option (RDNSS)

◆ NdpRedirectedHeaderOption

typedef { ... } NdpRedirectedHeaderOption

Redirected Header option (RHO)

◆ NdpRedirectMessage

typedef { ... } NdpRedirectMessage

Redirect message.

◆ NdpRouteInfoOption

typedef { ... } NdpRouteInfoOption

Route Information option (RIO)

◆ NdpRouterAdvMessage

typedef { ... } NdpRouterAdvMessage

Router Advertisement message.

◆ NdpRouterSolMessage

typedef { ... } NdpRouterSolMessage

Router Solicitation message.

Enumeration Type Documentation

◆ NdpOptionType

Neighbor Discovery options.

Enumerator
NDP_OPT_SOURCE_LINK_LAYER_ADDR 
NDP_OPT_TARGET_LINK_LAYER_ADDR 
NDP_OPT_PREFIX_INFORMATION 
NDP_OPT_REDIRECTED_HEADER 
NDP_OPT_MTU 
NDP_OPT_ROUTE_INFORMATION 
NDP_OPT_RECURSIVE_DNS_SERVER 
NDP_OPT_DNS_SEARCH_LIST 
NDP_OPT_6LOWPAN_CONTEXT 
NDP_OPT_ANY 

Definition at line 212 of file ndp.h.

◆ NdpRouterSelPreference

Router selection preferences.

Enumerator
NDP_ROUTER_SEL_PREFERENCE_MEDIUM 
NDP_ROUTER_SEL_PREFERENCE_HIGH 
NDP_ROUTER_SEL_PREFERENCE_RESERVED 
NDP_ROUTER_SEL_PREFERENCE_LOW 

Definition at line 231 of file ndp.h.

◆ NdpState

enum NdpState

Neighbor cache entry states.

Enumerator
NDP_STATE_NONE 
NDP_STATE_INCOMPLETE 
NDP_STATE_REACHABLE 
NDP_STATE_STALE 
NDP_STATE_DELAY 
NDP_STATE_PROBE 
NDP_STATE_PERMANENT 

Definition at line 244 of file ndp.h.

Function Documentation

◆ ndpDumpNeighborAdvMessage()

void ndpDumpNeighborAdvMessage ( const NdpNeighborAdvMessage message)

Dump Neighbor Advertisement message for debugging purpose.

Parameters
[in]messageNeighbor Advertisement message

Definition at line 1941 of file ndp.c.

◆ ndpDumpNeighborSolMessage()

void ndpDumpNeighborSolMessage ( const NdpNeighborSolMessage message)

Dump Neighbor Solicitation message for debugging purpose.

Parameters
[in]messageNeighbor Solicitation message

Definition at line 1926 of file ndp.c.

◆ ndpDumpRedirectMessage()

void ndpDumpRedirectMessage ( const NdpRedirectMessage message)

Dump Redirect message for debugging purpose.

Parameters
[in]messageRedirect message

Definition at line 1959 of file ndp.c.

◆ ndpDumpRouterAdvMessage()

void ndpDumpRouterAdvMessage ( const NdpRouterAdvMessage message)

Dump Router Advertisement message for debugging purpose.

Parameters
[in]messageRouter Advertisement message

Definition at line 1906 of file ndp.c.

◆ ndpDumpRouterSolMessage()

void ndpDumpRouterSolMessage ( const NdpRouterSolMessage message)

Dump Router Solicitation message for debugging purpose.

Parameters
[in]messageRouter Solicitation message

Definition at line 1892 of file ndp.c.

◆ ndpEnqueuePacket()

error_t ndpEnqueuePacket ( NetInterface srcInterface,
NetInterface destInterface,
const Ipv6Addr ipAddr,
NetBuffer buffer,
size_t  offset 
)

Enqueue an IPv6 packet waiting for address resolution.

Parameters
[in]srcInterfaceInterface from which the packet has been received
[in]destInterfaceInterface on which the packet should be sent
[in]ipAddrIPv6 address of the destination host
[in]bufferMulti-part buffer containing the packet to be enqueued
[in]offsetOffset to the first byte of the packet
Returns
Error code

Definition at line 190 of file ndp.c.

◆ ndpInit()

error_t ndpInit ( NetInterface interface)

Neighbor cache initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 66 of file ndp.c.

◆ ndpLinkChangeEvent()

void ndpLinkChangeEvent ( NetInterface interface)

Callback function for link change event.

Parameters
[in]interfaceUnderlying network interface

Definition at line 364 of file ndp.c.

◆ ndpProcessNeighborAdv()

void ndpProcessNeighborAdv ( NetInterface interface,
Ipv6PseudoHeader pseudoHeader,
const NetBuffer buffer,
size_t  offset,
uint8_t  hopLimit 
)

Neighbor Advertisement message processing.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderIPv6 pseudo header
[in]bufferMulti-part buffer containing the Neighbor Advertisement message
[in]offsetOffset to the first byte of the message
[in]hopLimitHop Limit field from IPv6 header

Definition at line 917 of file ndp.c.

◆ ndpProcessNeighborSol()

void ndpProcessNeighborSol ( NetInterface interface,
Ipv6PseudoHeader pseudoHeader,
const NetBuffer buffer,
size_t  offset,
uint8_t  hopLimit 
)

Neighbor Solicitation message processing.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderIPv6 pseudo header
[in]bufferMulti-part buffer containing the Neighbor Solicitation message
[in]offsetOffset to the first byte of the message
[in]hopLimitHop Limit field from IPv6 header

Definition at line 683 of file ndp.c.

◆ ndpProcessRedirect()

void ndpProcessRedirect ( NetInterface interface,
Ipv6PseudoHeader pseudoHeader,
const NetBuffer buffer,
size_t  offset,
uint8_t  hopLimit 
)

Redirect message processing.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderIPv6 pseudo header
[in]bufferMulti-part buffer containing the Redirect message
[in]offsetOffset to the first byte of the message
[in]hopLimitHop Limit field from IPv6 header

Definition at line 1164 of file ndp.c.

◆ ndpProcessRouterAdv()

void ndpProcessRouterAdv ( NetInterface interface,
Ipv6PseudoHeader pseudoHeader,
const NetBuffer buffer,
size_t  offset,
uint8_t  hopLimit 
)

Router Advertisement message processing.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderIPv6 pseudo header
[in]bufferMulti-part buffer containing the Router Advertisement message
[in]offsetOffset to the first byte of the message
[in]hopLimitHop Limit field from IPv6 header

Definition at line 401 of file ndp.c.

◆ ndpResolve()

error_t ndpResolve ( NetInterface interface,
const Ipv6Addr ipAddr,
MacAddr macAddr 
)

Address resolution using Neighbor Discovery protocol.

Parameters
[in]interfaceUnderlying network interface
[in]ipAddrIPv6 address
[in]macAddrPhysical address matching the specified IPv6 address
Returns
Error code

Definition at line 98 of file ndp.c.

◆ ndpSendNeighborAdv()

error_t ndpSendNeighborAdv ( NetInterface interface,
const Ipv6Addr targetIpAddr,
const Ipv6Addr destIpAddr 
)

Send a Neighbor Advertisement message.

Parameters
[in]interfaceUnderlying network interface
[in]targetIpAddrTarget IPv6 address
[in]destIpAddrDestination IPv6 address
Returns
Error code

Definition at line 1591 of file ndp.c.

◆ ndpSendNeighborSol()

error_t ndpSendNeighborSol ( NetInterface interface,
const Ipv6Addr targetIpAddr,
bool_t  multicast 
)

Send a Neighbor Solicitation message.

Parameters
[in]interfaceUnderlying network interface
[in]targetIpAddrTarget IPv6 address
[in]multicastUnicast or unicast Neighbor Solicitation message
Returns
Error code

Definition at line 1471 of file ndp.c.

◆ ndpSendRedirect()

error_t ndpSendRedirect ( NetInterface interface,
const Ipv6Addr targetAddr,
const NetBuffer ipPacket,
size_t  ipPacketOffset 
)

Send a Redirect message.

Parameters
[in]interfaceUnderlying network interface
[in]targetAddrIPv6 address that is a better first hop to use for the destination address
[in]ipPacketMulti-part buffer that holds the IPv6 packet that triggered the sending of the Redirect
[in]ipPacketOffsetOffset to the first byte of the IPv6 packet
Returns
Error code

Definition at line 1733 of file ndp.c.

◆ ndpSendRouterSol()

error_t ndpSendRouterSol ( NetInterface interface)

Send a Router Solicitation message.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 1364 of file ndp.c.

◆ ndpTick()

void ndpTick ( NetInterface interface)

NDP timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 274 of file ndp.c.

Variable Documentation

◆ a

uint8_t a

Definition at line 407 of file ndp.h.

◆ address

Ipv6Addr address[]

Definition at line 477 of file ndp.h.

◆ c

uint8_t c

Definition at line 510 of file ndp.h.

◆ checksum

uint16_t checksum

Definition at line 270 of file ndp.h.

◆ cid

uint8_t cid

Definition at line 509 of file ndp.h.

◆ code

uint8_t code

Definition at line 269 of file ndp.h.

◆ contextLength

uint8_t contextLength

Definition at line 503 of file ndp.h.

◆ contextPrefix

Ipv6Addr contextPrefix

Definition at line 515 of file ndp.h.

◆ curHopLimit

uint8_t curHopLimit

Definition at line 285 of file ndp.h.

◆ destAddr

Ipv6Addr destAddr

Definition at line 361 of file ndp.h.

◆ domainNames

uint8_t domainNames[]

Definition at line 491 of file ndp.h.

◆ h

uint8_t h

Definition at line 297 of file ndp.h.

◆ ipPacket

uint8_t ipPacket[]

Definition at line 427 of file ndp.h.

◆ l

uint8_t l

Definition at line 408 of file ndp.h.

◆ length

uint8_t length

Definition at line 373 of file ndp.h.

◆ lifetime

uint32_t lifetime

Definition at line 476 of file ndp.h.

◆ linkLayerAddr

MacAddr linkLayerAddr

Definition at line 386 of file ndp.h.

◆ m

uint8_t m

Definition at line 299 of file ndp.h.

◆ mtu

uint32_t mtu

Definition at line 440 of file ndp.h.

◆ ndpTickCounter

systime_t ndpTickCounter

Definition at line 57 of file ndp.c.

◆ o

uint32_t o

Definition at line 298 of file ndp.h.

◆ options

uint8_t options[]

Definition at line 272 of file ndp.h.

◆ p

uint8_t p

Definition at line 295 of file ndp.h.

◆ preferredLifetime

uint32_t preferredLifetime

Definition at line 411 of file ndp.h.

◆ prefix

Ipv6Addr prefix

Definition at line 413 of file ndp.h.

◆ prefixLength

uint8_t prefixLength

Definition at line 398 of file ndp.h.

◆ prf

uint8_t prf

Definition at line 296 of file ndp.h.

◆ r

uint8_t r

Definition at line 342 of file ndp.h.

◆ reachableTime

uint32_t reachableTime

Definition at line 302 of file ndp.h.

◆ reserved

uint16_t reserved

Definition at line 271 of file ndp.h.

◆ reserved1

uint8_t reserved1

Definition at line 339 of file ndp.h.

◆ reserved2

uint16_t reserved2

Definition at line 343 of file ndp.h.

◆ retransTimer

uint32_t retransTimer

Definition at line 303 of file ndp.h.

◆ routeLifetime

uint32_t routeLifetime

Definition at line 462 of file ndp.h.

◆ routerLifetime

uint16_t routerLifetime

Definition at line 301 of file ndp.h.

◆ s

uint32_t s

Definition at line 341 of file ndp.h.

◆ targetAddr

Ipv6Addr targetAddr

Definition at line 318 of file ndp.h.

◆ type

uint8_t type

Definition at line 268 of file ndp.h.

◆ validLifetime

uint16_t validLifetime

Definition at line 410 of file ndp.h.

◆ value

uint8_t value[]

Definition at line 374 of file ndp.h.