Loading...
Searching...
No Matches
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
9#pragma once
10
27
28#include "compiler_hints.h"
33#include "net/gnrc/netif.h"
34#include "net/gnrc/pkt.h"
35#include "net/icmpv6.h"
36#include "net/ipv6/addr.h"
37#include "net/ipv6/hdr.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
56#define GNRC_IPV6_NIB_SND_UC_NS (0x4fc0U)
57
67#define GNRC_IPV6_NIB_SND_MC_NS (0x4fc1U)
68
77#define GNRC_IPV6_NIB_SND_NA (0x4fc2U)
78
87#define GNRC_IPV6_NIB_SEARCH_RTR (0x4fc3U)
88
99#define GNRC_IPV6_NIB_REPLY_RS (0x4fc5U)
100
111#define GNRC_IPV6_NIB_SND_MC_RA (0x4fc6U)
112
122#define GNRC_IPV6_NIB_REACH_TIMEOUT (0x4fc7U)
123
133#define GNRC_IPV6_NIB_DELAY_TIMEOUT (0x4fc8U)
134
144#define GNRC_IPV6_NIB_ADDR_REG_TIMEOUT (0x4fc9U)
145
155#define GNRC_IPV6_NIB_ABR_TIMEOUT (0x4fcbU)
156
163#define GNRC_IPV6_NIB_PFX_TIMEOUT (0x4fccU)
164
171#define GNRC_IPV6_NIB_RTR_TIMEOUT (0x4fcdU)
172
182#define GNRC_IPV6_NIB_RECALC_REACH_TIME (0x4fceU)
183
193#define GNRC_IPV6_NIB_REREG_ADDRESS (0x4fcfU)
194
203#define GNRC_IPV6_NIB_ROUTE_TIMEOUT (0x4fd0U)
204
213#define GNRC_IPV6_NIB_DAD (0x4fd1U)
214
223#define GNRC_IPV6_NIB_VALID_ADDR (0x4fd2U)
224
234#define GNRC_IPV6_NIB_RDNSS_TIMEOUT (0x4fd3U)
235
239#define GNRC_IPV6_NIB_IFACE_UP (0x4fd4U)
240
244#define GNRC_IPV6_NIB_IFACE_DOWN (0x4fd5U)
246
251enum {
265
277
299};
300
305
314
323
333void gnrc_ipv6_nib_iface_down(gnrc_netif_t *netif, bool send_final_ra);
334
341
348
371 gnrc_netif_t *netif, gnrc_pktsnip_t *pkt,
372 gnrc_ipv6_nib_nc_t *nce);
373
414ACCESS(read_only, 3, 4)
416 const icmpv6_hdr_t *icmpv6, size_t icmpv6_len);
417
425void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type);
426
427#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ROUTER) || defined(DOXYGEN)
438#else
442#define gnrc_ipv6_nib_change_rtr_adv_iface(netif, enable) \
443 (void)netif; (void)enable
444#endif
445
458
459#ifdef __cplusplus
460}
461#endif
462
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:252
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC
neighbor state change
Definition nib.h:298
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RN
route notification
Definition nib.h:276
@ GNRC_IPV6_NIB_ROUTE_INFO_TYPE_RRQ
reactive routing query
Definition nib.h:264
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:143
Representation of a network interface.
Definition netif.h:140
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:67