merge with HEAD
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 05 Nov 2009 21:04:37 +0100
changeset 5480 83baafea199f
parent 5479 b1f7a3a87887 (current diff)
parent 5478 a019314e2ab3 (diff)
child 5482 fbfdb256aaed
child 5484 eec7dc045214
merge with HEAD
--- a/RELEASE_NOTES	Thu Nov 05 21:04:05 2009 +0100
+++ b/RELEASE_NOTES	Thu Nov 05 21:04:37 2009 +0100
@@ -21,7 +21,6 @@
   - linux x86_64 gcc 4.4.0, 4.3.2, 4.2.3, 4.2.1, 4.1.3, 3.4.6
   - MacOS X ppc and x86 (gcc 4.0.x and 4.2.x)
   - cygwin gcc 3.4.4 (debug only), gcc 4.3.2 (debug and optimized)
-  - mingw gcc 3.4.5 (debug only)
 
 Not all ns-3 options are available on all platforms; consult the
 wiki for more information:
@@ -78,7 +77,7 @@
 
 Known issues
 ------------
-ns-3 build is known to fail on the following platforms:
+ns-3.6 build is known to fail on the following platforms:
   - gcc 3.3 and earlier
   - optimized builds on gcc 3.4.4 and 3.4.5
   - optimized builds on linux x86 gcc 4.0.x
--- a/src/contrib/net-anim/animation-interface.cc	Thu Nov 05 21:04:05 2009 +0100
+++ b/src/contrib/net-anim/animation-interface.cc	Thu Nov 05 21:04:37 2009 +0100
@@ -21,9 +21,15 @@
 #include <stdio.h>
 #include <sstream>
 
+#include "ns3/net-anim-config.h"
+
 // Socket related includes
-#include <sys/socket.h>
-#include <netinet/in.h>
+#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H)
+# include <sys/socket.h>
+# include <netinet/in.h>
+#else
+#include <fcntl.h>
+#endif
 
 // ns3 includes
 #include "ns3/animation-interface.h"
@@ -58,6 +64,7 @@
 
 bool AnimationInterface::SetServerPort (uint16_t port)
 {
+#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H)
   int s = socket (AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in addr;
   addr.sin_family = AF_INET;
@@ -77,6 +84,8 @@
   int t = 1;
   setsockopt (s, SOL_SOCKET, SO_LINGER, &t, sizeof(t));
   return true;
+#endif
+  return false;//never reached unless the above is disabled
 }
 
 bool AnimationInterface::SetInternalAnimation ()
--- a/src/contrib/net-anim/point-to-point-dumbbell-helper.cc	Thu Nov 05 21:04:05 2009 +0100
+++ b/src/contrib/net-anim/point-to-point-dumbbell-helper.cc	Thu Nov 05 21:04:37 2009 +0100
@@ -21,10 +21,6 @@
 #include <iostream>
 #include <sstream>
 
-// Socket related includes
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 // ns3 includes
 #include "ns3/animation-interface.h"
 #include "ns3/point-to-point-dumbbell-helper.h"
--- a/src/contrib/net-anim/wscript	Thu Nov 05 21:04:05 2009 +0100
+++ b/src/contrib/net-anim/wscript	Thu Nov 05 21:04:37 2009 +0100
@@ -1,5 +1,11 @@
 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 
+def configure(conf):
+    conf.check(header_name='sys/socket.h', define_name='HAVE_SYS_SOCKET_H')
+    conf.check(header_name='netinet/in.h', define_name='HAVE_NETINET_IN_H')
+    conf.write_config_header('ns3/net-anim-config.h', top=True)
+
+
 def build(bld):
     obj = bld.create_ns3_module('net-anim')
     obj.source = [
--- a/src/contrib/wscript	Thu Nov 05 21:04:05 2009 +0100
+++ b/src/contrib/wscript	Thu Nov 05 21:04:37 2009 +0100
@@ -14,9 +14,11 @@
     conf.report_optional_feature("XmlIo", "XmlIo",
                                  conf.env['ENABLE_LIBXML2'],
                                  "library 'libxml-2.0 >= 2.7' not found")
-    conf.sub_config('stats')
+    conf.write_config_header('ns3/contrib-config.h', top=True)
 
-    conf.write_config_header('ns3/contrib-config.h', top=True)
+    conf.sub_config('stats')
+    conf.sub_config('net-anim')
+
 
 def build(bld):
     module = bld.create_ns3_module('contrib', ['simulator', 'common'])
--- a/src/devices/mesh/dot11s/hwmp-protocol.cc	Thu Nov 05 21:04:05 2009 +0100
+++ b/src/devices/mesh/dot11s/hwmp-protocol.cc	Thu Nov 05 21:04:37 2009 +0100
@@ -401,6 +401,7 @@
   //acceptance cretirea:
   std::map<Mac48Address, std::pair<uint32_t, uint32_t> >::const_iterator i = m_hwmpSeqnoMetricDatabase.find (
       preq.GetOriginatorAddress ());
+  bool freshInfo (true);
   if (i != m_hwmpSeqnoMetricDatabase.end ())
     {
       if ((int32_t)(i->second.first - preq.GetOriginatorSeqNumber ())  > 0)
@@ -409,6 +410,7 @@
         }
       if (i->second.first == preq.GetOriginatorSeqNumber ())
         {
+          freshInfo = false;
           if (i->second.second <= preq.GetMetric ())
             {
               return;
@@ -421,7 +423,7 @@
   std::vector<Ptr<DestinationAddressUnit> > destinations = preq.GetDestinationList ();
   //Add reactive path to originator:
   if (
-      ((int32_t)(i->second.first - preq.GetOriginatorSeqNumber ())  < 0) ||
+      (freshInfo) ||
       (
         (m_rtable->LookupReactive (preq.GetOriginatorAddress ()).retransmitter == Mac48Address::GetBroadcast ()) ||
         (m_rtable->LookupReactive (preq.GetOriginatorAddress ()).metric > preq.GetMetric ())
@@ -562,9 +564,17 @@
   //acceptance cretirea:
   std::map<Mac48Address, std::pair<uint32_t, uint32_t> >::const_iterator i = m_hwmpSeqnoMetricDatabase.find (
       prep.GetOriginatorAddress ());
-  if ((i != m_hwmpSeqnoMetricDatabase.end ()) && ((int32_t)(i->second.first - prep.GetOriginatorSeqNumber ()) > 0))
+  bool freshInfo (true);
+  if (i != m_hwmpSeqnoMetricDatabase.end ())
     {
-      return;
+      if ((int32_t)(i->second.first - prep.GetOriginatorSeqNumber ()) > 0)
+        {
+          return;
+        }
+      if (i->second.first == prep.GetOriginatorSeqNumber ())
+        {
+          freshInfo = false;
+        }
     }
   m_hwmpSeqnoMetricDatabase[prep.GetOriginatorAddress ()] = std::make_pair (prep.GetOriginatorSeqNumber (), prep.GetMetric ());
   //update routing info
@@ -574,7 +584,7 @@
   //Add a reactive path only if seqno is fresher or it improves the
   //metric
   if (
-      (((int32_t)(i->second.first - prep.GetOriginatorSeqNumber ()) < 0)) ||
+      (freshInfo) ||
       (
        ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).retransmitter == Mac48Address::GetBroadcast ()) ||
        ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).metric > prep.GetMetric ())