10 #include <satcat5/ip_core.h>
11 #include <satcat5/ip_dispatch.h>
13 #include <satcat5/ptp_header.h>
14 #include <satcat5/ptp_interface.h>
16 #include <satcat5/udp_core.h>
21 enum class DispatchTo {
58 {
return m_ip->igmp(); }
60 {
return m_ip->macaddr(); }
64 { m_callback = client; }
82 satcat5::ptp::DispatchTo where,
unsigned num_bytes, u8 ptp_msg_type);
100 satcat5::ip::Addr get_dst_ip(u8 ptp_msg_type, satcat5::ptp::DispatchTo addr)
const;
Host/Client for the Internet Group Management Protocol (IGMP).
Abstract API for writing byte-streams and packets.
Protocol handler and dispatch unit for Internet Protocol v4 (IPv4).
An "OnDemand" object is polled only on request.
Client for the IEEE 1588-2019 Precision Time Protocol (PTP)
Dispatch and formatting for L2 and L3 PTP messages.
void ptp_callback(satcat5::ptp::Client *client)
Set the callback object for incoming messages.
satcat5::ptp::Time ptp_tx_start()
Accessors for one-step and two-step timestamps.
satcat5::ptp::Time ptp_tx_timestamp()
Accessors for one-step and two-step timestamps.
void store_addr(const satcat5::eth::MacAddr &mac, const satcat5::ip::Addr &ip=satcat5::ip::ADDR_NONE, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE)
Set the address for use with DispatchTo::STORED.
satcat5::ptp::Time ptp_rx_timestamp()
Accessors for one-step and two-step timestamps.
Dispatch(satcat5::ptp::Interface *iface, satcat5::ip::Dispatch *ip)
Attach this object to the network port and IP stack.
void store_reply_addr()
Set the address for use with DispatchTo::STORED.
satcat5::io::Writeable * ptp_send(satcat5::ptp::DispatchTo where, unsigned num_bytes, u8 ptp_msg_type)
Send a PTP message to the designated address(es).
void poll_demand() override
Deferred event handler, called after request().
satcat5::ptp::Time ptp_time_now()
Accessors for one-step and two-step timestamps.
Generic API for network ports that support PTP.
virtual satcat5::ptp::Time ptp_rx_timestamp()=0
Return timestamp of the current incoming message.
virtual satcat5::ptp::Time ptp_tx_timestamp()=0
Return timestamp of the most recent outgoing message.
virtual satcat5::ptp::Time ptp_time_now()=0
Return the best available estimate of the current time.
virtual satcat5::ptp::Time ptp_tx_start()=0
Begin sending a timestamped message.
High-precision timestamp for use with PTP / IEEE1588.
Core event-processing loop for SatCat5 software.
High-precision "Time" object for use with PTP / IEEE1588.
An Ethernet MAC address (with serializable interface).
Header contents for an 802.1Q Virtual-LAN tag.
IPv4 address is a 32-bit unsigned integer.
UDP and TCP ports are both 16-bit unsigned integers.