23 #include "ns3/simulator.h"    24 #include "ns3/config.h"    25 #include "ns3/node-list.h"    26 #include "ns3/wifi-net-device.h"    27 #include "ns3/ppp-header.h"    28 #include "ns3/wifi-mac-header.h"    29 #include "ns3/ethernet-header.h"    31 #include "ns3/abort.h"    39 #define NUM_LAST_PACKETS 10    42 std::vector<std::string>
    45   std::vector<std::string> results;
    47   while ((cutAt = str.find_first_of (
'/')) != str.npos)
    51           results.push_back (str.substr (0,cutAt));
    53       str = str.substr (cutAt+1);
    55   if (str.length () > 0)
    57       results.push_back (str);
    78   virtual void Print (std::ostream &os) 
const;
    94     .SetGroupName (
"Visualizer")
   188   std::ostringstream sstream;
   189   sstream << 
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/MacTx";
   193   sstream << 
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/Rx";
   197   sstream << 
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/PromiscRx";
   206   std::ostringstream sstream;
   207   sstream << 
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/Tx";
   211   sstream <<
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/Rx";
   220   std::ostringstream sstream;
   221   sstream << 
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/TxQueue/Dequeue";
   225   sstream << 
"/NodeList/*/DeviceList/*/$" << deviceTypeName << 
"/Rx";
   233                                              << 
" PacketCaptureOptions (headers size = " << options.
headers.size ()
   267 std::vector<std::string>
   299   for (std::map<TxRecordKey, TxRecordValue>::iterator iter = 
m_txRecords.begin ();
   302       if (iter->second.time < expirationTime)
   316       if (iter->second < expirationTime)
   342       visualImpl->RunRealSimulator ();
   380   bool retval = (transmitter == other.
transmitter) &&
   390   std::map<uint32_t, std::vector<NetDeviceStatistics> >::iterator nodeStatsIter = 
m_nodesStatistics.find (node);
   391   std::vector<NetDeviceStatistics> *stats;
   399       stats = &(nodeStatsIter->second);
   414       *outOptions = &iter->second;
   421   switch (options.
mode)
   429         while (metadataIterator.
HasNext ())
   442         std::set<TypeId> missingHeaders (options.
headers);
   444         while (metadataIterator.
HasNext ())
   447             std::set<TypeId>::iterator missingIter = missingHeaders.find (item.
tid);
   448             if (missingIter != missingHeaders.end ())
   450                 missingHeaders.erase (missingIter);
   453         if (missingHeaders.size () == 0)
   473   std::vector<std::string> splitPath = 
PathSplit (context);
   474   int nodeIndex = std::atoi (splitPath[1].c_str ());
   504   std::map<Ptr<Node>, uint32_t>::iterator iter = 
m_packetDrops.find (node);
   511       iter->second += packet->
GetSize ();
   533   std::vector<std::string> splitPath = 
PathSplit (context);
   534   int nodeIndex = std::atoi (splitPath[1].c_str ());
   535   int devIndex = std::atoi (splitPath[3].c_str ());
   552       lastPacket.
device = device;
   553       lastPacket.
to = destinationAddress;
   580   if (destinationAddress == device->GetBroadcast ())
   609   if (hdr.IsToDs () && !hdr.IsFromDs ())
   611       destinationAddress = hdr.GetAddr3 ();
   613   else if (!hdr.IsToDs () && hdr.IsFromDs ())
   615       destinationAddress = hdr.GetAddr1 ();
   617   else if (!hdr.IsToDs () && !hdr.IsFromDs ())
   619       destinationAddress = hdr.GetAddr1 ();
   623       destinationAddress = hdr.GetAddr3 ();
   660       NS_LOG_WARN (
"Packet has no byte tag; wimax link?");
   665   std::vector<std::string> splitPath = 
PathSplit (context);
   666   int nodeIndex = std::atoi (splitPath[1].c_str ());
   667   int devIndex = std::atoi (splitPath[3].c_str ());
   685       lastPacket.
device = device;
   686       lastPacket.
from = from;
   697       NS_LOG_DEBUG (
"RX Packet " << uid << 
" is not of interest");
   703   std::map<TxRecordKey, TxRecordValue>::iterator recordIter = 
   708       NS_LOG_DEBUG (
"RX Packet " << uid << 
" was not transmitted?!");
   716       NS_LOG_WARN (
"Node " << node->
GetId () << 
" receiving back the same packet (UID=" << uid
   717                            << 
") it had previously transmitted, on the same channel!");
   723 #ifdef  NS3_LOG_ENABLE   727       for (std::map<TransmissionSampleKey,TransmissionSampleValue>::const_iterator iter
   730           NS_LOG_DEBUG (iter->first.transmitter<<
"/"<<iter->first.transmitter->GetId () << 
", "   731                                                << iter->first.receiver<<
"/"<<iter->first.receiver->GetId ()
   732                                                << 
", " << iter->first.channel << 
" => " << iter->second.bytes << 
" (@ " << &iter->second << 
")");
   738   std::map<TransmissionSampleKey,TransmissionSampleValue>::iterator
   747                                 << 
" bytes more. => new sample with " << packet->
GetSize () << 
" bytes.");
   756                                 << 
