pl.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 
20 #ifndef NET_GNRC_IPV6_NIB_PL_H
21 #define NET_GNRC_IPV6_NIB_PL_H
22 
23 #include <stdint.h>
24 
25 #include "net/ipv6/addr.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 typedef struct {
36  uint8_t pfx_len;
37  uint16_t iface;
39  uint32_t valid_until;
41  uint32_t pref_until;
44 
73 int gnrc_ipv6_nib_pl_set(unsigned iface,
74  const ipv6_addr_t *pfx, unsigned pfx_len,
75  uint32_t valid_ltime, uint32_t pref_ltime);
76 
86 void gnrc_ipv6_nib_pl_del(unsigned iface,
87  const ipv6_addr_t *pfx, unsigned pfx_len);
88 
122 bool gnrc_ipv6_nib_pl_iter(unsigned iface, void **state,
123  gnrc_ipv6_nib_pl_t *ple);
124 
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
138 #endif /* NET_GNRC_IPV6_NIB_PL_H */
139 
Definitions for IPv6 addresses.
void gnrc_ipv6_nib_pl_del(unsigned iface, const ipv6_addr_t *pfx, unsigned pfx_len)
Deletes prefix from NIB.
int gnrc_ipv6_nib_pl_set(unsigned iface, const ipv6_addr_t *pfx, unsigned pfx_len, uint32_t valid_ltime, uint32_t pref_ltime)
Adds (or updates) prefix to NIB.
uint32_t valid_until
timestamp (in ms) until which the prefix is valid
Definition: pl.h:39
bool gnrc_ipv6_nib_pl_iter(unsigned iface, void **state, gnrc_ipv6_nib_pl_t *ple)
Iterates over all prefix list entries in the NIB.
void gnrc_ipv6_nib_pl_print(gnrc_ipv6_nib_pl_t *ple)
Prints a prefix list entry.
uint8_t pfx_len
length of gnrc_ipv6_nib_pl_t::pfx in bits
Definition: pl.h:36
uint32_t pref_until
timestamp (in ms) until which the prefix is preferred
Definition: pl.h:41
uint16_t iface
interface gnrc_ipv6_nib_pl_t::pfx is assigned to
Definition: pl.h:37
Prefix list entry view on NIB.
Definition: pl.h:34
Data type to represent an IPv6 address.
Definition: ipv6/addr.h:74
ipv6_addr_t pfx
prefix
Definition: pl.h:35