|
SatCat5
|
Accept incoming Ethernet packets by EtherType.
This file defines a child of net::Protocol (see net_protocol.h) that acts as the handler for incoming frames of a specific EtherType.
The eth::Protocol handles the interface to an eth::Dispatch object. The child class must define frame_rcvd(...) to process each packet. i.e., void frame_rcvd(satcat5::io::LimitedRead& src) override;
Definition at line 24 of file eth_protocol.h.
#include <eth_protocol.h>
Public Member Functions | |
| virtual void | frame_rcvd (satcat5::io::LimitedRead &src)=0 |
| Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value. More... | |
Protected Member Functions | |
| Protocol (satcat5::eth::Dispatch *dispatch, const satcat5::eth::MacType ðertype, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE) | |
| Register or unregister this handler with the Dispatcher. More... | |
Protected Attributes | |
| satcat5::eth::Dispatch *const | m_iface |
| Parent interface (e.g., for address and I/O) | |
| const satcat5::eth::MacType | m_etype |
| satcat5::net::Type | m_filter |
| Incoming packet filter. | |
Private Attributes | |
| satcat5::net::Protocol * | m_next |
| Linked list of Protocols. | |
|
protected |
Register or unregister this handler with the Dispatcher.
(Only child can safely call constructor and destructor.)
Definition at line 15 of file eth_protocol.cc.
|
pure virtualinherited |
Dispatch calls frame_rcvd(...) for each incoming frame with with a matching net::Type value.
The child class SHOULD read the frame contents from the provided "src" object, which is only valid until the function returns.
To send a reply:
The child class MUST override this method.
Implemented in satcat5::udp::TftpServerCore, satcat5::udp::TftpTransfer, satcat5::udp::KeepAlive, satcat5::udp::Dispatch, satcat5::ntp::Client, satcat5::net::Tpipe, satcat5::net::SocketCore, satcat5::net::ProtoEcho, satcat5::net::ProtoConfig, satcat5::log::FromCbor, satcat5::ip::ProtoIcmp, satcat5::ip::Dispatch, satcat5::ip::DhcpServer, satcat5::ip::DhcpClient, satcat5::igmp::Client, satcat5::eth::SwitchLogReader, satcat5::eth::ChatEcho, satcat5::eth::ChatProto, satcat5::eth::ProtoArp, satcat5::coap::Endpoint, satcat5::coap::Connection, satcat5::cfg::ConfigBusRemote, satcat5::ccsds_spp::SppToBytes, satcat5::ccsds_aos::Channel, satcat5::test::LogProtocol, satcat5::net::AeroFtpServer, satcat5::udp::TelemetryRx, satcat5::eth::TelemetryRx, and satcat5::util::ChatPrinter.