11 #include <satcat5/ip_dispatch.h>
45 ~
Address() SATCAT5_OPTIONAL_DTOR;
67 void close()
override;
68 bool ready()
const override {
return m_ready;}
69 void retry()
override;
81 {
return m_iface->macaddr(); }
85 {
return m_iface->iface(); }
87 {
return {dstmac(), srcmac(), satcat5::eth::ETYPE_IPV4, vtag()}; }
Callback interface for responding to ARP and ICMP events.
Implemention of "net::Dispatch" for Ethernet frames.
Abstract API for writing byte-streams and packets.
Connection metadata for an IPv4 address.
bool ready() const override
Is this address object ready for use? Child MUST override this method.
void connect(const satcat5::ip::Addr &dstaddr, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE)
Automatic address resolution using routing table + ARP.
void close() override
Close any open connections and revert to idle.
void arp_event(const satcat5::eth::MacAddr &mac, const satcat5::ip::Addr &ip) override
Callback for any announced MAC/IP address pair.
void save_reply_address() override
Bind this Address object to the parent interface's current reply address, as provided in net::Dispatc...
bool reply_is_multicast() const override
Was the parent interface's incoming message sent to a multicast address? (i.e., Could that message ha...
satcat5::net::Dispatch * iface() const override
Fetch a pointer to the underlying interface.
void gateway_change(const satcat5::ip::Addr &dstaddr, const satcat5::ip::Addr &gateway) override
Callback for changes to gateway configuration.
satcat5::io::Writeable * open_write(unsigned len) override
Open a new frame to the designated address and type.
bool matches_reply_address() const override
Does this Address object match the parent interface's current reply address? Multicast destinations s...
bool is_multicast() const override
Is the destination a broadcast or multicast address? Child MUST override these method.
void retry() override
If this Address is not in the ready() state, reattempt any steps required to do so,...
void init(satcat5::ip::Dispatch *iface)
Deferred initialization of the upstream interface.
Address(satcat5::ip::Dispatch *iface, u8 proto)
Create this object and bind it to a network interface.
Protocol handler and dispatch unit for Internet Protocol v4 (IPv4).
Defines a generic API for sending data to a specific destination, such as a MAC address,...
The "Dispatch" is a generic interface that knows how to read a designated protocol layer and sort inc...
Protocol handler for the Address Resolution Protocol (ARP)
Client-side implementation of the Internet Group Management Protocol (IGMP)
Generic network Dispatch API.
An Ethernet MAC address (with serializable interface).
Header contents for an 802.1Q Virtual-LAN tag.
Client state for an IGMP multicast subscription.
IPv4 address is a 32-bit unsigned integer.
Timestamp for measuring elapsed time.
TimeRef and TimeVal define the API for monotonic timers.