Update of /cvsroot/sharedaemon/core/src
In directory sc8-pr-cvs1:/tmp/cvs-serv30362
Modified Files:
osdep.h
Log Message:
Added helper macro btoh32 (big endian to host)
Index: osdep.h
===================================================================
RCS file: /cvsroot/sharedaemon/core/src/osdep.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- osdep.h 21 Nov 2003 04:04:17 -0000 1.11
+++ osdep.h 11 Dec 2003 02:57:20 -0000 1.12
@@ -31,6 +31,12 @@
* little endian to big endian (Networt Byte Order) in lton32 and back to
* little endian in ntohl. But that is the problem with unportable data
* exchange formats as used in the ed2k network.
+ *
+ * n = network
+ * h = host
+ *
+ * l = little endian
+ * b = big endian
*/
#define ltoh32(x) ntohl(lton32(x))
#define lton32(little_endian) ( \
@@ -44,6 +50,8 @@
(((little_endian )&(u16)0xff)<< 8) \
|(((little_endian>> 8)&(u16)0xff) ) \
)
+#define btoh32(x) ntohl(x)
+
#ifdef MACOSX
#include <sys/types.h>
|