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 "evtimer_msg.h"
22 #include "net/ipv6/addr.h"
23 #ifdef MODULE_GNRC_IPV6_NIB
24 #include "net/gnrc/ipv6/nib/conf.h"
25 #endif
26 #include "net/gnrc/netif/conf.h"
27 #ifdef MODULE_NETSTATS_IPV6
28 #include "net/netstats.h"
29 #endif
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
43 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_MASK (0x1fU)
44 
52 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_TENTATIVE (0x07U)
53 
57 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_DEPRECATED (0x08U)
58 
62 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_VALID (0x10U)
63 
67 #define GNRC_NETIF_IPV6_ADDRS_FLAGS_ANYCAST (0x20U)
68 
75 typedef struct {
83  uint8_t addrs_flags[GNRC_NETIF_IPV6_ADDRS_NUMOF];
84 
91 
98 #ifdef MODULE_NETSTATS_IPV6
99 
104  netstats_t stats;
105 #endif
106 #if defined(MODULE_GNRC_IPV6_NIB) || DOXYGEN
107 #if GNRC_IPV6_NIB_CONF_ROUTER || DOXYGEN
108 
123  void (*route_info_cb)(unsigned type, const ipv6_addr_t *ctx_addr,
124  const void *ctx);
133 #endif /* GNRC_IPV6_NIB_CONF_ROUTER */
134 #if GNRC_IPV6_NIB_CONF_ARSM || DOXYGEN
135 
143 #endif /* GNRC_IPV6_NIB_CONF_ARSM */
144 
151 #if GNRC_IPV6_NIB_CONF_6LN || DOXYGEN
152 
162 #endif
163 
164 #if GNRC_IPV6_NIB_CONF_ROUTER || DOXYGEN
165 
173  uint32_t last_ra;
174 #endif /* GNRC_IPV6_NIB_CONF_ROUTER */
175 #if GNRC_IPV6_NIB_CONF_ARSM || defined(DOXYGEN)
176 
185  uint32_t reach_time_base;
186 
194  uint32_t reach_time;
195 #endif /* GNRC_IPV6_NIB_CONF_ARSM */
196 
202  uint32_t retrans_time;
203 #if GNRC_IPV6_NIB_CONF_ROUTER || DOXYGEN
204 
211  uint16_t rtr_ltime;
223  uint8_t ra_sent;
224 #endif
225 
231  uint8_t rs_sent;
238  uint8_t na_sent;
239 #endif /* MODULE_GNRC_IPV6_NIB */
240 
246  uint8_t aac_mode;
247 
253  uint16_t mtu;
255 
256 #ifdef __cplusplus
257 }
258 #endif
259 
260 #endif /* NET_GNRC_NETIF_IPV6_H */
261 
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:76
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 New network interface API.
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.
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:86
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).