|
SatCat5
|
Internet Protocol v4 (IPv4) forwarding table.
The ip::Table class is used to store and retrieve IPv4 forwarding info for a given destination address, i.e., the parameters for the next hop including IP-address, MAC-address, and interface number. Retrieval uses longest-prefix matching for classless inter-domain routing (CIDR). Storing both IP and MAC address allows the use of numberless routes.
The table provides an API for loading permanent or temporary routes. It does not implement OSPF or any other routing protocol. Routes may be marked semi-permanent (i.e., stored until explicitly altered) or ephemeral (i.e., may be discarded or overwritten at any time). The latter allows the table to be used as part of an ARP cache.
For each route, the gateway address controls the mode:
By default, all routes are assumed to be local (i.e., the next hop is the final destination with no intermediate routers). To change this behavior, call the route_** methods to configure the default route and populate the static routing table.
If in doubt, start with the route_simple(...) method. This streamlined option is sufficient for simple networks with a single WAN access point.
Definition in file ip_table.h.
Go to the source code of this file.
Classes | |
| struct | satcat5::ip::Route |
| A single entry in the static routing table. More... | |
| class | satcat5::ip::RouteArray |
| An array of routes with read and write accessors. More... | |
| class | satcat5::ip::Table |
| IPv4 forwarding table. More... | |
Macros | |
| #define | SATCAT5_ROUTING_TABLE 8 |