The friendly Operating System for the Internet of Things

Definitions for GNRC's IPv6 Neighbor Discovery. More...

Detailed Description

#include <inttypes.h>
#include <stdlib.h>
#include "byteorder.h"
#include "net/ndp.h"
#include "net/gnrc/pkt.h"
#include "net/gnrc/icmpv6.h"
#include "net/ipv6/addr.h"
#include "net/gnrc/ipv6/nc.h"
#include "net/gnrc/ipv6/netif.h"
#include "net/gnrc/ndp/host.h"
#include "net/gnrc/ndp/internal.h"
#include "net/gnrc/ndp/router.h"
#include "net/gnrc/ndp/node.h"
+ Include dependency graph for gnrc/ndp.h:

Go to the source code of this file.


#define GNRC_NDP_MSG_RTR_TIMEOUT   (0x0210)
 Message type for router timeouts.
#define GNRC_NDP_MSG_ADDR_TIMEOUT   (0x0211)
 Message type for address timeouts.
#define GNRC_NDP_MSG_NBR_SOL_RETRANS   (0x0212)
 Message type for multicast neighbor solicitation retransmissions.
#define GNRC_NDP_MSG_RTR_ADV_RETRANS   (0x0213)
 Message type for periodic router advertisements.
#define GNRC_NDP_MSG_RTR_ADV_DELAY   (0x0214)
 Message type for delayed router advertisements.
 Message type for delayed router advertisements in a 6LoWPAN 6LoWPAN needs a special handling, because router advertisements are only sent after a short randomized delay, but not periodically. More...
#define GNRC_NDP_MSG_RTR_SOL_RETRANS   (0x0216)
 Message type for periodic router solicitations.
#define GNRC_NDP_MSG_NC_STATE_TIMEOUT   (0x0217)
 Message type for neighbor cache state timeouts.
Host constants
 Upper bound for randomised delay in seconds for initial router solicitation transmissions.
 Interval in seconds between initial router solicitation transmissions.
 Maximum number of initial router solicitation transmissions.
Node constants
 Maximum number of unanswered multicast neighbor solicitations before address resolution is considered failed.
 Maximum number of unanswered unicast neighbor solicitations before an address is considered unreachable.
 Upper bound of randomized delay in seconds for a solicited neighbor advertisement transmission for an anycast target.
 Maximum number of unsolicited neighbor advertisements before on link-layer address change.
 Base value in mircoseconds for computing randomised reachable time.
 Time in mircoseconds between retransmissions of neighbor solicitations to a neighbor.
 Delay in seconds for neighbor cache entry between entering DELAY state and entering PROBE state if no reachability confirmation has been received.
#define GNRC_NDP_MIN_RAND   (5U)
 Lower bound for randomised reachable time calculation.
#define GNRC_NDP_MAX_RAND   (15U)
 Upper bound for randomised reachable time calculation.
Router constants
 Initial router advertisement interval in seconds.
 Maximum number of initial router advertisement transmissions.
 Maximum number of final router advertisement transmissions.
 Minimum delay in seconds between router advertisement transmissions.
 Upper bound for randomised delay in microseconds between router solicitation reception and responding router advertisement transmission.


void gnrc_ndp_nbr_sol_handle (kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t *ipv6, ndp_nbr_sol_t *nbr_sol, size_t icmpv6_size)
 Handles received neighbor solicitations. More...
void gnrc_ndp_nbr_adv_handle (kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t *ipv6, ndp_nbr_adv_t *nbr_adv, size_t icmpv6_size)
 Handles received neighbor advertisements. More...
void gnrc_ndp_rtr_sol_handle (kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t *ipv6, ndp_rtr_sol_t *rtr_sol, size_t icmpv6_size)
 Handles received router solicitations. More...
void gnrc_ndp_rtr_adv_handle (kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t *ipv6, ndp_rtr_adv_t *rtr_adv, size_t icmpv6_size)
 Handles received router advertisements. More...
void gnrc_ndp_retrans_nbr_sol (gnrc_ipv6_nc_t *nc_entry)
 Retransmits a multicast neighbor solicitation for an incomplete or probing neighbor cache entry nc_entry, if nc_entry::probes_remaining > 0. More...
void gnrc_ndp_state_timeout (gnrc_ipv6_nc_t *nc_entry)
 Event handler for a neighbor cache state timeout. More...
void gnrc_ndp_netif_add (gnrc_ipv6_netif_t *iface)
 NDP interface initialization. More...
void gnrc_ndp_netif_remove (gnrc_ipv6_netif_t *iface)
 NDP interface removal. More...
kernel_pid_t gnrc_ndp_next_hop_l2addr (uint8_t *l2addr, uint8_t *l2addr_len, kernel_pid_t iface, ipv6_addr_t *dst, gnrc_pktsnip_t *pkt)
 Get link-layer address and interface for next hop to destination IPv6 address. More...
gnrc_pktsnip_tgnrc_ndp_nbr_sol_build (ipv6_addr_t *tgt, gnrc_pktsnip_t *options)
 Builds a neighbor solicitation message for sending. More...
gnrc_pktsnip_tgnrc_ndp_nbr_adv_build (uint8_t flags, ipv6_addr_t *tgt, gnrc_pktsnip_t *options)
 Builds a neighbor advertisement message for sending. More...
gnrc_pktsnip_tgnrc_ndp_rtr_sol_build (gnrc_pktsnip_t *options)
 Builds a router solicitation message for sending. More...
gnrc_pktsnip_tgnrc_ndp_rtr_adv_build (uint8_t cur_hl, uint8_t flags, uint16_t ltime, uint32_t reach_time, uint32_t retrans_timer, gnrc_pktsnip_t *options)
 Builds a router advertisement message for sending. More...
gnrc_pktsnip_tgnrc_ndp_opt_build (uint8_t type, size_t size, gnrc_pktsnip_t *next)
 Builds a generic NDP option. More...
gnrc_pktsnip_tgnrc_ndp_opt_sl2a_build (const uint8_t *l2addr, uint8_t l2addr_len, gnrc_pktsnip_t *next)
 Builds the source link-layer address option. More...
gnrc_pktsnip_tgnrc_ndp_opt_tl2a_build (const uint8_t *l2addr, uint8_t l2addr_len, gnrc_pktsnip_t *next)
 Builds the target link-layer address option. More...
gnrc_pktsnip_tgnrc_ndp_opt_pi_build (uint8_t prefix_len, uint8_t flags, uint32_t valid_ltime, uint32_t pref_ltime, ipv6_addr_t *prefix, gnrc_pktsnip_t *next)
 Builds the prefix information option. More...
gnrc_pktsnip_tgnrc_ndp_opt_mtu_build (uint32_t mtu, gnrc_pktsnip_t *next)
 Builds the MTU option. More...