Jiri Benc
2014-04-11 10:25:50 UTC
As sugested by Richard, introduce a common address struct and let the
transports use it. I chose struct sockaddr to hold the actual address
contents, as it allows to store also an UDP port.
No functional changes by this patchset, just code refactoring. Tested with
UDPv4 E2E and P2P, UDPv6 E2E and P2P, 802.3 E2E and with pmc. The last
patch implements transport_sendto, which will be needed by phc2sys
autoconfiguration.
Signed-off-by: Jiri Benc <***@redhat.com>
Jiri Benc (5):
raw: replace hard coded constants by MAC_LEN
raw: separate src and dst addresses
Let transport_recv/send/peer use ptp_message
Common type holding an address
Implement transport_sendto
address.h | 38 ++++++++++++++++++++++++
ether.h | 13 ++++----
msg.h | 20 ++++++++++++-
pmc_common.c | 6 +--
pmc_common.h | 1 +
port.c | 8 ++---
raw.c | 62 ++++++++++++++++++++++++++-------------
sk.c | 34 ++++++++++++---------
sk.h | 11 ++++---
transport.c | 29 ++++++++++++++----
transport.h | 54 +++++++++++++++++++++++-----------
transport_private.h | 11 +++++--
udp.c | 70 ++++++++++++++++++++++++++-----------------
udp6.c | 81 ++++++++++++++++++++++++++++++---------------------
uds.c | 34 ++++++++++++++-------
util.c | 18 ++++++-----
16 files changed, 326 insertions(+), 164 deletions(-)
create mode 100644 address.h
transports use it. I chose struct sockaddr to hold the actual address
contents, as it allows to store also an UDP port.
No functional changes by this patchset, just code refactoring. Tested with
UDPv4 E2E and P2P, UDPv6 E2E and P2P, 802.3 E2E and with pmc. The last
patch implements transport_sendto, which will be needed by phc2sys
autoconfiguration.
Signed-off-by: Jiri Benc <***@redhat.com>
Jiri Benc (5):
raw: replace hard coded constants by MAC_LEN
raw: separate src and dst addresses
Let transport_recv/send/peer use ptp_message
Common type holding an address
Implement transport_sendto
address.h | 38 ++++++++++++++++++++++++
ether.h | 13 ++++----
msg.h | 20 ++++++++++++-
pmc_common.c | 6 +--
pmc_common.h | 1 +
port.c | 8 ++---
raw.c | 62 ++++++++++++++++++++++++++-------------
sk.c | 34 ++++++++++++---------
sk.h | 11 ++++---
transport.c | 29 ++++++++++++++----
transport.h | 54 +++++++++++++++++++++++-----------
transport_private.h | 11 +++++--
udp.c | 70 ++++++++++++++++++++++++++-----------------
udp6.c | 81 ++++++++++++++++++++++++++++++---------------------
uds.c | 34 ++++++++++++++-------
util.c | 18 ++++++-----
16 files changed, 326 insertions(+), 164 deletions(-)
create mode 100644 address.h
--
1.7.6.5
1.7.6.5