abr.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 
21 #ifndef NET_GNRC_IPV6_NIB_ABR_H
22 #define NET_GNRC_IPV6_NIB_ABR_H
23 
24 #include <kernel_defines.h>
25 
26 #include "net/ipv6/addr.h"
27 #include "net/gnrc/ipv6/nib/conf.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
36 typedef struct {
38  uint32_t version;
39  uint32_t valid_until;
42 
43 #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C) || defined(DOXYGEN)
44 #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR) || defined(DOXYGEN)
45 
55 int gnrc_ipv6_nib_abr_add(const ipv6_addr_t *addr);
56 
62 void gnrc_ipv6_nib_abr_del(const ipv6_addr_t *addr);
63 #else /* CONFIG_GNRC_IPV6_NIB_6LBR || defined(DOXYGEN) */
64 #define gnrc_ipv6_nib_abr_add(addr) (-ENOTSUP)
65 #define gnrc_ipv6_nib_abr_del(addr) (void)(addr)
66 #endif /* CONFIG_GNRC_IPV6_NIB_6LBR || defined(DOXYGEN) */
67 
100 bool gnrc_ipv6_nib_abr_iter(void **state, gnrc_ipv6_nib_abr_t *abr);
101 
110 #else /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C || defined(DOXYGEN) */
111 #define gnrc_ipv6_nib_abr_add(addr) (-ENOTSUP)
112 #define gnrc_ipv6_nib_abr_del(addr) (void)(addr)
113 #define gnrc_ipv6_nib_abr_iter(state, abr) (false)
114 #define gnrc_ipv6_nib_abr_print(abr) (void)(abr)
115 #endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C || defined(DOXYGEN) */
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* NET_GNRC_IPV6_NIB_ABR_H */
122 
gnrc_ipv6_nib_abr_t::valid_until
uint32_t valid_until
timestamp (in minutes) until which the information is valid
Definition: abr.h:39
kernel_defines.h
Common macros and compiler attributes/pragmas configuration.
ipv6_addr_t
Data type to represent an IPv6 address.
Definition: addr.h:74
addr.h
Definitions for IPv6 addresses.
gnrc_ipv6_nib_abr_iter
bool gnrc_ipv6_nib_abr_iter(void **state, gnrc_ipv6_nib_abr_t *abr)
Iterates over all authoritative border router in the NIB.
gnrc_ipv6_nib_abr_t::version
uint32_t version
last received version
Definition: abr.h:38
conf.h
Configuration macro definitions for neighbor information base.
gnrc_ipv6_nib_abr_add
int gnrc_ipv6_nib_abr_add(const ipv6_addr_t *addr)
Adds the address of an authoritative border router to the NIB.
gnrc_ipv6_nib_abr_print
void gnrc_ipv6_nib_abr_print(gnrc_ipv6_nib_abr_t *abr)
Prints an authoritative border router list entry.
gnrc_ipv6_nib_abr_del
void gnrc_ipv6_nib_abr_del(const ipv6_addr_t *addr)
Removes an authoritative border router from the NIB.
gnrc_ipv6_nib_abr_t::addr
ipv6_addr_t addr
The address of the border router.
Definition: abr.h:37
gnrc_ipv6_nib_abr_t
Authoritative border router list entry view on NIB.
Definition: abr.h:36