27 #include <satcat5/ethernet.h>
60 const char*
name()
const;
61 const char*
desc()
const;
78 typedef std::deque<satcat5::pcap::Descriptor> DescriptorList;
Extensible transmit and receive buffer.
Abstract API for reading byte-streams and packets.
Adapter for a PCAP Layer-2 socket.
const char * name() const
Unique interface ID.
Socket(const char *ifname, unsigned bsize=65536, satcat5::eth::MacType filter=satcat5::eth::ETYPE_NONE)
Open the specified interface by name.
void poll_always() override
Child class MUST override this method.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
bool ok() const
Is the socket in a usable state?
const char * desc() const
Human-readable name.
An "Always" object is polled whenever service() is called.
bool is_device(const char *ifname)
Check if a given name is on the list from list_all_devices.
std::string prompt_for_ifname()
Print a list of Ethernet devices, and select by index.
satcat5::pcap::DescriptorList list_all_devices()
Fetch a list of Ethernet device descriptors.
Buffered I/O wrappers for PacketBuffer.
Core event-processing loop for SatCat5 software.
EtherType field (uint16) is used a protocol-ID [1536..65535].
Structure for holding a device-name and user-readable description.
std::string name
Unique interface ID.
std::string desc
Human-readable name.