|
SatCat5
|
Container for a pair of back-to-back network interfaces.
This class is generally used with Ethernet networks, but it can also be used with CCSDS-SPP and other packet-oriented protocols. Automatically links to an io::WritePcap object to save packet capture logs of the entire simulation.
Definition at line 24 of file eth_crosslink.h.
#include <eth_crosslink.h>
Public Member Functions | |
| Crosslink (const char *filename, u16 type=satcat5::io::LINKTYPE_ETHERNET) | |
| Constructor accepts a filename to use for packet logging. More... | |
| void | set_loss_rate (float rate) |
| Shortcut for setting loss rate on both interfaces. | |
| void | set_zero_pad (unsigned len) |
| Shortcut for setting zero-padding on both interfaces. | |
Public Attributes | |
| satcat5::test::TimerSimulation | timer |
| Clock for network simulation and packet timestamps. | |
| satcat5::io::WritePcap | pcap |
| Packet-capture logging system. | |
| satcat5::test::EthernetInterface | eth0 |
| Define each network interface (usually Ethernet). | |
| satcat5::test::EthernetInterface | eth1 |
| Define each network interface (usually Ethernet). | |
Static Public Attributes | |
| static constexpr satcat5::eth::MacAddr | MAC0 = {{0xDE, 0xAD, 0xBE, 0xEF, 0x11, 0x11}} |
| Set preferred addresses for each interface. | |
| static constexpr satcat5::eth::MacAddr | MAC1 = {{0xDE, 0xAD, 0xBE, 0xEF, 0x22, 0x22}} |
| Set preferred addresses for each interface. | |
| static constexpr satcat5::ip::Addr | IP0 = satcat5::ip::Addr(192, 168, 1, 11) |
| Set preferred addresses for each interface. | |
| static constexpr satcat5::ip::Addr | IP1 = satcat5::ip::Addr(192, 168, 1, 74) |
| Set preferred addresses for each interface. | |
|
explicit |
Constructor accepts a filename to use for packet logging.
(Passing null or empty string disables this option.)
Definition at line 20 of file eth_crosslink.cc.