|
|
| 21 |
#include <stdio.h> |
21 |
#include <stdio.h> |
| 22 |
#include <sstream> |
22 |
#include <sstream> |
| 23 |
|
23 |
|
| 24 |
#include "ns3/net-anim-config.h" |
|
|
| 25 |
|
| 26 |
// Socket related includes |
| 27 |
#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H) |
| 28 |
# include <sys/socket.h> |
| 29 |
# include <netinet/in.h> |
| 30 |
#endif |
| 31 |
|
| 32 |
// ns3 includes |
24 |
// ns3 includes |
| 33 |
#include "ns3/animation-interface.h" |
25 |
#include "ns3/animation-interface.h" |
| 34 |
#include "ns3/channel.h" |
26 |
#include "ns3/channel.h" |
|
|
| 37 |
#include "ns3/node-location.h" |
29 |
#include "ns3/node-location.h" |
| 38 |
#include "ns3/packet.h" |
30 |
#include "ns3/packet.h" |
| 39 |
#include "ns3/simulator.h" |
31 |
#include "ns3/simulator.h" |
|
|
32 |
|
| 33 |
// Socket related includes |
| 34 |
#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H) |
| 35 |
# include <sys/socket.h> |
| 36 |
# include <netinet/in.h> |
| 37 |
#endif |
| 38 |
|
| 40 |
|
39 |
|
| 41 |
using namespace std; |
40 |
using namespace std; |
| 42 |
|
41 |
|
|
Lines 60-65
bool AnimationInterface::SetOutputFile (
|
Link Here
|
|---|
|
| 60 |
return true; |
59 |
return true; |
| 61 |
} |
60 |
} |
| 62 |
|
61 |
|
|
|
62 |
#if defined(HAVE_SYS_SOCKET_H) && defined(HAVE_NETINET_IN_H) |
| 63 |
bool AnimationInterface::SetServerPort (uint16_t port) |
63 |
bool AnimationInterface::SetServerPort (uint16_t port) |
| 64 |
{ |
64 |
{ |
| 65 |
int s = socket (AF_INET, SOCK_STREAM, 0); |
65 |
int s = socket (AF_INET, SOCK_STREAM, 0); |
|
Lines 82-87
bool AnimationInterface::SetServerPort (
|
Link Here
|
|---|
|
| 82 |
setsockopt (s, SOL_SOCKET, SO_LINGER, &t, sizeof(t)); |
82 |
setsockopt (s, SOL_SOCKET, SO_LINGER, &t, sizeof(t)); |
| 83 |
return true; |
83 |
return true; |
| 84 |
} |
84 |
} |
|
|
85 |
#endif |
| 85 |
|
86 |
|
| 86 |
bool AnimationInterface::SetInternalAnimation () |
87 |
bool AnimationInterface::SetInternalAnimation () |
| 87 |
{ |
88 |
{ |