Revision: 488
http://vde.svn.sourceforge.net/vde/?rev=488&view=rev
Author: rd235
Date: 2011-04-05 10:05:11 +0000 (Tue, 05 Apr 2011)
Log Message:
-----------
bugfix (experimental): in hash.c, the mac address bytes were printed shuffled
on big endian machines
Modified Paths:
--------------
branches/rd235/vde-2/src/vde_switch/hash.c
Modified: branches/rd235/vde-2/src/vde_switch/hash.c
===================================================================
--- branches/rd235/vde-2/src/vde_switch/hash.c 2011-04-04 17:03:13 UTC (rev
487)
+++ branches/rd235/vde-2/src/vde_switch/hash.c 2011-04-05 10:05:11 UTC (rev
488)
@@ -59,9 +59,18 @@
return x;
}
+#if BYTE_ORDER == LITTLE_ENDIAN
#define EMAC2MAC6(X) \
(u_int)((X)&0xff), (u_int)(((X)>>8)&0xff), (u_int)(((X)>>16)&0xff), \
- (u_int)(((X)>>24)&0xff), (u_int)(((X)>>32)&0xff),
(u_int)(((X)>>40)&0xff)
+ (u_int)(((X)>>24)&0xff), (u_int)(((X)>>32)&0xff), (u_int)(((X)>>40)&0xff)
+#elif BYTE_ORDER == BIG_ENDIAN
+#define EMAC2MAC6(X) \
+ (u_int)(((X)>>24)&0xff), (u_int)(((X)>>16)&0xff),
(u_int)(((X)>>8)&0xff), \
+ (u_int)((X)&0xff), (u_int)(((X)>>40)&0xff), (u_int)(((X)>>32)&0xff)
+#else
+#error Unknown Endianess
+#endif
+
#define EMAC2VLAN(X) ((u_int16_t) ((X)>>48))
#define EMAC2VLAN2(X) ((u_int) (((X)>>48) &0xff)), ((u_int) (((X)>>56) &0xff))
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
vde-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vde-users