Loading...
Searching...
No Matches
ft.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
19
20#include <stdint.h>
21
22#include "net/gnrc/pkt.h"
23#include "net/ipv6/addr.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
32typedef struct {
35 uint8_t dst_len;
37 uint8_t primary;
39 uint16_t iface;
41
58
79int gnrc_ipv6_nib_ft_add(const ipv6_addr_t *dst, unsigned dst_len,
80 const ipv6_addr_t *next_hop, unsigned iface,
81 uint32_t lifetime);
82
94void gnrc_ipv6_nib_ft_del(const ipv6_addr_t *dst, unsigned dst_len);
95
137bool gnrc_ipv6_nib_ft_iter(const ipv6_addr_t *next_hop, unsigned iface,
138 void **state, gnrc_ipv6_nib_ft_t *fte);
139
148
149#ifdef __cplusplus
150}
151#endif
152
int gnrc_ipv6_nib_ft_get(const ipv6_addr_t *dst, gnrc_pktsnip_t *pkt, gnrc_ipv6_nib_ft_t *fte)
Gets the best matching forwarding table entry to a destination.
void gnrc_ipv6_nib_ft_del(const ipv6_addr_t *dst, unsigned dst_len)
Deletes a route from forwarding table.
int gnrc_ipv6_nib_ft_add(const ipv6_addr_t *dst, unsigned dst_len, const ipv6_addr_t *next_hop, unsigned iface, uint32_t lifetime)
Adds a new route to the forwarding table.
void gnrc_ipv6_nib_ft_print(const gnrc_ipv6_nib_ft_t *fte)
Prints a forwarding table entry.
bool gnrc_ipv6_nib_ft_iter(const ipv6_addr_t *next_hop, unsigned iface, void **state, gnrc_ipv6_nib_ft_t *fte)
Iterates over all forwarding table entries in the NIB.
struct gnrc_pktsnip gnrc_pktsnip_t
Type to represent parts (either headers or payload) of a packet, called snips.
Definitions for IPv6 addresses.
General definitions for network packets and their helper functions.
Forwarding table entry view on NIB.
Definition ft.h:32
ipv6_addr_t next_hop
next hop to gnrc_ipv6_nib_ft_t::dst
Definition ft.h:34
ipv6_addr_t dst
destination or prefix
Definition ft.h:33
uint8_t dst_len
prefix-length in bits of gnrc_ipv6_nib_ft_t::dst
Definition ft.h:35
uint16_t iface
interface to gnrc_ipv6_nib_ft_t::next_hop
Definition ft.h:39
uint8_t primary
!= 0 if gnrc_ipv6_nib_ft_t::dst is preferred default route
Definition ft.h:37
Data type to represent an IPv6 address.
Definition addr.h:64