|
| PWOSPFAssignment (Host &host) |
|
Size | pwospfQuery (const ipv4_t &ipv4) |
| Query cost for a host. More...
|
|
Size | linkCost (int port_num) |
| Get cost for local port (link) More...
|
|
virtual void | initialize () |
| This function is automatically called by Host just before the simulation begins. You can override this function if needed.
|
|
virtual void | finalize () |
| This function is automatically called by Host just after the simulation ends. You can override this function if needed.
|
|
| HostModule (std::string name, Host &host) |
| Create a HostModule. It is automatically registered to the Host. Module is registered to a System when it is created. More...
|
|
virtual std::string | getHostModuleName () final |
|
|
virtual std::any | diagnose (std::any param) final |
| Host module control function.
|
|
virtual void | packetArrived (std::string fromModule, Packet &&packet) final |
| This function is automatically called by Host when this module receives a Packet. You must override this function to handle Packet events. When a Packet is received, you must FREE IT OR PASS IT TO OTHER HOSTMODULE. More...
|
|
virtual void | sendPacket (std::string toModule, Packet &&packet) final |
| This function transfers Packets among HostModules in the Host. Unlike Module::Message, we use fire-and-forget policy with Packets. Once you send a Packet using sendPacket, you DO NOT HAVE TO FREE THAT PACKET. More...
|
|
void | sendPacket (std::string toModule, const Packet &packet) |
|
Time | getCurrentTime () |
|
Size | getWireSpeed (int port_num) |
| Get cost for local port (link) More...
|
|
size_t | getPortCount () |
| Get the number of ports. More...
|
|
void | print_log (uint64_t level, const char *format,...) |
| Prints log with specified log level and format. NetworkLog::print_log prints logs specified in log level parameter. For example, if log level is set to TCP_LOG, it only prints TCP_LOG logs. If you want to print multiple log levels in NetworkLog, you can set log level with OR operation (i.e. SYSCALL_ERROR | MODULE_ERROR). More...
|
|
| TimerModule (std::string name, Host &host) |
|
virtual std::string | getTimerModuleName () final |
|
virtual UUID | addTimer (std::any payload, Time timeAfter) final |
| Request an alarm that rings after specified time. More...
|
|
virtual void | cancelTimer (UUID key) final |
| Cancel the timer request. More...
|
|
◆ linkCost()
Size E::PWOSPFAssignment::linkCost |
( |
int |
port_num | ) |
|
|
inline |
Get cost for local port (link)
- Parameters
-
port_num | querying port's number |
- Returns
- local link cost
◆ packetArrived()
void E::PWOSPFAssignment::packetArrived |
( |
std::string |
fromModule, |
|
|
Packet && |
packet |
|
) |
| |
|
finalprotectedvirtual |
This function is automatically called by Host when this module receives a Packet. You must override this function to handle Packet events. When a Packet is received, you must FREE IT OR PASS IT TO OTHER HOSTMODULE.
- Parameters
-
fromModule | Name of the HostModule who sent this packet. |
packet | Received packet. |
Implements E::HostModule.
◆ pwospfQuery()
Size E::PWOSPFAssignment::pwospfQuery |
( |
const ipv4_t & |
ipv4 | ) |
|
Query cost for a host.
- Parameters
-
ipv4 | querying host's IP address |
- Returns
- cost or -1 for no found host
The documentation for this class was generated from the following files: