From 3635e3d74488e153896939f7a7cf1eaea9caf05c Mon Sep 17 00:00:00 2001 From: John Abraham Date: Sun, 17 Jul 2011 08:01:33 -0400 Subject: [PATCH] Missing header files since modularization for socket cases --- src/netanim/model/animation-interface.cc | 30 ++++++++++++++---------- src/netanim/wscript | 1 + 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/netanim/model/animation-interface.cc b/src/netanim/model/animation-interface.cc index 93ea2c12f..486865d93 100644 --- a/src/netanim/model/animation-interface.cc +++ b/src/netanim/model/animation-interface.cc @@ -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 #include #include @@ -34,18 +48,6 @@ #include #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 @@ bool AnimationInterface::SetServerPort (uint16_t port) { #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; diff --git a/src/netanim/wscript b/src/netanim/wscript index 2d1ce3dd1..22f86dcd4 100644 --- a/src/netanim/wscript +++ b/src/netanim/wscript @@ -23,4 +23,5 @@ def build (bld) : 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)