7 #include <satcat5/port_recovery.h>
18 static constexpr
unsigned DEBUG_VERBOSE = 0;
22 , m_recov_in_buff(m_raw_buff_in, SATCAT5_RECOVERY_SWITCH_BUFFER_SIZE)
30 if (packet.
hdr.
type == satcat5::eth::ETYPE_RECOVERY) {
40 }
else if (DEBUG_VERBOSE > 1) {
41 Log(DEBUG,
"RecoveryIngress::query: Overflow.");
51 : MultiWriterBypass(port->get_switch(), port->get_egress(), 9999)
satcat5::eth::SwitchCore *const m_switch
Pointer to the associated SwitchCore object.
A shared-memory Ethernet switch based on the MultiBuffer class.
Generic packetized I/O interface for use with SwitchCore.
void free_packet(satcat5::io::MultiPacket *packet)
Immediately free memory associated with this packet.
Barebones class for reading data from a MultiPacket.
unsigned get_read_ready() const override
How many bytes can be read without blocking?
bool read_consume(unsigned nbytes) override
Read and discard 0 or more bytes.
bool write_finalize() override
Mark end of frame and release temporary working data.
unsigned get_write_space() const override
How many bytes can be written without blocking?
unsigned copy_to(satcat5::io::Writeable *dst)
Copy data to a Writeable object, without finalizing.
The Log class creates and formats one log message.
MultiWriter that slips packets written to it into the port's egress buffer.
RecoveryEgress(satcat5::eth::SwitchPort *port)
Egress interface attaches to an Ethernet port.
Intercepts all packets with the ETYPE_RECOVERY_IN ethertype and puts them into a buffer that can be r...
void query(satcat5::eth::PluginPacket &packet) override
Packet-received callback.
Diagnostic logging to UART and/or Ethernet ports.
constexpr s8 DEBUG
Define basic priority codes for log messages.
Ephemeral data structure provided to plugin callbacks.
satcat5::io::MultiPacket * pkt
Complete packet contents.
u16 hlen
Original header length.
void divert()
Divert this frame for deferred processing.
satcat5::eth::Header hdr
Copy of Ethernet header fields.