14#include "ns3/channel.h"
15#include "ns3/event-id.h"
16#include "ns3/ipv4-header.h"
17#include "ns3/ipv4-l3-protocol.h"
18#include "ns3/mac16-address.h"
19#include "ns3/mac48-address.h"
20#include "ns3/mac64-address.h"
22#include "ns3/nstime.h"
23#include "ns3/packet.h"
69 std::variant<Mac16Address, Mac48Address, Mac64Address>
to;
77 std::variant<Mac16Address, Mac48Address, Mac64Address>
from;
180 static void Pause(
const std::string& message);
321 void DoPause(
const std::string& message);
340 const std::string& context,
342 const std::variant<Mac16Address, Mac48Address, Mac64Address>& destination);
353 const std::variant<Mac16Address, Mac48Address, Mac64Address>& source);
DropReason
Reason why a packet has been dropped.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
std::pair< Ptr< Channel >, uint32_t > TxRecordKey
TxRecordKey type definition.
void TraceNetDevTxLte(std::string context, Ptr< const Packet > packet, const Mac48Address &destination)
LTE transmit trace callback function.
void SetNodesOfInterest(std::set< uint32_t > nodes)
Set nodes of interest 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 TraceNetDevRxWifi(std::string context, Ptr< const Packet > packet)
Wi-Fi receive trace callback function.
void TraceNetDevRxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point receive trace callback function.
NetDeviceStatistics & FindNetDeviceStatistics(int node, int interface)
Find net device statistics function.
void TraceDevQueueDrop(std::string context, Ptr< const Packet > packet)
Queue drop trace callback function.
std::vector< NodeStatistics > GetNodesStatistics() const
Get node statistics.
static bool FilterPacket(Ptr< const Packet > packet, const PacketCaptureOptions &options)
Filter packet function.
std::map< TransmissionSampleKey, TransmissionSampleValue > m_transmissionSamples
Transmission samples.
void TraceNetDevPromiscRxCsma(std::string context, Ptr< const Packet > packet)
CSMA promiscuous receive function.
Time GetSimulatorStopTime()
Get the stop time of the underlying visual simulator implementation.
std::map< uint32_t, PacketCaptureOptions > m_packetCaptureOptions
Packet capture options.
std::vector< std::string > GetPauseMessages() const
Get pause message function.
void TraceNetDevTxCommon(const std::string &context, Ptr< const Packet > packet, const std::variant< Mac16Address, Mac48Address, Mac64Address > &destination)
Network transmit common trace callback function.
void TraceNetDevTxPointToPoint(std::string context, Ptr< const Packet > packet)
Point to point transmit trace callback function.
std::map< uint32_t, Time > m_packetsOfInterest
List of packet UIDs that will be monitored.
void RegisterCsmaLikeDevice(const std::string &deviceTypeName)
Register CSMA like device function.
void TraceNetDevRxCommon(const std::string &context, Ptr< const Packet > packet, const std::variant< Mac16Address, Mac48Address, Mac64Address > &source)
Network receive common trace callback function.
std::set< uint32_t > m_nodesOfInterest
List of node IDs whose transmissions will be monitored.
void TraceNetDevTxWifi(std::string context, Ptr< const Packet > packet)
Wi-Fi transmit trace callback function.
std::map< Ptr< Node >, uint32_t > m_packetDrops
Packet drops.
void TraceIpv4Drop(std::string context, const ns3::Ipv4Header &hdr, Ptr< const Packet > packet, ns3::Ipv4L3Protocol::DropReason reason, Ptr< Ipv4 > dummy_ipv4, uint32_t interface)
Ipv4 drop trace callback function.
TransmissionSampleList GetTransmissionSamples() const
Get transmission samples.
LastPacketsSample GetLastPackets(uint32_t nodeId) const
Get last packets function.
std::map< uint32_t, LastPacketsSample > m_lastPackets
Last packets.
static void Pause(const std::string &message)
Pause function.
bool m_stop
Stop simulation flag.
void RegisterPointToPointLikeDevice(const std::string &deviceTypeName)
Register point to point like device function.
void TraceNetDevTxLrWpan(std::string context, Ptr< const Packet > packet)
Lr-Wpan transmit trace callback function.
void RegisterWifiLikeDevice(const std::string &deviceTypeName)
Register WIFI like device function.
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.
std::map< TxRecordKey, TxRecordValue > m_txRecords
Transmit records.
void DoPause(const std::string &message)
Do pause function.
void TraceNetDevRxLrWpan(std::string context, Ptr< const Packet > packet)
Lr-Wpan receive trace callback function.
void SimulatorRunUntil(Time time)
Run simulation until a given (simulated, absolute) time is reached.
void TraceNetDevRxLte(std::string context, Ptr< const Packet > packet, const Mac48Address &source)
LTE receive trace callback function.
PacketDropSampleList GetPacketDropSamples() const
Get packet drop samples.
std::map< uint32_t, std::vector< NetDeviceStatistics > > m_nodesStatistics
Node statistics.
Time m_runUntil
Indicates until when the simulation should run for its next step.
void RegisterDropTracePath(const std::string &tracePath)
Register drop trace path function.
void TraceNetDevTxCsma(std::string context, Ptr< const Packet > packet)
CSMA transmit trace callback function.
void CallbackStopSimulation()
Stop simulation callback function.
std::vector< std::string > m_pauseMessages
Pause message.
bool GetPacketCaptureOptions(uint32_t nodeId, const PacketCaptureOptions **outOptions) const
Get packet capture options function.
PacketCaptureMode
The PacketCaptureMode enumeration.
@ PACKET_CAPTURE_DISABLED
Packet capture is disabled.
@ PACKET_CAPTURE_FILTER_HEADERS_AND
Packet capture if all of the indicated headers are present.
@ PACKET_CAPTURE_FILTER_HEADERS_OR
Packet capture if any of the indicated headers is present.
std::vector< TransmissionSample > TransmissionSampleList
The transmission sample list.
std::vector< PacketDropSample > PacketDropSampleList
The packet drop list.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Structure to handle a sample of the last received, transmitted or drop packets in a node.
std::vector< PacketSample > lastDroppedPackets
Last dropped packets.
std::vector< TxPacketSample > lastTransmittedPackets
Last transmitted packets.
std::vector< RxPacketSample > lastReceivedPackets
Last received packets.
The NetDeviceStatistics structure.
uint32_t transmittedPackets
Transmitted packets.
uint64_t receivedBytes
Received bytes.
uint64_t transmittedBytes
Transmitted bytes.
uint32_t receivedPackets
Received packets.
The NodeStatistics structure.
std::vector< NetDeviceStatistics > statistics
Statistics.
The PacketCaptureOptions structure.
uint32_t numLastPackets
Number of last packets.
std::set< TypeId > headers
The headers.
PacketCaptureMode mode
The packet capture node.
PacketDropSample structure.
uint32_t bytes
The number of bytes dropped.
Ptr< Node > transmitter
The transmitter node where the drop was registered.
Ptr< Packet > packet
The packet reference.
Ptr< NetDevice > device
The NetDevice reference.
Time time
The received or transmitted time of the sample.
The TransmissionSampleKey structure.
Ptr< Node > transmitter
transmitter
Ptr< Channel > channel
channel
bool operator==(const TransmissionSampleKey &other) const
Equality operator.
bool operator<(const TransmissionSampleKey &other) const
Less than operator.
Ptr< Node > receiver
NULL if broadcast.
The TransmissionSampleValue structure.
uint32_t bytes
The nuumber of bytes of the transmission sample.
The TxRecordValue structure.
Time time
The transmission time.
Ptr< Node > srcNode
The source node of the transmission.
bool isBroadcast
Broadcast flag.
RxPacketSample structure.
std::variant< Mac16Address, Mac48Address, Mac64Address > from
The source MAC address.
TransmissionSample structure.
Ptr< Channel > channel
The channel reference used for the transmission.
Ptr< Node > receiver
The destination node of the transmission (Null if broadcast).
Ptr< Node > transmitter
The source node of the transmission.
uint32_t bytes
The number of bytes transmitted.
TxPacketSample structure.
std::variant< Mac16Address, Mac48Address, Mac64Address > to
The destination MAC address.