As you can see htons is used a few lines earlier.
If this patch is not correct that function call needs to change (and more) - 
both can not be correct...

/RogerL

Index: IPAddressP.nc
===================================================================
--- IPAddressP.nc       (revision 5251)
+++ IPAddressP.nc       (working copy)
@@ -87,9 +87,9 @@
 
     if (addr->s6_addr16[0] == htons(0xfe80)) {
       // link-local
-      if (m_short_addr && 
-          addr->s6_addr16[5] == ntohs(0x00FF) &&
-          addr->s6_addr16[6] == ntohs(0xFE00)) {
+      if (m_short_addr &&
+          addr->s6_addr16[5] == htons(0x00FF) &&
+          addr->s6_addr16[6] == htons(0xFE00)) {
         if (ntohs(addr->s6_addr16[4]) == panid && 
             ntohs(addr->s6_addr16[7]) == saddr) {
           return TRUE;



-- 
Roger Larsson, Research Engineer
Division of Mobile Networking and Computing
LuleƄ University of Technology
SE-931 87 SkellefteƄ
Phone: +46 (0)910 58 53 18
Mobile: +46 (0)70 531 72 58
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to