|
SatCat5
|
Send packets to a specific Ethernet address.
Implementation of net::Address for Ethernet Dispatch.
Definition at line 17 of file eth_address.h.
#include <eth_address.h>
Public Member Functions | |
| Address (satcat5::eth::Dispatch *iface) | |
| Link this object to a network interface. | |
| void | connect (const satcat5::eth::MacAddr &addr, const satcat5::eth::MacType &type, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE) |
| Connect to the designated address. | |
| satcat5::net::Dispatch * | iface () const override |
| Fetch a pointer to the underlying interface. More... | |
| satcat5::io::Writeable * | open_write (unsigned len) override |
| Open a new frame to the designated address and type. More... | |
| void | close () override |
| Close any open connections and revert to idle. More... | |
| bool | ready () const override |
| Is this address object ready for use? Child MUST override this method. | |
| bool | is_multicast () const override |
| Is the destination a broadcast or multicast address? Child MUST override these method. | |
| bool | matches_reply_address () const override |
| Does this Address object match the parent interface's current reply address? Multicast destinations should match any source address expected to receive the multicast message. More... | |
| bool | reply_is_multicast () const override |
| Was the parent interface's incoming message sent to a multicast address? (i.e., Could that message have many other recipients?) Child MUST override this method. | |
| void | save_reply_address () override |
| Bind this Address object to the parent interface's current reply address, as provided in net::Dispatch::open_reply(). More... | |
| satcat5::eth::MacAddr | dstmac () const |
| satcat5::eth::MacAddr | srcmac () const |
| satcat5::eth::MacType | etype () const |
| satcat5::eth::VlanTag | vtag () const |
| satcat5::eth::Header | header () const |
| virtual void | retry () |
| If this Address is not in the ready() state, reattempt any steps required to do so, such as MAC address resolution. More... | |
| bool | write_packet (unsigned nbytes, const void *data) |
| All-in-one call that writes an entire packet. More... | |
Protected Attributes | |
| satcat5::eth::Dispatch *const | m_iface |
| satcat5::eth::MacAddr | m_addr |
| satcat5::eth::MacType | m_type |
| satcat5::eth::VlanTag | m_vtag |
|
overridevirtual |
Close any open connections and revert to idle.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 37 of file eth_address.cc.
|
overridevirtual |
Fetch a pointer to the underlying interface.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 29 of file eth_address.cc.
|
overridevirtual |
Does this Address object match the parent interface's current reply address? Multicast destinations should match any source address expected to receive the multicast message.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 52 of file eth_address.cc.
|
overridevirtual |
Open a new frame to the designated address and type.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 33 of file eth_address.cc.
|
inlinevirtualinherited |
If this Address is not in the ready() state, reattempt any steps required to do so, such as MAC address resolution.
Child SHOULD override this method if applicable.
Reimplemented in satcat5::udp::Address, and satcat5::ip::Address.
Definition at line 52 of file net_address.h.
|
overridevirtual |
Bind this Address object to the parent interface's current reply address, as provided in net::Dispatch::open_reply().
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 62 of file eth_address.cc.
|
inherited |
All-in-one call that writes an entire packet.
Equivalent to open_write(), io::Writeable::write_bytes(), io::Writeable::write_finalize().
Definition at line 11 of file net_address.cc.