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 
242 enum {
256 
268 
290 };
291 
295 void gnrc_ipv6_nib_init(void);
296 
305 
328  gnrc_netif_t *netif, gnrc_pktsnip_t *pkt,
329  gnrc_ipv6_nib_nc_t *nce);
330 
371 void gnrc_ipv6_nib_handle_pkt(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
372  const icmpv6_hdr_t *icmpv6, size_t icmpv6_len);
373 
381 void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type);
382 
383 #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER) || defined(DOXYGEN)
384 
393 void gnrc_ipv6_nib_change_rtr_adv_iface(gnrc_netif_t *netif, bool enable);
394 #else
395 
398 #define gnrc_ipv6_nib_change_rtr_adv_iface(netif, enable) \
399  (void)netif; (void)enable
400 #endif
401 
402 #ifdef __cplusplus
403 }
404 #endif
405 
406 #endif /* NET_GNRC_IPV6_NIB_H */
407 
ft.h
Forwarding table definitions.
hdr.h
IPv6 header type and helper function definitions.
GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC
neighbor state change
Definition: nib.h:289
ipv6_addr_t
Data type to represent an IPv6 address.
Definition: addr.h:74
addr.h
Definitions for IPv6 addresses.
gnrc_ipv6_nib_get_next_hop_l2addr
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.
icmpv6.h
ICMPv6 type and function definitions.
GNRC_IPV6_NIB_ROUTE_INFO_TYPE_UNDEF
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_UNDEF
undefined
Definition: nib.h:243
GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RRQ
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RRQ
reactive routing query
Definition: nib.h:255
gnrc_netif_t
Representation of a network interface.
Definition: netif.h:115
gnrc_ipv6_nib_nc_t
Neighbor cache entry view on NIB.
Definition: nc.h:142
pkt.h
General definitions for network packets and their helper functions.
gnrc_ipv6_nib_handle_timer_event
void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type)
Handles a timer event.
icmpv6_hdr_t
General ICMPv6 message format.
Definition: icmpv6.h:138
gnrc_ipv6_nib_init
void gnrc_ipv6_nib_init(void)
Initialize NIB.
abr.h
Authoritative border router list definitions.
pl.h
Prefix list definitions.
gnrc_ipv6_nib_change_rtr_adv_iface
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.
gnrc_ipv6_nib_init_iface
void gnrc_ipv6_nib_init_iface(gnrc_netif_t *netif)
Adds an interface to be managed by the NIB.
gnrc_ipv6_nib_handle_pkt
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.
netif.h
Definition for GNRC's network interfaces.
nc.h
Neighbor cache definitions.
ipv6_hdr_t
Data type to represent an IPv6 packet header.
Definition: hdr.h:66
GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RN
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RN
route notification
Definition: nib.h:267
gnrc_pktsnip
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:108