" bytes more. => sample " << &sample << 
" with bytes " << sample.
bytes);
   779   if (hdr.IsToDs () && !hdr.IsFromDs ())
   781       sourceAddress = hdr.GetAddr2 ();
   783   else if (!hdr.IsToDs () && hdr.IsFromDs ())
   785       sourceAddress = hdr.GetAddr3 ();
   787   else if (!hdr.IsToDs () && !hdr.IsFromDs ())
   789       sourceAddress = hdr.GetAddr2 ();
   793       sourceAddress = hdr.GetAddr4 ();
   866   for (std::map<TransmissionSampleKey, TransmissionSampleValue>::const_iterator
   873       sample.
receiver = iter->first.receiver;
   874       sample.
channel = iter->first.channel;
   875       sample.
bytes = iter->second.bytes;
   877                             << 
": " << sample.
bytes << 
" bytes.");
   878       list.push_back (sample);
   889   for (std::map<
Ptr<Node>, uint32_t>::const_iterator
   896       sample.
bytes = iter->second;
   898                           << 
": " << sample.
bytes << 
" bytes dropped.");
   899       list.push_back (sample);
   911 std::vector<PyViz::NodeStatistics>
   914   std::vector<PyViz::NodeStatistics> retval;
   915   for (std::map<uint32_t, std::vector<NetDeviceStatistics> >::const_iterator iter = 
m_nodesStatistics.begin ();
   919       retval.push_back (stats);
   930   std::map<uint32_t, LastPacketsSample>::const_iterator
  1020     line.
end.
x += line.
dx * (m_clipMin.
y - line.
end.
y) / line.
dy;
  1021     line.
end.
y = m_clipMin.
y;
  1029     line.
end.
x += line.
dx * (m_clipMax.
y - line.
end.
y) / line.
dy;
  1030     line.
end.
y = m_clipMax.
y;
  1039     line.
end.
y += line.
dy * (m_clipMax.
x - line.
end.
x) / line.
dx;
  1040     line.
end.
x = m_clipMax.
x;
  1049     line.
end.
y += line.
dy * (m_clipMin.
x - line.
end.
x) / line.
dx;
  1050     line.
end.
x = m_clipMin.
x;
  1061     : m_clipMin (clipMin), m_clipMax (clipMax)
  1073     uint8_t lineCode = 0;
  1075     if (line.
end.
y < m_clipMin.
y)
  1077     else if (line.
end.
y > m_clipMax.
y)
  1080     if (line.
end.
x > m_clipMax.
x)
  1082     else if (line.
end.
x < m_clipMin.
x)
  1085     if (line.
start.
y < m_clipMin.
y)
  1087     else if (line.
start.
y > m_clipMax.
y)
  1090     if (line.
start.
x > m_clipMax.
x)
  1092     else if (line.
start.
x < m_clipMin.
x)
  1111         ClipEndRight (line);
  1115         ClipEndBottom (line);
  1120         if (line.
end.
y > m_clipMax.
y)
  1121           ClipEndBottom (line);
  1125         ClipEndRight (line);
  1126         if (line.
end.
y > m_clipMax.
y)
  1127           ClipEndBottom (line);
  1136         if (line.
end.
y < m_clipMin.
y)
  1141         ClipEndRight (line);
  1142         if (line.
end.
y < m_clipMin.
y)
  1148         ClipStartLeft (line);
  1152         ClipStartLeft (line);
  1153         ClipEndRight (line);
  1157         ClipStartLeft (line);
  1158         if (line.
start.
y > m_clipMax.
y)
  1160         ClipEndBottom (line);
  1164         ClipStartLeft (line);
  1165         if (line.
start.
y > m_clipMax.
y)
  1167         ClipEndBottom (line);
  1168         if (line.
end.
x > m_clipMax.
x)
  1169           ClipEndRight (line);
  1173         ClipStartLeft (line);
  1174         if (line.
start.
y < m_clipMin.
y)
  1180         ClipStartLeft (line);
  1181         if (line.
start.
y < m_clipMin.
y)
  1184         if (line.
end.
x > m_clipMax.
x)
  1185           ClipEndRight (line);
  1190         ClipStartRight (line);
  1194         ClipStartRight (line);
  1199         ClipStartRight (line);
  1200         if (line.
start.
y > m_clipMax.
y)
  1202         ClipEndBottom (line);
  1206         ClipStartRight (line);
  1207         if (line.
start.
y > m_clipMax.
y)
  1209         ClipEndBottom (line);
  1210         if (line.
end.
x < m_clipMin.
x)
  1215         ClipStartRight (line);
  1216         if (line.
start.
y < m_clipMin.
y)
  1222         ClipStartRight (line);
  1223         if (line.
start.
y < m_clipMin.
y)
  1226         if (line.
end.
x < m_clipMin.
x)
  1232         ClipStartBottom (line);
  1236         ClipStartBottom (line);
  1237         if (line.
start.
x < m_clipMin.
x)
  1240         if (line.
end.
y > m_clipMax.
y)
  1241           ClipEndBottom (line);
  1245         ClipStartBottom (line);
  1246         if (line.
start.
x > m_clipMax.
x)
  1248         ClipEndRight (line);
  1252         ClipStartBottom (line);
  1257         ClipStartBottom (line);
  1258         if (line.
start.
x < m_clipMin.
x)
  1261         if (line.
end.
y < m_clipMin.
y)
  1266         ClipStartBottom (line);
  1267         if (line.
start.
x > m_clipMax.
x)
  1269         ClipEndRight (line);
  1270         if (line.
end.
y < m_clipMin.
y)
  1276         ClipStartLeft (line);
  1277         if (line.
start.
y > m_clipMax.
y)
  1278           ClipStartBottom (line);
  1282         ClipEndRight (line);
  1283         if (line.
end.
y > m_clipMax.
y)
  1285         ClipStartBottom (line);
  1286         if (line.
start.
x < m_clipMin.
x)
  1287           ClipStartLeft (line);
  1292         if (line.
end.
x < m_clipMin.
x)
  1294         ClipStartBottom (line);
  1295         if (line.
start.
x < m_clipMin.
x)
  1296           ClipStartLeft (line);
  1300         ClipStartLeft (line);
  1301         if (line.
start.
y < m_clipMin.
y)
  1303         ClipEndRight (line);
  1304         if (line.
end.
y > m_clipMax.
y)
  1306         if (line.
start.
y > m_clipMax.
y)
  1307           ClipStartBottom (line);
  1308         if (line.
end.
y < m_clipMin.
y)
  1314         ClipStartRight (line);
  1315         if (line.
start.
y > m_clipMax.
y)
  1316           ClipStartBottom (line);
  1321         if (line.
end.
y > m_clipMax.
y)
  1323         ClipStartBottom (line);
  1324         if (line.
start.
x > m_clipMax.
x)
  1325           ClipStartRight (line);
  1330         if (line.
end.
x > m_clipMax.
x)
  1332         ClipStartRight (line);
  1333         if (line.
start.
y > m_clipMax.
y)
  1334           ClipStartBottom (line);
  1339         if (line.
end.
y > m_clipMax.
y)
  1341         ClipStartRight (line);
  1342         if (line.
start.
y < m_clipMin.
y)
  1344         if (line.
end.
y < m_clipMin.
y)
  1346         if (line.
start.
y > m_clipMax.
y)
  1347           ClipStartBottom (line);
  1352         ClipStartTop (line);
  1356         ClipStartTop (line);
  1357         if (line.
start.
x < m_clipMin.
x)
  1363         ClipStartTop (line);
  1364         if (line.
start.
x > m_clipMax.
x)
  1366         ClipEndRight (line);
  1370         ClipStartTop (line);
  1371         ClipEndBottom (line);
  1375         ClipStartTop (line);
  1376         if (line.
start.
x < m_clipMin.
x)
  1379         if (line.
end.
y > m_clipMax.
y)
  1380           ClipEndBottom (line);
  1384         ClipStartTop (line);
  1385         if (line.
start.
x > m_clipMax.
x)
  1387         ClipEndRight (line);
  1388         if (line.
end.
y > m_clipMax.
y)
  1389           ClipEndBottom (line);
  1394         ClipStartLeft (line);
  1395         if (line.
start.
y < m_clipMin.
y)
  1396           ClipStartTop (line);
  1400         ClipEndRight (line);
  1401         if (line.
end.
y < m_clipMin.
y)
  1403         ClipStartTop (line);
  1404         if (line.
start.
x < m_clipMin.
x)
  1405           ClipStartLeft (line);
  1409         ClipEndBottom (line);
  1410         if (line.
end.
x < m_clipMin.
x)
  1412         ClipStartLeft (line);
  1413         if (line.
start.
y < m_clipMin.
y)
  1414           ClipStartTop (line);
  1418         ClipStartLeft (line);
  1419         if (line.
start.
y > m_clipMax.
y)
  1421         ClipEndRight (line);
  1422         if (line.
end.
y < m_clipMin.
y)
  1424         if (line.
start.
y < m_clipMin.
y)
  1425           ClipStartTop (line);
  1426         if (line.
end.
y > m_clipMax.
y)
  1427           ClipEndBottom (line);
  1432         ClipStartRight (line);
  1433         if (line.
start.
y < m_clipMin.
y)
  1434           ClipStartTop (line);
  1439         if (line.
end.
y < m_clipMin.
y)
  1441         ClipStartTop (line);
  1442         if (line.
start.
x > m_clipMax.
x)
  1443           ClipStartRight (line);
  1447         ClipEndBottom (line);
  1448         if (line.
end.
x > m_clipMax.
x)
  1450         ClipStartRight (line);
  1451         if (line.
start.
y < m_clipMin.
y)
  1452           ClipStartTop (line);
  1457         if (line.
end.
y < m_clipMin.
y)
  1459         ClipStartRight (line);
  1460         if (line.
start.
y > m_clipMax.
y)
  1462         if (line.
end.
y > m_clipMax.
y)
  1463           ClipEndBottom (line);
  1464         if (line.
start.
y < m_clipMin.
y)
  1465           ClipStartTop (line);
  1476                      double &lineX1, 
double &lineY1, 
double &lineX2, 
double &lineY2)
  1478   FastClipping::Vector2 clipMin = { boundsX1, boundsY1}, clipMax = { boundsX2, boundsY2};
  1479   FastClipping::Line line = { { lineX1, lineY1 }, { lineX2, lineY2 }, (lineX2-lineX1), (lineY2-lineY1) };
  1481   FastClipping clipper (clipMin, clipMax);
  1482   clipper.ClipLine (line);
  1483   lineX1 = line.start.x;
  1484   lineX2 = line.end.x;
  1485   lineY1 = line.start.y;
  1486   lineY2 = line.end.y;
 
bool FindFirstMatchingByteTag(Tag &tag) const
Finds the first tag matching the parameter Tag type. 
 
std::vector< TransmissionSample > TransmissionSampleList
TransmissionSampleList typedef. 
 
uint64_t GetUid(void) const
Returns the packet's Uid. 
 
Simulation virtual time values and global simulation resolution. 
 
std::vector< std::string > m_pauseMessages
pause message 
 
Adapted from http://en.wikipedia.org/w/index.php?title=Line_clipping&oldid=248609574. 
 
TransmissionSampleList GetTransmissionSamples() const
Get transmission samples. 
 
Smart pointer class similar to boost::intrusive_ptr. 
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
uint64_t transmittedBytes
transmitted bytes 
 
void TraceNetDevTxCommon(std::string const &context, Ptr< const Packet > packet, Mac48Address const &destination)
network transmit common trace callback function 
 
Packet addressed to someone else. 
 
uint32_t GetId(void) const
 
std::pair< Ptr< Channel >, uint32_t > TxRecordKey
TxRecordKey typedef. 
 
std::map< uint32_t, std::vector< NetDeviceStatistics > > m_nodesStatistics
node statsitics 
 
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
helper class to be used by the visualizer 
 
void ClipStartRight(Line &line)
Clip start right function. 
 
