Commit Graph

12 Commits (2462f675c33b1095b783941bb339f996720a706f)

Author SHA1 Message Date
Jiri Benc 4df924b253 Implement transport_sendto
Also, document transport_send, transport_peer and transport_sendto usage.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
2014-04-25 14:28:14 +02:00
Jiri Benc e804e6f9a0 Common type holding an address
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>
2014-04-25 14:28:14 +02:00
Jiri Benc bbe634d790 Let transport_recv/send/peer use ptp_message
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>
2014-04-17 06:49:38 +02:00
Stephan Gatzka 110849d422 Make functions and structs dealing with string literals const correct.
This allows the compiler to check if someone writes into string
literals.

Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
2014-02-07 19:41:47 +01:00
Geoff Salmon e010937783 transport: adds interface for getting type, and physical/protocol address
Needed for CLOCK_DESCRIPTION management TLV.
2013-01-14 19:12:18 +01:00
Geoff Salmon 5c47cbfedf Make enum transport_type match the networkProtocol enumeration
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.
2013-01-14 19:12:17 +01:00
Richard Cochran 18cac67b33 Introduce transport over UNIX domain sockets.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-08-25 09:09:10 +02:00
Richard Cochran aea4cfcd50 Add transport over UDP IPv6.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-04-20 16:30:01 +02:00
Richard Cochran beb3d5d821 Expand the transport layer interface with a peer transmission method.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-04-05 17:48:59 +02:00
Richard Cochran 32d461d4ed Add a transport over raw Ethernet packets.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-03-18 09:31:21 +01:00
Richard Cochran 29463cd306 Make the transport layer more opaque.
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>
2012-03-13 08:28:37 +01:00
Richard Cochran 60f3a85463 Add transport over UDP IPv4.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2011-11-06 08:16:19 +01:00