When a messages is sent with the DEFER_EVENT flag, the lower transport
code does not fetch the time stamp right away. This patch introduces
a method that allows a second call to retrieve the waiting transmit
time stamp.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Originally the 'event' parameter to transport_send() was a single
Boolean flag. Over time, we grew an enumerated list of event
flavors, but the function signatures were never updated. This patch
changes the methods to use the proper type.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This modifies all transports to use a new common address type, struct
address. This address is stored in a ptp_message for all received messages.
For sending, the "default" address is used with the default sending
functions, transport_send and transport_peer. The default address depends on
the transport; it's supposed to be the multicast address assigned by the
transport specification.
Later, a new transport_sendto function will be implemented that sends to the
address contained in the passed ptp_message.
Signed-off-by: Jiri Benc <jbenc@redhat.com>
The callers of those functions are all using ptp_message. As we're going to
return more information (the address), let those functions just fill in the
ptp_message fields directly.
Some minor reshuffling needed to prevent circular header dependencies.
Signed-off-by: Jiri Benc <jbenc@redhat.com>
This means no conversion is necessary between the transport_type and
the networkProtocol field of the PortAddress struct. Not currently an
issue, but will be needed for implementing the CLOCK_DESCRIPTION
management TLV.
Although the UDP/IPv4 layer does not need any state per instance (other
than the two file descriptors), the raw Ethernet layer will need this.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>