|
SatCat5
|
Implementation of "net::Address" for UDP Dispatch.
Definition at line 72 of file udp_core.h.
#include <udp_core.h>
Public Member Functions | |
| Address (satcat5::udp::Dispatch *iface) | |
| Connect through the specified UDP interface. More... | |
| void | init (satcat5::udp::Dispatch *iface) |
| Deferred initialization of the upstream interface. More... | |
| void | connect (const satcat5::udp::Addr &dstaddr, const satcat5::eth::MacAddr &dstmac, const satcat5::udp::Port &dstport, const satcat5::udp::Port &srcport=satcat5::udp::PORT_NONE, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE) |
| Manual address resolution (user supplies IP + MAC). | |
| void | connect (const satcat5::udp::Addr &dstaddr, const satcat5::udp::Port &dstport, const satcat5::udp::Port &srcport=satcat5::udp::PORT_NONE, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE) |
| Automatic address resolution (user supplies IP only). 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. | |
| void | retry () override |
| If this Address is not in the ready() state, reattempt any steps required to do so, such as MAC address resolution. More... | |
| 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... | |
| 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::ip::Addr | dstaddr () const |
| satcat5::eth::MacAddr | dstmac () const |
| satcat5::udp::Port | dstport () const |
| satcat5::eth::Dispatch * | eth () const |
| satcat5::eth::Header | eth_header () const |
| satcat5::ip::Header | ip_header (unsigned len) const |
| satcat5::ip::Addr | gateway () const |
| satcat5::eth::MacAddr | srcmac () const |
| satcat5::udp::Port | srcport () const |
| satcat5::udp::Dispatch * | udp () const |
| satcat5::udp::Header | udp_header (unsigned len) const |
| satcat5::eth::VlanTag | vtag () const |
| bool | write_packet (unsigned nbytes, const void *data) |
| All-in-one call that writes an entire packet. More... | |
Protected Attributes | |
| satcat5::udp::Dispatch * | m_iface |
| satcat5::ip::Address | m_addr |
| satcat5::udp::Port | m_dstport |
| satcat5::udp::Port | m_srcport |
|
explicit |
Connect through the specified UDP interface.
The upstream interface may be null.
| iface | Pointer to the upstream UDP interface. |
Definition at line 14 of file udp_core.cc.
|
inlineoverridevirtual |
Close any open connections and revert to idle.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 102 of file udp_core.h.
| void Address::connect | ( | const satcat5::udp::Addr & | dstaddr, |
| const satcat5::udp::Port & | dstport, | ||
| const satcat5::udp::Port & | srcport = satcat5::udp::PORT_NONE, |
||
| const satcat5::eth::VlanTag & | vtag = satcat5::eth::VTAG_NONE |
||
| ) |
Automatic address resolution (user supplies IP only).
Definition at line 43 of file udp_core.cc.
|
overridevirtual |
Fetch a pointer to the underlying interface.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 62 of file udp_core.cc.
| void Address::init | ( | satcat5::udp::Dispatch * | iface | ) |
Deferred initialization of the upstream interface.
Used infrequently. If the constructor's interface argument is null, use this method to later assign the upstream interface.
Definition at line 23 of file udp_core.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 55 of file udp_core.cc.
|
overridevirtual |
Open a new frame to the designated address and type.
Child MUST override this method.
Implements satcat5::net::Address.
Definition at line 71 of file udp_core.cc.
|
inlineoverridevirtual |
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 from satcat5::net::Address.
Definition at line 104 of file udp_core.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 75 of file udp_core.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.