IPv6 routing. More...
Go to the source code of this file.
Data Structures | |
struct | Ipv6RoutingTableEntry |
Routing table entry. More... | |
Macros | |
#define | IPV6_ROUTING_SUPPORT DISABLED |
#define | IPV6_ROUTING_TABLE_SIZE 8 |
Functions | |
error_t | ipv6InitRouting (void) |
Initialize IPv6 routing table. More... | |
error_t | ipv6EnableRouting (NetInterface *interface, bool_t enable) |
Enable routing for the specified interface. More... | |
error_t | ipv6AddRoute (const Ipv6Addr *prefix, uint_t prefixLen, NetInterface *interface, const Ipv6Addr *nextHop, uint_t metric) |
Add a new entry in the IPv6 routing table. More... | |
error_t | ipv6DeleteRoute (const Ipv6Addr *prefix, uint_t prefixLen) |
Remove an entry from the IPv6 routing table. More... | |
error_t | ipv6DeleteAllRoutes (void) |
Delete all routes from the IPv6 routing table. More... | |
error_t | ipv6ForwardPacket (NetInterface *srcInterface, NetBuffer *ipPacket, size_t ipPacketOffset) |
Forward an IPv6 packet. More... | |
Detailed Description
IPv6 routing.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file ipv6_routing.h.
Macro Definition Documentation
◆ IPV6_ROUTING_SUPPORT
#define IPV6_ROUTING_SUPPORT DISABLED |
Definition at line 40 of file ipv6_routing.h.
◆ IPV6_ROUTING_TABLE_SIZE
#define IPV6_ROUTING_TABLE_SIZE 8 |
Definition at line 47 of file ipv6_routing.h.
Function Documentation
◆ ipv6AddRoute()
error_t ipv6AddRoute | ( | const Ipv6Addr * | prefix, |
uint_t | prefixLen, | ||
NetInterface * | interface, | ||
const Ipv6Addr * | nextHop, | ||
uint_t | metric | ||
) |
Add a new entry in the IPv6 routing table.
- Parameters
-
[in] prefix Network destination [in] prefixLen Length of the prefix, in bits [in] interface Network interface where to forward the packet [in] nextHop IPv6 address of the next hop [in] metric Metric value
- Returns
- Error code
Definition at line 103 of file ipv6_routing.c.
◆ ipv6DeleteAllRoutes()
error_t ipv6DeleteAllRoutes | ( | void | ) |
Delete all routes from the IPv6 routing table.
- Returns
- Error code
Definition at line 249 of file ipv6_routing.c.
◆ ipv6DeleteRoute()
Remove an entry from the IPv6 routing table.
- Parameters
-
[in] prefix Network destination [in] prefixLen Length of the prefix, in bits
- Returns
- Error code
Definition at line 200 of file ipv6_routing.c.
◆ ipv6EnableRouting()
error_t ipv6EnableRouting | ( | NetInterface * | interface, |
bool_t | enable | ||
) |
Enable routing for the specified interface.
- Parameters
-
[in] interface Underlying network interface [in] enable When the flag is set to TRUE, routing is enabled on the interface and the router can forward packets to or from the interface
- Returns
- Error code
Definition at line 75 of file ipv6_routing.c.
◆ ipv6ForwardPacket()
error_t ipv6ForwardPacket | ( | NetInterface * | srcInterface, |
NetBuffer * | ipPacket, | ||
size_t | ipPacketOffset | ||
) |
Forward an IPv6 packet.
- Parameters
-
[in] srcInterface Network interface on which the packet was received [in] ipPacket Multi-part buffer that holds the IPv6 packet to forward [in] ipPacketOffset Offset to the first byte of the IPv6 packet
- Returns
- Error code
Definition at line 271 of file ipv6_routing.c.
◆ ipv6InitRouting()
error_t ipv6InitRouting | ( | void | ) |