Loading...
Searching...
No Matches
ft.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_FT_H
21#define NET_GNRC_IPV6_NIB_FT_H
22
23#include <stdint.h>
24
25#include "net/gnrc/pkt.h"
26#include "net/ipv6/addr.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35typedef struct {
38 uint8_t dst_len;
40 uint8_t primary;
42 uint16_t iface;
44
61
82int gnrc_ipv6_nib_ft_add(const ipv6_addr_t *dst, unsigned dst_len,
83 const ipv6_addr_t *next_hop, unsigned iface,
84 uint32_t lifetime);
85
97void gnrc_ipv6_nib_ft_del(const ipv6_addr_t *dst, unsigned dst_len);
98
140bool gnrc_ipv6_nib_ft_iter(const ipv6_addr_t *next_hop, unsigned iface,
141 void **state, gnrc_ipv6_nib_ft_t *fte);
142
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif /* NET_GNRC_IPV6_NIB_FT_H */
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.
Definitions for IPv6 addresses.
General definitions for network packets and their helper functions.
Forwarding table entry view on NIB.
Definition ft.h:35
ipv6_addr_t next_hop
next hop to gnrc_ipv6_nib_ft_t::dst
Definition ft.h:37
ipv6_addr_t dst
destination or prefix
Definition ft.h:36
uint8_t dst_len
prefix-length in bits of gnrc_ipv6_nib_ft_t::dst
Definition ft.h:38
uint16_t iface
interface to gnrc_ipv6_nib_ft_t::next_hop
Definition ft.h:42
uint8_t primary
!= 0 if gnrc_ipv6_nib_ft_t::dst is preferred default route
Definition ft.h:40
Type to represent parts (either headers or payload) of a packet, called snips.
Definition pkt.h:108
Data type to represent an IPv6 address.
Definition addr.h:72