30 MultiPacket::Reader rd(packet);
51 : m_switch(sw), m_next(0)
56 #if SATCAT5_ALLOW_DELETION
57 PluginCore::~PluginCore() {
63 : m_port(port), m_next(0)
68 #if SATCAT5_ALLOW_DELETION
69 PluginPort::~PluginPort() {
Ethernet switch plugin API.
PluginCore(satcat5::eth::SwitchCore *sw)
Associate this plugin object with the designated switch.
satcat5::eth::SwitchCore *const m_switch
Pointer to the associated SwitchCore object.
Ethernet port plugin API.
PluginPort(satcat5::eth::SwitchPort *port)
Associate this plugin object with the designated port.
satcat5::eth::SwitchPort *const m_port
Pointer to the associated SwitchPort object.
A shared-memory Ethernet switch based on the MultiBuffer class.
Generic packetized I/O interface for use with SwitchCore.
void plugin_remove(satcat5::eth::PluginPort *plugin)
Plugin management.
void plugin_add(satcat5::eth::PluginPort *plugin)
Plugin management.
Abstract API for reading byte-streams and packets.
Abstract API for writing byte-streams and packets.
Plugins for the software-defined Ethernet switch and IPv4 router.
Software-defined Ethernet switch.
constexpr SATCAT5_PMASK_TYPE PMASK_ALL(-1)
Global port-mask indicating every port (i.e., broadcast).
Diagnostic logging to UART and/or Ethernet ports.
Ephemeral data structure provided to plugin callbacks.
satcat5::io::MultiPacket * pkt
Complete packet contents.
bool is_udp() const
Accessors and shortcuts for packet metadata.
satcat5::ip::Header ip
Copy of additional header fields, if present.
bool is_ip() const
Accessors and shortcuts for packet metadata.
satcat5::tcp::Header tcp
Copy of additional header fields, if present.
u16 hlen
Original header length.
bool is_arp() const
Accessors and shortcuts for packet metadata.
u16 flags
Additional status flags indicating packet status.
SATCAT5_PMASK_TYPE dst_mask
Destination mask for which port(s) receive this packet.
satcat5::eth::ArpHeader arp
Copy of additional header fields, if present.
satcat5::eth::Header hdr
Copy of Ethernet header fields.
bool is_tcp() const
Accessors and shortcuts for packet metadata.
void write_to(satcat5::io::Writeable *wr) const
Copy packet headers to the specified destination.
satcat5::udp::Header udp
Copy of additional header fields, if present.
A packet is a linked-list of memory blocks, plus metadata.
unsigned m_length
Packet length in bytes.
Miscellaneous mathematical utility functions.