|
|
| IPv4 (Host &host) |
| |
| | 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.
|
| |
| virtual std::string | getHostModuleName () final |
| |
| virtual void | initialize (void) |
| | This function is automatically called by Host just before the simulation begins. You can override this function if needed.
|
| |
| virtual void | finalize (void) |
| | This function is automatically called by Host just after the simulation ends. You can override this function if needed.
|
| |
| virtual std::any | diagnose (std::any param) |
| | 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.
|
| |
| 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.
|
| |
|
void | sendPacket (std::string toModule, const Packet &packet) |
| |
| Time | getCurrentTime () |
| |
| Size | getWireSpeed (int port_num) |
| | Get cost for local port (link)
|
| |
| size_t | getPortCount () |
| | Get the number of ports.
|
| |
| 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).
|
| |
◆ packetArrived()
| void E::IPv4::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.
The documentation for this class was generated from the following files:
- include/E/Networking/IPv4/E_IPv4.hpp
- src/Networking/IPv4/E_IPv4.cpp