static Ptr< SimulatorImpl > GetImplementation(void)
Get the SimulatorImpl singleton. 
 
static Ptr< Node > GetNode(uint32_t n)
 
bool isBroadcast
is broadcast? 
 
void TraceIpv4Drop(std::string context, ns3::Ipv4Header const &hdr, Ptr< const Packet > packet, ns3::Ipv4L3Protocol::DropReason reason, Ptr< Ipv4 > dummy_ipv4, uint32_t interface)
ipv4 drop trace callback function 
 
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node. 
 
std::map< uint32_t, Time > m_packetsOfInterest
list of packet UIDs that will be monitored 
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
 
std::map< TransmissionSampleKey, TransmissionSampleValue > m_transmissionSamples
transmission samples 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
void ClipEndLeft(Line &line)
Clip end left function. 
 
void TraceNetDevRxCommon(std::string const &context, Ptr< const Packet > packet, Mac48Address const &source)
network receive common trace callback function 
 
std::map< Ptr< Node >, uint32_t > m_packetDrops
packt drops 
 
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate. 
 
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function. 
 
TAG_BUFFER_INLINE uint32_t ReadU32(void)
 
void ClipEndTop(Line &line)
Clip end top function. 
 
std::map< uint32_t, LastPacketsSample > m_lastPackets
last packets 
 
