nib.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
25 #include "net/gnrc/ipv6/nib/abr.h"
26 #include "net/gnrc/ipv6/nib/ft.h"
27 #include "net/gnrc/ipv6/nib/nc.h"
28 #include "net/gnrc/ipv6/nib/pl.h"
29 
30 #include "net/icmpv6.h"
31 #include "net/ipv6/addr.h"
32 #include "net/ipv6/hdr.h"
33 #include "net/gnrc/ipv6/nib/nc.h"
34 #include "net/gnrc/netif.h"
35 #include "net/gnrc/pkt.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
54 #define GNRC_IPV6_NIB_SND_UC_NS (0x4fc0U)
55 
65 #define GNRC_IPV6_NIB_SND_MC_NS (0x4fc1U)
66 
75 #define GNRC_IPV6_NIB_SND_NA (0x4fc2U)
76 
85 #define GNRC_IPV6_NIB_SEARCH_RTR (0x4fc3U)
86 
97 #define GNRC_IPV6_NIB_REPLY_RS (0x4fc5U)
98 
109 #define GNRC_IPV6_NIB_SND_MC_RA (0x4fc6U)
110 
120 #define GNRC_IPV6_NIB_REACH_TIMEOUT (0x4fc7U)
121 
131 #define GNRC_IPV6_NIB_DELAY_TIMEOUT (0x4fc8U)
132 
142 #define GNRC_IPV6_NIB_ADDR_REG_TIMEOUT (0x4fc9U)
143 
153 #define GNRC_IPV6_NIB_ABR_TIMEOUT (0x4fcbU)
154 
161 #define GNRC_IPV6_NIB_PFX_TIMEOUT (0x4fccU)
162 
169 #define GNRC_IPV6_NIB_RTR_TIMEOUT (0x4fcdU)
170 
180 #define GNRC_IPV6_NIB_RECALC_REACH_TIME (0x4fceU)
181 
191 #define GNRC_IPV6_NIB_REREG_ADDRESS (0x4fcfU)
192 
201 #define GNRC_IPV6_NIB_ROUTE_TIMEOUT (0x4fd0U)
202 
211 #define GNRC_IPV6_NIB_DAD (0x4fd1U)
212 
221 #define GNRC_IPV6_NIB_VALID_ADDR (0x4fd2U)
222 
232 #define GNRC_IPV6_NIB_RDNSS_TIMEOUT (0x4fd3U)
233 
237 #define GNRC_IPV6_NIB_IFACE_UP (0x4fd4U)
238 
242 #define GNRC_IPV6_NIB_IFACE_DOWN (0x4fd5U)
249 enum {
263 
275 
297 };
298 
303 
312 
321 
331 void gnrc_ipv6_nib_iface_down(gnrc_netif_t *netif, bool send_final_ra);
332 
355  gnrc_netif_t *netif, gnrc_pktsnip_t *pkt,
356  gnrc_ipv6_nib_nc_t *nce);
357 
399  const icmpv6_hdr_t *icmpv6, size_t icmpv6_len);
400 
408 void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type);
409 
410 #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER) || defined(DOXYGEN)
421 #else
425 #define gnrc_ipv6_nib_change_rtr_adv_iface(netif, enable) \
426  (void)netif; (void)enable
427 #endif
428 
429 #ifdef __cplusplus
430 }
431 #endif
432 
Authoritative border router list definitions.
Forwarding table definitions.
Definition for GNRC's network interfaces.
void gnrc_ipv6_nib_iface_up(gnrc_netif_t *netif)
Call bring-up functions when the interface comes online.
int gnrc_ipv6_nib_get_next_hop_l2addr(const ipv6_addr_t *dst, gnrc_netif_t *netif, gnrc_pktsnip_t *pkt, gnrc_ipv6_nib_nc_t *nce)
Gets link-layer address of next hop to a destination address.
void gnrc_ipv6_nib_handle_pkt(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6, const icmpv6_hdr_t *icmpv6, size_t icmpv6_len)
Handles a received ICMPv6 packet.
void gnrc_ipv6_nib_iface_down(gnrc_netif_t *netif, bool send_final_ra)
Clean up when the interface goes offline.
void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type)
Handles a timer event.
void gnrc_ipv6_nib_init(void)
Initialize NIB.
void gnrc_ipv6_nib_change_rtr_adv_iface(gnrc_netif_t *netif, bool enable)
Changes the state if an interface advertises itself as a router or not.
void gnrc_ipv6_nib_init_iface(gnrc_netif_t *netif)
Adds an interface to be managed by the NIB.
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_UNDEF
undefined
Definition: nib.h:250
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC
neighbor state change
Definition: nib.h:296
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RN
route notification
Definition: nib.h:274
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RRQ
reactive routing query
Definition: nib.h:262
ICMPv6 type and function definitions.
Definitions for IPv6 addresses.
Neighbor cache definitions.
General definitions for network packets and their helper functions.
IPv6 header type and helper function definitions.
Prefix list definitions.
Neighbor cache entry view on NIB.
Definition: nc.h:139
Representation of a network interface.
Definition: netif.h:129
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:105
General ICMPv6 message format.
Definition: icmpv6.h:135
Data type to represent an IPv6 packet header.
Definition: hdr.h:63
Data type to represent an IPv6 address.
Definition: addr.h:64