[haiku-commits] haiku: hrev53009 - headers/private/kernel/boot/net

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 26 Mar 2019 21:52:40 -0400 (EDT)

hrev53009 adds 1 changeset to branch 'master'
old head: fb52ab82d24eed15878194318124697dd373ff53
new head: fcf0b31fb90dd203148dab1c74b387f23fd9c95e
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=fcf0b31fb90d+%5Efb52ab82d24e

----------------------------------------------------------------------------

fcf0b31fb90d: bootloader: Add the network endianness macros to NetDefs.h.
  
  This file contains all the protocol- and interface-related
  definitions, so this seems to be where they belong.
  
  Required following previous commits.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53009
Commit:      fcf0b31fb90dd203148dab1c74b387f23fd9c95e
URL:         https://git.haiku-os.org/haiku/commit/?id=fcf0b31fb90d
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Mar 27 01:50:11 2019 UTC

----------------------------------------------------------------------------

1 file changed, 9 insertions(+)
headers/private/kernel/boot/net/NetDefs.h | 9 +++++++++

----------------------------------------------------------------------------

diff --git a/headers/private/kernel/boot/net/NetDefs.h 
b/headers/private/kernel/boot/net/NetDefs.h
index c46bc0e320..8363d3b7ab 100644
--- a/headers/private/kernel/boot/net/NetDefs.h
+++ b/headers/private/kernel/boot/net/NetDefs.h
@@ -15,6 +15,15 @@
 #include <util/kernel_cpp.h>
 
 
+// Network endianness
+#ifndef htonl
+#      define htonl(x) B_HOST_TO_BENDIAN_INT32(x)
+#      define ntohl(x) B_BENDIAN_TO_HOST_INT32(x)
+#      define htons(x) B_HOST_TO_BENDIAN_INT16(x)
+#      define ntohs(x) B_BENDIAN_TO_HOST_INT16(x)
+#endif
+
+
 // Ethernet
 
 #define ETH_ALEN                       6


Other related posts:

  • » [haiku-commits] haiku: hrev53009 - headers/private/kernel/boot/net - waddlesplash