Loading...
Searching...
No Matches
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
24
25#include "compiler_hints.h"
30#include "net/gnrc/netif.h"
31#include "net/gnrc/pkt.h"
32#include "net/icmpv6.h"
33#include "net/ipv6/addr.h"
34#include "net/ipv6/hdr.h"
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
53#define GNRC_IPV6_NIB_SND_UC_NS (0x4fc0U)
54
64#define GNRC_IPV6_NIB_SND_MC_NS (0x4fc1U)
65
74#define GNRC_IPV6_NIB_SND_NA (0x4fc2U)
75
84#define GNRC_IPV6_NIB_SEARCH_RTR (0x4fc3U)
85
96#define GNRC_IPV6_NIB_REPLY_RS (0x4fc5U)
97
108#define GNRC_IPV6_NIB_SND_MC_RA (0x4fc6U)
109
119#define GNRC_IPV6_NIB_REACH_TIMEOUT (0x4fc7U)
120
130#define GNRC_IPV6_NIB_DELAY_TIMEOUT (0x4fc8U)
131
141#define GNRC_IPV6_NIB_ADDR_REG_TIMEOUT (0x4fc9U)
142
152#define GNRC_IPV6_NIB_ABR_TIMEOUT (0x4fcbU)
153
160#define GNRC_IPV6_NIB_PFX_TIMEOUT (0x4fccU)
161
168#define GNRC_IPV6_NIB_RTR_TIMEOUT (0x4fcdU)
169
179#define GNRC_IPV6_NIB_RECALC_REACH_TIME (0x4fceU)
180
190#define GNRC_IPV6_NIB_REREG_ADDRESS (0x4fcfU)
191
200#define GNRC_IPV6_NIB_ROUTE_TIMEOUT (0x4fd0U)
201
210#define GNRC_IPV6_NIB_DAD (0x4fd1U)
211
220#define GNRC_IPV6_NIB_VALID_ADDR (0x4fd2U)
221
231#define GNRC_IPV6_NIB_RDNSS_TIMEOUT (0x4fd3U)
232
236#define GNRC_IPV6_NIB_IFACE_UP (0x4fd4U)
237
241#define GNRC_IPV6_NIB_IFACE_DOWN (0x4fd5U)
243
248enum {
262
274
296};
297
302
311
320
330void gnrc_ipv6_nib_iface_down(gnrc_netif_t *netif, bool send_final_ra);
331
338
345
368 gnrc_netif_t *netif, gnrc_pktsnip_t *pkt,
369 gnrc_ipv6_nib_nc_t *nce);
370
411ACCESS(read_only, 3, 4)
413 const icmpv6_hdr_t *icmpv6, size_t icmpv6_len);
414
422void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type);
423
424#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER) || defined(DOXYGEN)
435#else
439#define gnrc_ipv6_nib_change_rtr_adv_iface(netif, enable) \
440 (void)netif; (void)enable
441#endif
442
455
456#ifdef __cplusplus
457}
458#endif
459
Authoritative border router list definitions.
Common macros and compiler attributes/pragmas configuration.
#define ACCESS(mode, ptr_idx, size_idx)
Emit an attribute (if supported by the compiler) that declares how a function will access its paramet...
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.
bool gnrc_ipv6_nib_dyn_lladdr_get(gnrc_netif_t *netif, ipv6_addr_t *lladdr)
This function is implemented by the application, it assigns a link-local address to a specific networ...
void gnrc_ipv6_nib_start_search_rtr(gnrc_netif_t *netif)
Start sending periodic router solicitations on an interface.
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_stop_search_rtr(gnrc_netif_t *netif)
Stop sending periodic router solicitations on an interface.
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:249
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC
neighbor state change
Definition nib.h:295
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RN
route notification
Definition nib.h:273
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RRQ
reactive routing query
Definition nib.h:261
struct gnrc_pktsnip gnrc_pktsnip_t
Type to represent parts (either headers or payload) of a packet, called snips.
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:140
Representation of a network interface.
Definition netif.h:137
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