gnrc/netif/ipv6.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 
18 #ifndef NET_GNRC_NETIF_IPV6_H
19 #define NET_GNRC_NETIF_IPV6_H
20 
21 #include <assert.h>
22 
23 #include "evtimer_msg.h"
24 #include "net/ipv6/addr.h"
25 #ifdef MODULE_GNRC_IPV6_NIB
26 #include "net/gnrc/ipv6/nib/conf.h"
27 #endif
28 #include "net/gnrc/netapi.h"
29 #include "net/gnrc/netif/conf.h"
30 #ifdef MODULE_NETSTATS_IPV6
31 #include "net/netstats.h"
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
46 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_MASK (0x1fU)
47 
55 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_TENTATIVE (0x07U)
56 
60 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_DEPRECATED (0x08U)
61 
65 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_VALID (0x10U)
66 
70 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_ANYCAST (0x20U)
71 
78 typedef struct {
86  uint8_t addrs_flags[GNRC_NETIF_IPV6_ADDRS_NUMOF];
87 
94 
101 #ifdef MODULE_NETSTATS_IPV6
102 
107  netstats_t stats;
108 #endif
109 #if defined(MODULE_GNRC_IPV6_NIB) || DOXYGEN
110 #if GNRC_IPV6_NIB_CONF_ROUTER || DOXYGEN
111 
126  void (*route_info_cb)(unsigned type, const ipv6_addr_t *ctx_addr,
127  const void *ctx);
136 #endif /* GNRC_IPV6_NIB_CONF_ROUTER */
137 #if GNRC_IPV6_NIB_CONF_ARSM || DOXYGEN
138 
146 #endif /* GNRC_IPV6_NIB_CONF_ARSM */
147 
154 #if GNRC_IPV6_NIB_CONF_6LN || GNRC_IPV6_NIB_CONF_SLAAC || DOXYGEN
155 
166 #endif
167 
168 #if GNRC_IPV6_NIB_CONF_ROUTER || DOXYGEN
169 
177  uint32_t last_ra;
178 #endif /* GNRC_IPV6_NIB_CONF_ROUTER */
179 #if GNRC_IPV6_NIB_CONF_ARSM || defined(DOXYGEN)
180 
189  uint32_t reach_time_base;
190 
198  uint32_t reach_time;
199 #endif /* GNRC_IPV6_NIB_CONF_ARSM */
200 
206  uint32_t retrans_time;
207 #if GNRC_IPV6_NIB_CONF_ROUTER || DOXYGEN
208 
215  uint16_t rtr_ltime;
227  uint8_t ra_sent;
228 #endif
229 
235  uint8_t rs_sent;
242  uint8_t na_sent;
243 #endif /* MODULE_GNRC_IPV6_NIB */
244 
250  uint8_t aac_mode;
251 
257  uint16_t mtu;
259 
260 #ifdef __cplusplus
261 }
262 #endif
263 
264 #endif /* NET_GNRC_NETIF_IPV6_H */
265 
uint32_t reach_time
Reachable time (in ms)
Definition of net statistics.
#define GNRC_NETIF_IPV6_ADDRS_NUMOF
Maximum number of unicast and anycast addresses per interface.
Definition: netif/conf.h:80
evtimer_msg_event_t recalc_reach_time
Event for GNRC_IPV6_NIB_RECALC_REACH_TIME.
uint8_t rs_sent
number of unsolicited router solicitations scheduled
Definitions for IPv6 addresses.
Configuration macros for Network interface API.
Generic interface to communicate with GNRC modules.
evtimer_msg_event_t search_rtr
Event for GNRC_IPV6_NIB_SEARCH_RTR.
Global statistics struct.
uint32_t retrans_time
Retransmission time and advertised retransmission time (in ms)
uint32_t last_ra
Timestamp in milliseconds of last unsolicited router advertisement.
POSIX.1-2008 compliant version of the assert macro.
IPv6 component for gnrc_netif_t.
evtimer_msg_event_t snd_mc_ra
Event for GNRC_IPV6_NIB_SND_MC_RA.
Configuration macro definitions for neighbor information base.
IPC-based evtimer definitions.
uint8_t aac_mode
IPv6 auto-address configuration mode.
#define GNRC_NETIF_IPV6_GROUPS_NUMOF
Maximum number of multicast groups per interface.
Definition: netif/conf.h:90
uint32_t reach_time_base
Base for random reachable time calculation and advertised reachable time in ms (if GNRC_NETIF_FLAGS_I...
uint16_t mtu
Maximum transmission unit (MTU) for IPv6 packets.
uint8_t ra_sent
number of unsolicited router advertisements sent
uint8_t na_sent
number of unsolicited neighbor advertisements scheduled
IPC-message event.
Definition: evtimer_msg.h:40
Data type to represent an IPv6 address.
Definition: ipv6/addr.h:74
uint16_t rtr_ltime
(Advertised) Router lifetime (default 1800).