PyVizPacketTag structure. 
 
void ClipEndBottom(Line &line)
Clip end bottom function. 
 
virtual void Serialize(TagBuffer buf) const
 
void CallbackStopSimulation()
stop simulation callback function 
 
static bool FilterPacket(Ptr< const Packet > packet, const PacketCaptureOptions &options)
Filter packet function. 
 
DropReason
Reason why a packet has been dropped. 
 
void TraceNetDevTxWifi(std::string context, Ptr< const Packet > packet)
WIFI transmit trace callback function. 
 
void RegisterDropTracePath(std::string const &tracePath)
Register drop trace path function. 
 
std::vector< std::string > GetPauseMessages() const
Get pause message function. 
 
uint32_t transmittedPackets
transmitted packets 
 
Ptr< Channel > channel
channel 
 
Ptr< Node > srcNode
source node 
 
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object. 
 
NetDeviceStatistics & FindNetDeviceStatistics(int node, int interface)
Findnet device statistics function. 
 
TransmissionSampleKey structure. 
 
std::vector< TxPacketSample > lastTransmittedPackets
last transmitted packets 
 
PacketDropSampleList GetPacketDropSamples() const
Get packet drop samples. 
 
Ptr< Packet > packet
packet 
 
void ClipStartLeft(Line &line)
Clip start left function. 
 
TAG_BUFFER_INLINE void WriteU32(uint32_t v)
 
void RegisterPointToPointLikeDevice(std::string const &deviceTypeName)
Register point to point like device function. 
 
Ptr< Channel > channel
channel 
 
void TraceNetDevRxLte(std::string context, Ptr< const Packet > packet, Mac48Address const &source)
LTE receive trace callback function. 
 
Ptr< Node > receiver
NULL if broadcast. 
 
std::set< TypeId > headers
headers 
 
std::vector< NodeStatistics > GetNodesStatistics() const
Get node statistics. 
 
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer. 
 
static PyViz * g_visualizer
the visualizer 
 
void TraceNetDevPromiscRxCsma(std::string context, Ptr< const Packet > packet)
CSMA promiscious receive function. 
 
static std::vector< std::string > PathSplit(std::string str)
 
Ptr< NetDevice > device
device 
 
uint32_t receivedPackets
received packets 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
void Connect(std::string path, const CallbackBase &cb)
 
FastClipping(Vector2 clipMin, Vector2 clipMax)
Constructor. 
 
void ClipEndRight(Line &line)
Clip end right function. 
 
void SimulatorRunUntil(Time time)
Run simulation until a given (simulated, absolute) time is reached. 
 
bool operator==(TransmissionSampleKey const &other) const
equality operator 
 
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context. 
 
NodeStatistics structure. 
 
tag a set of bytes in a packet 
 
void SetNodesOfInterest(std::set< uint32_t > nodes)
Set nodes of interest function. 
 
Ptr< Node > transmitter
transmitter 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
NetDeviceStatistics structure. 
 
bool ClipLine(Line &line)
Clip line function. 
 
std::map< uint32_t, PacketCaptureOptions > m_packetCaptureOptions
packet capture options 
 
Ptr< Packet > Copy(void) const
performs a COW copy of the packet. 
 
bool ConnectFailSafe(std::string path, const CallbackBase &cb)
This function will attempt to find all trace sources which match the input path and will then connect...
 
