From 9e6b7e8dbfc9169dfbade508de3df760d3a5c75e Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 14 Oct 2016 11:02:50 +0200 Subject: [PATCH 1/2] sock: change IPv4 address type to array --- sys/include/net/sock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/net/sock.h b/sys/include/net/sock.h index d51f9ab2ca..8528ba7709 100644 --- a/sys/include/net/sock.h +++ b/sys/include/net/sock.h @@ -172,7 +172,7 @@ typedef struct { */ uint8_t ipv6[16]; #endif - uint32_t ipv4; /**< IPv4 address mode */ + uint8_t ipv4[4]; /**< IPv4 address mode */ } addr; /**< address */ /** @@ -208,7 +208,7 @@ struct _sock_tl_ep { */ uint8_t ipv6[16]; #endif - uint32_t ipv4; /**< IPv4 address mode */ + uint8_t ipv4[4]; /**< IPv4 address mode */ } addr; /**< address */ /** From 6d5fdbfa1c97a21a1db9988d89944d4d22605ddc Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 14 Oct 2016 11:11:08 +0200 Subject: [PATCH 2/2] sock: document byte order for port --- sys/include/net/sock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/include/net/sock.h b/sys/include/net/sock.h index 8528ba7709..70ac5e024c 100644 --- a/sys/include/net/sock.h +++ b/sys/include/net/sock.h @@ -222,7 +222,7 @@ struct _sock_tl_ep { * over */ uint16_t netif; - uint16_t port; /**< transport layer port */ + uint16_t port; /**< transport layer port (in host byte order) */ }; #ifdef __cplusplus