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 
211 enum {
225 
237 
258 };
259 
263 void gnrc_ipv6_nib_init(void);
264 
273 
296  gnrc_netif_t *netif, gnrc_pktsnip_t *pkt,
297  gnrc_ipv6_nib_nc_t *nce);
298 
339 void gnrc_ipv6_nib_handle_pkt(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
340  const icmpv6_hdr_t *icmpv6, size_t icmpv6_len);
341 
349 void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type);
350 
351 #if GNRC_IPV6_NIB_CONF_ROUTER || defined(DOXYGEN)
352 
361 void gnrc_ipv6_nib_change_rtr_adv_iface(gnrc_netif_t *netif, bool enable);
362 #else
363 
366 #define gnrc_ipv6_nib_change_rtr_adv_iface(netif, enable) \
367  (void)netif; (void)enable
368 #endif
369 
370 #ifdef __cplusplus
371 }
372 #endif
373 
374 #endif /* NET_GNRC_IPV6_NIB_H */
375 
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.
Definitions for IPv6 addresses.
General definitions for network packets and their helper functions.
Forwarding table definitions.
Data type to represent an IPv6 packet header.
Definition: ipv6/hdr.h:68
void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type)
Handles a timer event.
Neighbor cache entry view on NIB.
Definition: nc.h:142
void gnrc_ipv6_nib_init(void)
Initialize NIB.
Prefix list defintions.
reactive routing query
Definition: nib.h:224
Neighbor cache definitions.
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.
IPv6 header type and helper function definitions.
neighbor state change
Definition: nib.h:257
Definition for GNRC's network interfaces.
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.
Representation of a network interface.
Definition: netif.h:61
Authoritative border router list definitions.
General ICMPv6 message format.
Definition: icmpv6.h:141
ICMPv6 type and function definitions.
Type to represent parts (either headers or payload) of a packet, called snips.
route notification
Definition: nib.h:236
Data type to represent an IPv6 address.
Definition: ipv6/addr.h:74
void gnrc_ipv6_nib_init_iface(gnrc_netif_t *netif)
Adds an interface to be managed by the NIB.