Missing header files since modularization for socket cases
authorJohn Abraham <john.abraham@gatech.edu>
Sun, 17 Jul 2011 08:01:33 -0400
changeset 7368 eaf06b48cb5c
parent 7367 cbd400202eb1
child 7369 dff58a5bcd31
Missing header files since modularization for socket cases
src/netanim/model/animation-interface.cc
src/netanim/wscript
--- a/src/netanim/model/animation-interface.cc	Sat Jul 09 03:22:59 2011 +0200
+++ b/src/netanim/model/animation-interface.cc	Sun Jul 17 08:01:33 2011 -0400
@@ -19,6 +19,20 @@
 
 // Interface between ns3 and the network animator
 
+
+// ns3 includes
+#include "ns3/animation-interface.h"
+#include "ns3/netanim-config.h"
+#include "ns3/channel.h"
+#include "ns3/config.h"
+#include "ns3/node.h"
+#include "ns3/mobility-model.h"
+#include "ns3/packet.h"
+#include "ns3/simulator.h"
+#include "ns3/animation-interface-helper.h"
+#include "ns3/wifi-mac-header.h"
+#include "ns3/wimax-mac-header.h"
+
 #include <stdio.h>
 #include <sstream>
 #include <fstream>
@@ -34,18 +48,6 @@
 #include <fcntl.h>
 #endif
 
-// ns3 includes
-#include "ns3/animation-interface.h"
-#include "ns3/channel.h"
-#include "ns3/config.h"
-#include "ns3/node.h"
-#include "ns3/mobility-model.h"
-#include "ns3/packet.h"
-#include "ns3/simulator.h"
-#include "ns3/animation-interface-helper.h"
-#include "ns3/wifi-mac-header.h"
-#include "ns3/wimax-mac-header.h"
-
 NS_LOG_COMPONENT_DEFINE ("AnimationInterface");
 
 namespace ns3 {
@@ -102,7 +104,9 @@
 {
 #if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H)
   if (ServerPortSet)
-    return;
+    {
+      return true;
+    }
   int s = socket (AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in addr;
   addr.sin_family = AF_INET;
--- a/src/netanim/wscript	Sat Jul 09 03:22:59 2011 +0200
+++ b/src/netanim/wscript	Sun Jul 17 08:01:33 2011 -0400
@@ -23,4 +23,5 @@
 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/netanim-config.h', top=True)