KENSv3
KAIST Educational Network System
Classes | Public Member Functions | List of all members
E::RoutingInfo Class Reference

This class provides routing information to its child class. More...

#include <E_RoutingInfo.hpp>

Inheritance diagram for E::RoutingInfo:
E::Host

Public Member Functions

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
 

Detailed Description

This class provides routing information to its child class.

Member Function Documentation

◆ getARPTable()

std::optional< mac_t > E::RoutingInfo::getARPTable ( const ipv4_t &  ipv4)
finalvirtual
Parameters
ipv4IP 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
portInterface 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
portInterface 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_bufferIP 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
macMAC address.
ipIP address.
Note
You cannot override this function.

◆ setIPAddr()

void E::RoutingInfo::setIPAddr ( const ipv4_t &  ip,
int  port 
)
finalvirtual
Parameters
ipIP address.
portInterface 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
macMAC address.
portInterface 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
maskIP address mask.
prefixPrefix length for routing.
portInterface index to bind the given routing entry.
Note
You cannot override this function.

The documentation for this class was generated from the following files: