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;
611 destinationAddress = hdr.
GetAddr3 ();
615 destinationAddress = hdr.
GetAddr1 ();
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
744 NS_LOG_DEBUG (
"RX: from " << key.transmitter<<
"/"<<key.transmitter->GetId () <<
" to "
745 << key.receiver<<
"/"<<key.receiver->GetId ()
747 <<
" bytes more. => new sample with " << packet->
GetSize () <<
" bytes.");
753 NS_LOG_DEBUG (
"RX: from " << key.transmitter<<
"/"<<key.transmitter->GetId () <<
" to "
754 << key.receiver<<
"/"<<key.receiver->GetId ()
756 <<
" bytes more. => sample " << &sample <<
" with bytes " << sample.
bytes);
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;
DropReason
Reason why a packet has been dropped.
virtual Ptr< Channel > GetChannel(void) const =0
virtual Address GetBroadcast(void) const =0
PacketType
Packet types are used as they are in Linux.
@ PACKET_OTHERHOST
Packet addressed to someone else.
uint32_t GetId(void) const
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
static Ptr< Node > GetNode(uint32_t n)
void AddHeader(const Header &header)
Add header to this packet.
bool FindFirstMatchingByteTag(Tag &tag) const
Finds the first tag matching the parameter Tag type.
uint64_t GetUid(void) const
Returns the packet's Uid.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
PacketMetadata::ItemIterator BeginItem(void) const
Returns an iterator which points to the first 'item' stored in this buffer.
void AddByteTag(const Tag &tag) const
Tag each byte included in this packet with a new byte tag.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Smart pointer class similar to boost::intrusive_ptr.
helper class to be used by the visualizer
void RegisterDropTracePath(std::string const &tracePath)
Register drop trace path function.
void TraceNetDevRxCsma(std::string context, Ptr< const Packet > packet)
CSMA receive trace callback function.
void SetPacketCaptureOptions(uint32_t nodeId, PacketCaptureOptions options)
Set packet capture options function.
void RegisterCsmaLikeDevice(std::string const &deviceTypeName)
Register CSMA like device function.
void TraceNetDevRxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point receive trace callback function.
std::map< uint32_t, PacketCaptureOptions > m_packetCaptureOptions
packet capture options
static void Pause(std::string const &message)
Pause function.
std::map< uint32_t, LastPacketsSample > m_lastPackets
last packets
void SimulatorRunUntil(Time time)
Run simulation until a given (simulated, absolute) time is reached.
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
PacketDropSampleList GetPacketDropSamples() const
Get packet drop samples.
void TraceNetDevTxCommon(std::string const &context, Ptr< const Packet > packet, Mac48Address const &destination)
network transmit common trace callback function
void SetNodesOfInterest(std::set< uint32_t > nodes)
Set nodes of interest function.
std::map< uint32_t, std::vector< NetDeviceStatistics > > m_nodesStatistics
node statsitics
void TraceNetDevTxCsma(std::string context, Ptr< const Packet > packet)
CSMA transmit trace callback function.
void DoPause(std::string const &message)
Do pause function.
std::vector< NodeStatistics > GetNodesStatistics() const
Get node statistics.
void TraceNetDevRxLte(std::string context, Ptr< const Packet > packet, Mac48Address const &source)
LTE receive trace callback function.
std::set< uint32_t > m_nodesOfInterest
list of node IDs whose transmissions will be monitored
void TraceNetDevPromiscRxCsma(std::string context, Ptr< const Packet > packet)
CSMA promiscious receive function.
void RegisterWifiLikeDevice(std::string const &deviceTypeName)
Register WIFI like device function.
void TraceNetDevTxWimax(std::string context, Ptr< const Packet > packet, Mac48Address const &destination)
WIMax transmit trace callback function.
std::vector< std::string > m_pauseMessages
pause message
void TraceNetDevRxCommon(std::string const &context, Ptr< const Packet > packet, Mac48Address const &source)
network receive common trace callback function
TransmissionSampleList GetTransmissionSamples() const
Get transmission samples.
static void LineClipping(double boundsX1, double boundsY1, double boundsX2, double boundsY2, double &lineX1, double &lineY1, double &lineX2, double &lineY2)
Utility function - clips a line to a bounding box.
void TraceNetDevRxWimax(std::string context, Ptr< const Packet > packet, Mac48Address const &source)
WIMax transmit trace callback function.
void RegisterPointToPointLikeDevice(std::string const &deviceTypeName)
Register point to point like device function.
std::map< TransmissionSampleKey, TransmissionSampleValue > m_transmissionSamples
transmission samples
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.
NetDeviceStatistics & FindNetDeviceStatistics(int node, int interface)
Findnet device statistics function.
void TraceDevQueueDrop(std::string context, Ptr< const Packet > packet)
queue drop trace callback function
std::map< TxRecordKey, TxRecordValue > m_txRecords
transmit records
std::vector< std::string > GetPauseMessages() const
Get pause message function.
std::vector< PacketDropSample > PacketDropSampleList
PacketDropSampleList typedef.
static bool FilterPacket(Ptr< const Packet > packet, const PacketCaptureOptions &options)
Filter packet function.
void CallbackStopSimulation()
stop simulation callback function
std::map< Ptr< Node >, uint32_t > m_packetDrops
packt drops
LastPacketsSample GetLastPackets(uint32_t nodeId) const
Get last packets function.
void TraceNetDevTxWifi(std::string context, Ptr< const Packet > packet)
WIFI transmit trace callback function.
bool GetPacketCaptureOptions(uint32_t nodeId, const PacketCaptureOptions **outOptions) const
Get packet capture options function.
Time m_runUntil
run until time
void TraceNetDevTxLte(std::string context, Ptr< const Packet > packet, Mac48Address const &destination)
LTE transmit trace callback function.
std::map< uint32_t, Time > m_packetsOfInterest
list of packet UIDs that will be monitored
std::pair< Ptr< Channel >, uint32_t > TxRecordKey
TxRecordKey typedef.
std::vector< TransmissionSample > TransmissionSampleList
TransmissionSampleList typedef.
@ PACKET_CAPTURE_FILTER_HEADERS_OR
@ PACKET_CAPTURE_DISABLED
@ PACKET_CAPTURE_FILTER_HEADERS_AND
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static Time Now(void)
Return the current simulation virtual time.
@ NO_CONTEXT
Flag for events not associated with any particular context.
static Ptr< SimulatorImpl > GetImplementation(void)
Get the SimulatorImpl singleton.
TAG_BUFFER_INLINE uint32_t ReadU32(void)
TAG_BUFFER_INLINE void WriteU32(uint32_t v)
tag a set of bytes in a packet
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
static TypeId LookupByName(std::string name)
Get a TypeId by name.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Adapted from http://en.wikipedia.org/w/index.php?title=Line_clipping&oldid=248609574.
void ClipStartLeft(Line &line)
Clip start left function.
void ClipStartTop(Line &line)
Clip start top function.
void ClipEndBottom(Line &line)
Clip end bottom function.
void ClipEndRight(Line &line)
Clip end right function.
void ClipStartRight(Line &line)
Clip start right function.
bool ClipLine(Line &line)
Clip line function.
Vector2 m_clipMin
clip minimum
void ClipEndTop(Line &line)
Clip end top function.
Vector2 m_clipMax
clip maximum
void ClipEndLeft(Line &line)
Clip end left function.
void ClipStartBottom(Line &line)
Clip start bottom function.
FastClipping(Vector2 clipMin, Vector2 clipMax)
Constructor.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
void Connect(std::string path, const CallbackBase &cb)
bool ConnectFailSafe(std::string path, const CallbackBase &cb)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ LOG_DEBUG
Rare ad-hoc debug messages.
static PyViz * g_visualizer
the visualizer
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...
static std::vector< std::string > PathSplit(std::string str)
LastPacketsSample structure.
std::vector< PacketSample > lastDroppedPackets
last dropped packets
std::vector< TxPacketSample > lastTransmittedPackets
last transmitted packets
std::vector< RxPacketSample > lastReceivedPackets
last received packets
NetDeviceStatistics structure.
uint64_t receivedBytes
received bytes
uint64_t transmittedBytes
transmitted bytes
uint32_t receivedPackets
received packets
uint32_t transmittedPackets
transmitted packets
NodeStatistics structure.
PacketCaptureOptions structure.
PacketCaptureMode mode
mode
uint32_t numLastPackets
num last packets
std::set< TypeId > headers
headers
PacketDropSample structure.
Ptr< Node > transmitter
transmitter
Ptr< Packet > packet
packet
Ptr< NetDevice > device
device
RxPacketSample structure.
TransmissionSample structure.
Ptr< Node > transmitter
transmitter
Ptr< Channel > channel
channel
Ptr< Node > receiver
NULL if broadcast.
TransmissionSampleKey structure.
Ptr< Channel > channel
channel
Ptr< Node > transmitter
transmitter
bool operator==(TransmissionSampleKey const &other) const
equality operator
bool operator<(TransmissionSampleKey const &other) const
less than operator
Ptr< Node > receiver
NULL if broadcast.
TransmissionSampleValue structure.
TxPacketSample structure.
Ptr< Node > srcNode
source node
bool isBroadcast
is broadcast?
PyVizPacketTag structure.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual uint32_t GetSerializedSize(void) const
virtual void Serialize(TagBuffer buf) const
uint32_t m_packetId
packet id
virtual void Print(std::ostream &os) const
static TypeId GetTypeId(void)
Get the type ID.
virtual void Deserialize(TagBuffer buf)