Expand description
Network handling for PTP/CSPTP in ntpd-rs/statime.
This crate provides abstractions for dealing with the fact that both PTP and CSPTP need sockets with local bindings on ports 319 and 320. The operating system can only hand out 1 of those sockets per interface, plus a fallback socket. This crate provides multiplexing for multiple uses of this one socket, making implementing of simultaneous use of PTP and CSPTP, as well as more than one CSPTP connection at the same time, easier.
This is mostly intended as an internal crate for the ntpd-rs/statime ecosystem, though we plan to keep the version numbering consistent with semver. Be aware that we might be making breaking changes fairly often though when using this crate, and that we might not be receptive to changes making it work better for your particular use case if those changes have no value for ntpd-rs/statime ecosystem.
Structs§
- Connected
Socket - A socket that connected to a specific remote.
- Interface
- A handle for a network interface
- Network
Manager - The primary management struct for the PTP/CSPTP network sockets.
- Open
Socket - A socket not connected to a specific remote.
- Recv
Result - Result from a receive operation.
Enums§
- Timestamping
Clock - Description of which clock to use for timestamping messages.
Constants§
- CACHED_
TIMESTAMPS - The number of old send timestamps that are stored per interface.
- MAX_
PACKET_ SIZE - The maximum size for incoming packets
- PACKET_
BUFFER_ SIZE - The number of incoming packets that are buffered for a socket.
- TIMESTAMP_
FETCH_ TIMEOUT - The amount of time we are willing to wait for a send timestamp.
Traits§
- PtpAddress
Family - An address type which can be used for PTP/CSPTP traffic.