nib.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
25 #ifndef NET_GNRC_IPV6_NIB_H
26 #define NET_GNRC_IPV6_NIB_H
27 
28 #include "net/gnrc/ipv6/nib/abr.h"
29 #include "net/gnrc/ipv6/nib/ft.h"
30 #include "net/gnrc/ipv6/nib/nc.h"
31 #include "net/gnrc/ipv6/nib/pl.h"
32 
33 #include "net/icmpv6.h"
34 #include "net/ipv6/addr.h"
35 #include "net/ipv6/hdr.h"
36 #include "net/gnrc/ipv6/nib/nc.h"
37 #include "net/gnrc/netif.h"
38 #include "net/gnrc/pkt.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
57 #define GNRC_IPV6_NIB_SND_UC_NS (0x4fc0U)
58 
68 #define GNRC_IPV6_NIB_SND_MC_NS (0x4fc1U)
69 
78 #define GNRC_IPV6_NIB_SND_NA (0x4fc2U)
79 
88 #define GNRC_IPV6_NIB_SEARCH_RTR (0x4fc3U)
89 
100 #define GNRC_IPV6_NIB_REPLY_RS (0x4fc5U)
101 
112 #define GNRC_IPV6_NIB_SND_MC_RA (0x4fc6U)
113 
123 #define GNRC_IPV6_NIB_REACH_TIMEOUT (0x4fc7U)
124 
134 #define GNRC_IPV6_NIB_DELAY_TIMEOUT (0x4fc8U)
135 
145 #define GNRC_IPV6_NIB_ADDR_REG_TIMEOUT (0x4fc9U)
146 
156 #define GNRC_IPV6_NIB_ABR_TIMEOUT (0x4fcbU)
157 
164 #define GNRC_IPV6_NIB_PFX_TIMEOUT (0x4fccU)
165 
172 #define GNRC_IPV6_NIB_RTR_TIMEOUT (0x4fcdU)
173 
183 #define GNRC_IPV6_NIB_RECALC_REACH_TIME (0x4fceU)
184 
194 #define GNRC_IPV6_NIB_REREG_ADDRESS (0x4fcfU)
195 
204 #define GNRC_IPV6_NIB_ROUTE_TIMEOUT (0x4fd0U)
205 
214 #define GNRC_IPV6_NIB_DAD (0x4fd1U)
215 
224 #define GNRC_IPV6_NIB_VALID_ADDR (0x4fd2U)
225 
235 #define GNRC_IPV6_NIB_RDNSS_TIMEOUT (0x4fd3U)
236 
240 #define GNRC_IPV6_NIB_IFACE_UP (0x4fd4U)
241 
245 #define GNRC_IPV6_NIB_IFACE_DOWN (0x4fd5U)
252 enum {
266 
278 
300 };
301 
306 
315 
324 
334 void gnrc_ipv6_nib_iface_down(gnrc_netif_t *netif, bool send_final_ra);
335 
358  gnrc_netif_t *netif, gnrc_pktsnip_t *pkt,
359  gnrc_ipv6_nib_nc_t *nce);
360 
402  const icmpv6_hdr_t *icmpv6, size_t icmpv6_len);
403 
411 void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type);
412 
413 #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER) || defined(DOXYGEN)
424 #else
428 #define gnrc_ipv6_nib_change_rtr_adv_iface(netif, enable) \
429  (void)netif; (void)enable
430 #endif
431 
432 #ifdef __cplusplus
433 }
434 #endif
435 
436 #endif /* NET_GNRC_IPV6_NIB_H */
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:253
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC
neighbor state change
Definition: nib.h:299
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RN
route notification
Definition: nib.h:277
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RRQ
reactive routing query
Definition: nib.h:265
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:142
Representation of a network interface.
Definition: netif.h:135
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:108
General ICMPv6 message format.
Definition: icmpv6.h:138
Data type to represent an IPv6 packet header.
Definition: hdr.h:66
Data type to represent an IPv6 address.
Definition: addr.h:72