Vector2 m_clipMin
clip minimum 
 
std::vector< RxPacketSample > lastReceivedPackets
last received packets 
 
virtual void Print(std::ostream &os) const
 
static Time Now(void)
Return the current simulation virtual time. 
 
PacketMetadata::ItemIterator BeginItem(void) const
Returns an iterator which points to the first 'item' stored in this buffer. 
 
void TraceNetDevTxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point transmit trace calllback function. 
 
void TraceNetDevRxWifi(std::string context, Ptr< const Packet > packet)
WIFI receive trace callback function. 
 
void TraceDevQueueDrop(std::string context, Ptr< const Packet > packet)
queue drop trace callback function 
 
void RegisterCsmaLikeDevice(std::string const &deviceTypeName)
Register CSMA like device function. 
 
LastPacketsSample GetLastPackets(uint32_t nodeId) const
Get last packets function. 
 
uint64_t receivedBytes
received bytes 
 
virtual void Deserialize(TagBuffer buf)
 
void TraceNetDevTxWimax(std::string context, Ptr< const Packet > packet, Mac48Address const &destination)
WIMax transmit trace callback function. 
 
static TypeId GetTypeId(void)
Get the type ID. 
 
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true. 
 
TransmissionSample structure. 
 
std::set< uint32_t > m_nodesOfInterest
list of node IDs whose transmissions will be monitored 
 
Time m_runUntil
run until time 
 
PacketDropSample structure. 
 
Vector2 m_clipMax
clip maximum 
 
PacketCaptureOptions structure. 
 
static void LineClipping(double boundsX1, double boundsY1, double boundsX2, double boundsY2, double &lineX1, double &lineY1, double &lineX2, double &lineY2)
don't break this line or pybindgen will not be able to pick up the above annotation :( ...
 
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN. 
 
static void Stop(void)
Tell the Simulator the calling event should be the last one executed. 
 
void ClipStartBottom(Line &line)
Clip start bottom function. 
 
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
TransmissionSampleValue structure. 
 
void RegisterWifiLikeDevice(std::string const &deviceTypeName)
Register WIFI like device function. 
 
Ptr< Node > transmitter
transmitter 
 
PacketCaptureMode mode
mode 
 
std::vector< PacketDropSample > PacketDropSampleList
PacketDropSampleList typedef. 
 
Flag for events not associated with any particular context. 
 
TxPacketSample structure. 
 
Rare ad-hoc debug messages. 
 
uint32_t numLastPackets
num last packets 
 
RxPacketSample structure. 
 
void DoPause(std::string const &message)
Do pause function. 
 
void SetPacketCaptureOptions(uint32_t nodeId, PacketCaptureOptions options)
Set packet capture options function. 
 
static void Pause(std::string const &message)
Pause function. 
 
PacketType
Packet types are used as they are in Linux. 
 
std::map< TxRecordKey, TxRecordValue > m_txRecords
transmit records 
 
virtual uint32_t GetSerializedSize(void) const
 
void ClipStartTop(Line &line)
Clip start top function. 
 
Ptr< Node > transmitter
transmitter 
 
std::vector< PacketSample > lastDroppedPackets
last dropped packets 
 
a unique identifier for an interface. 
 
uint32_t m_packetId
packet id 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
void AddByteTag(const Tag &tag) const
Tag each byte included in this packet with a new byte tag. 
 
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
 
bool operator<(TransmissionSampleKey const &other) const
less than operator 
 
void TraceNetDevTxLte(std::string context, Ptr< const Packet > packet, Mac48Address const &destination)
LTE transmit trace callback function. 
 
void TraceNetDevTxCsma(std::string context, Ptr< const Packet > packet)
CSMA transmit trace callback function. 
 
void TraceNetDevRxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point receive trace callback function. 
 
void AddHeader(const Header &header)
Add header to this packet. 
 
LastPacketsSample structure. 
 
void TraceNetDevRxCsma(std::string context, Ptr< const Packet > packet)
CSMA receive trace callback function. 
 
void TraceNetDevRxWimax(std::string context, Ptr< const Packet > packet, Mac48Address const &source)
WIMax transmit trace callback function. 
 
bool GetPacketCaptureOptions(uint32_t nodeId, const PacketCaptureOptions **outOptions) const
Get packet capture options function. 
 
static TypeId LookupByName(std::string name)
Get a TypeId by name. 
 
Ptr< Node > receiver
NULL if broadcast.