70 #include "ns3/abort.h" 
   71 #include "ns3/core-module.h" 
   72 #include "ns3/internet-module.h" 
   73 #include "ns3/network-module.h" 
   74 #include "ns3/fd-net-device-module.h" 
   75 #include "ns3/applications-module.h" 
   76 #include "ns3/ipv4-static-routing-helper.h" 
   77 #include "ns3/ipv4-list-routing-helper.h" 
   90 main (
int argc, 
char *argv[])
 
   94   std::string deviceName (
"eth0");
 
   95   std::string remote (
"173.194.34.51"); 
 
  102   cmd.
AddValue (
"deviceName", 
"Device name", deviceName);
 
  103   cmd.
AddValue (
"remote", 
"Remote IP address (dotted decimal only please)", remote);
 
  104   cmd.
Parse (argc, argv);
 
  108   NS_ABORT_MSG_IF (localIp == 
"1.2.3.4", 
"You must change the local IP address before running this example");
 
  110   Ipv4Mask localMask (
"255.255.255.0");
 
  168   internetStackHelper.
Install (node);
 
  172   uint32_t 
interface = ipv4->AddInterface (device);
 
  176   ipv4->
SetUp (interface);
 
  192   NS_ABORT_MSG_IF (gateway == 
"1.2.3.4", 
"You must change the gateway IP address before running this example");
 
uint32_t AddApplication(Ptr< Application > application)
 
void SetStopTime(Time stop)
Specify application stop time. 
 
keep track of time values and allow control of global simulation resolution 
 
virtual NetDeviceContainer Install(Ptr< Node > node) const 
 
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table. 
 
hold variables of type string 
 
Ptr< NetDevice > Get(uint32_t i) const 
Get the Ptr<NetDevice> stored in this container at a given index. 
 
a class to represent an Ipv4 address mask 
 
aggregate IP/TCP/UDP functionality to existing Nodes. 
 
void Connect(std::string path, const CallbackBase &cb)
 
static void PingRtt(std::string context, Time rtt)
 
static void Add(std::string name, Ptr< Object > object)
Add the association between the string "name" and the Ptr<Object> obj. 
 
static Mac48Address Allocate(void)
 
virtual void SetUp(uint32_t interface)=0
 
holds a vector of ns3::NetDevice pointers 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
static void Bind(std::string name, const AttributeValue &value)
 
Parse command-line arguments. 
 
static void Destroy(void)
 
Access to the Ipv4 forwarding table, interfaces, and configuration. 
 
void SetDeviceName(std::string deviceName)
 
void Install(std::string nodeName) const 
 
#define NS_LOG_UNCOND(msg)
 
hold objects of type ns3::Ipv4Address 
 
Ipv4 addresses are stored in host order in this class. 
 
NS_LOG_COMPONENT_DEFINE("PacketLossCounter")
 
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const 
 
int main(int argc, char *argv[])
 
a class to store IPv4 address information on an interface 
 
Helper class that adds ns3::Ipv4StaticRouting objects. 
 
hold objects of type ns3::Mac48Address 
 
void AddValue(const std::string &name, const std::string &help, T &value)
 
virtual void SetMetric(uint32_t interface, uint16_t metric)=0
 
virtual bool AddAddress(uint32_t interface, Ipv4InterfaceAddress address)=0
 
void Parse(int argc, char *argv[])
 
void EnablePcap(std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
Enable pcap output the indicated net device. 
 
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if cond is true. 
 
void SetAttribute(std::string name, const AttributeValue &value)
 
Ptr< T > GetObject(void) const 
 
build a set of FdNetDevice objects attached to a physical network interface 
 
void SetStartTime(Time start)
Specify application start time.