Missing header files since modularization for socket cases
parent
bca1786023
commit
3635e3d744
|
@ -19,6 +19,20 @@
|
||||||
|
|
||||||
// Interface between ns3 and the network animator
|
// 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 <stdio.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -34,18 +48,6 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#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");
|
NS_LOG_COMPONENT_DEFINE ("AnimationInterface");
|
||||||
|
|
||||||
namespace ns3 {
|
namespace ns3 {
|
||||||
|
@ -102,7 +104,9 @@ bool AnimationInterface::SetServerPort (uint16_t port)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H)
|
#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H)
|
||||||
if (ServerPortSet)
|
if (ServerPortSet)
|
||||||
return;
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
int s = socket (AF_INET, SOCK_STREAM, 0);
|
int s = socket (AF_INET, SOCK_STREAM, 0);
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
|
|
|
@ -23,4 +23,5 @@ def build (bld) :
|
||||||
def configure (conf) :
|
def configure (conf) :
|
||||||
conf.check (header_name='sys/socket.h', define_name='HAVE_SYS_SOCKET_H')
|
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.check (header_name='netinet/in.h', define_name='HAVE_NETINET_IN_H')
|
||||||
|
conf.write_config_header ('ns3/netanim-config.h', top=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue