This class provides routing information to its child class.
More...
#include <E_RoutingInfo.hpp>
|
virtual void | setIPAddr (const ipv4_t &ip, int port) final |
|
virtual void | setMACAddr (const mac_t &mac, int port) final |
|
virtual void | setARPTable (const mac_t &mac, const ipv4_t &ipv4) final |
| Add (MAC,IP) entry to its ARP table. More...
|
|
virtual void | setRoutingTable (const ipv4_t &mask, int prefix, int port) final |
|
virtual std::optional< ipv4_t > | getIPAddr (int port) final |
|
virtual std::optional< mac_t > | getMACAddr (int port) final |
|
virtual std::optional< mac_t > | getARPTable (const ipv4_t &ipv4) final |
|
virtual int | getRoutingTable (const ipv4_t &ip_addr) final |
|
This class provides routing information to its child class.
◆ getARPTable()
std::optional< mac_t > E::RoutingInfo::getARPTable |
( |
const ipv4_t & |
ipv4 | ) |
|
|
finalvirtual |
- Parameters
-
ipv4 | IP address to find its corresponding MAC address. |
- Returns
- MAC address if successful.
- Note
- You cannot override this function.
◆ getIPAddr()
std::optional< ipv4_t > E::RoutingInfo::getIPAddr |
( |
int |
port | ) |
|
|
finalvirtual |
- Parameters
-
port | Interface index to retrieve its IP address. |
- Returns
- IP address if successful.
- Note
- You cannot override this function.
◆ getMACAddr()
std::optional< mac_t > E::RoutingInfo::getMACAddr |
( |
int |
port | ) |
|
|
finalvirtual |
- Parameters
-
port | Interface index to retrieve its MAC address. |
- Returns
- MAC address if successful.
- Note
- You cannot override this function.
◆ getRoutingTable()
int E::RoutingInfo::getRoutingTable |
( |
const ipv4_t & |
ip_addr | ) |
|
|
finalvirtual |
- Parameters
-
ip_buffer | IP address to find its destination. |
- Returns
- Interface index to this packet should go to.
- Note
- You cannot override this function.
◆ setARPTable()
void E::RoutingInfo::setARPTable |
( |
const mac_t & |
mac, |
|
|
const ipv4_t & |
ipv4 |
|
) |
| |
|
finalvirtual |
Add (MAC,IP) entry to its ARP table.
- Parameters
-
mac | MAC address. |
ip | IP address. |
- Note
- You cannot override this function.
◆ setIPAddr()
void E::RoutingInfo::setIPAddr |
( |
const ipv4_t & |
ip, |
|
|
int |
port |
|
) |
| |
|
finalvirtual |
- Parameters
-
ip | IP address. |
port | Interface index to bind the given IP address. |
- Note
- You cannot override this function.
◆ setMACAddr()
void E::RoutingInfo::setMACAddr |
( |
const mac_t & |
mac, |
|
|
int |
port |
|
) |
| |
|
finalvirtual |
- Parameters
-
mac | MAC address. |
port | Interface index to bind the given MAC address. |
- Note
- You cannot override this function.
◆ setRoutingTable()
void E::RoutingInfo::setRoutingTable |
( |
const ipv4_t & |
mask, |
|
|
int |
prefix, |
|
|
int |
port |
|
) |
| |
|
finalvirtual |
- Parameters
-
mask | IP address mask. |
prefix | Prefix length for routing. |
port | Interface index to bind the given routing entry. |
- Note
- You cannot override this function.
The documentation for this class was generated from the following files: