Prefix list component of neighbor information base.
More...
Prefix list component of neighbor information base.
|
file | pl.h |
| Prefix list definitions.
|
|
◆ gnrc_ipv6_nib_pl_del()
void gnrc_ipv6_nib_pl_del |
( |
unsigned |
iface, |
|
|
const ipv6_addr_t * |
pfx, |
|
|
unsigned |
pfx_len |
|
) |
| |
Deletes prefix from NIB.
- Precondition
pfx != NULL
- Parameters
-
[in] | iface | The interface pfx is expected to be on (0 for any). |
[in] | pfx | The prefix to be removed. |
[in] | pfx_len | Length of pfx in bits. |
◆ gnrc_ipv6_nib_pl_iter()
Iterates over all prefix list entries in the NIB.
- Precondition
(state != NULL) && (ple != NULL)
- Parameters
-
[in] | iface | Restrict iteration to entries on this interface. 0 for any interface. |
[in,out] | state | Iteration state of the prefix list. Must point to NULL pointer to start iteration |
[out] | ple | The next prefix list entry. |
Usage example:
int main(void) {
void *state = NULL;
puts("My prefixes:");
}
return 0;
}
- Note
- The list may change during iteration.
- Returns
- true, if iteration can be continued.
-
false, if
ple
is the last prefix list ple in the NIB.
◆ gnrc_ipv6_nib_pl_print()
Prints a prefix list entry.
- Precondition
ple != NULL
- Parameters
-
[in] | ple | A prefix list entry |
◆ gnrc_ipv6_nib_pl_set()
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.
- Precondition
(pfx != NULL)
- Parameters
-
[in] | iface | Interface pfx is valid on. |
[in] | pfx | The prefix. May not be a link-local prefix or a multicast address and its first pfx_len bits may not be 0. Must not be NULL . |
[in] | pfx_len | Length of pfx in bits. Condition pfx_len > 0 must hold. |
[in] | valid_ltime | Lifetime (in ms) until prefix expires from now. UINT32_MAX for infinite lifetime. Addresses with expired prefixes are removed from iface . |
[in] | pref_ltime | Lifetime (in ms) until prefix deprecates from now. UINT32_MAX for infinite lifetime. Addresses with deprecated prefixes should not be used for new communication. Only applications with difficulty changing to another address without service disruption should use deprecated addresses. May not be greater then valid_ltime . |
- Returns
- 0, on success.
-
-EINVAL, if
pfx
was fe80::` or multicast, pfx_len
was == 0, the first pfx_len
bits of @ pfx were 0, or if pref_ltime > valid_ltime.
-
-ENOMEM, if no space was left in the prefix list.