26 #include "ns3/nstime.h"
27 #include "ns3/event-id.h"
29 #include "ns3/channel.h"
30 #include "ns3/packet.h"
31 #include "ns3/mac48-address.h"
32 #include "ns3/ipv4-header.h"
33 #include "ns3/ipv4-l3-protocol.h"
89 static void Pause (std::string
const &message);
225 static void LineClipping (
double boundsX1,
double boundsY1,
double boundsX2,
double boundsY2,
double &lineX1,
double &lineY1,
double &lineX2,
double &lineY2);
416 void DoPause (std::string
const &message);
DropReason
Reason why a packet has been dropped.
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.
PacketCaptureMode
PacketCaptureMode enumeration.
@ PACKET_CAPTURE_FILTER_HEADERS_OR
@ PACKET_CAPTURE_DISABLED
@ PACKET_CAPTURE_FILTER_HEADERS_AND
Simulation virtual time values and global simulation resolution.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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
NetDeviceStatistics()
constructor
uint32_t transmittedPackets
transmitted packets
NodeStatistics structure.
std::vector< NetDeviceStatistics > statistics
statistics
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?