|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
27 uint16_t protocol,
const ArpHeader & header)
103 uint8_t buf[tmp + 5];
109 buf[tmp+1] = (perturbation >> 24) & 0xff;
110 buf[tmp+2] = (perturbation >> 16) & 0xff;
111 buf[tmp+3] = (perturbation >> 8) & 0xff;
112 buf[tmp+4] = perturbation & 0xff;
QueueDiscItem is the abstract base class for items that are stored in a queue disc.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Address GetAddress(void) const
Get the MAC address included in this item.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void AddHeader(const Header &header)
Add header to this packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t GetTxQueueIndex(void) const
Get the transmission queue index included in this item.
const ArpHeader & GetHeader(void) const
Ipv4 addresses are stored in host order in this class.
virtual uint32_t Hash(uint32_t perturbation) const
Computes the hash of the packet's 5-tuple.
virtual uint32_t GetSize(void) const
uint32_t Hash32(const char *buffer, const std::size_t size)
Compute 32-bit hash of a byte buffer, using the default hash function.
virtual void AddHeader(void)
Add the header to the packet.
a polymophic address class
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
virtual bool Mark(void)
Inherited from the base class, but we cannot mark ARP packets.
ArpHeader m_header
The ARP header.
virtual void Print(std::ostream &os) const
Print the item contents.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Ptr< Packet > GetPacket(void) const
uint32_t CopyTo(uint8_t buffer[MAX_SIZE]) const
Copy the address bytes into a buffer.
uint16_t GetProtocol(void) const
Get the L3 protocol included in this item.
void Serialize(uint8_t buf[4]) const
Serialize this address to a 4-byte buffer.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
uint8_t GetLength(void) const
Get the length of the underlying address.
ArpQueueDiscItem()
Default constructor.
virtual ~ArpQueueDiscItem()
bool m_headerAdded
True if the header has already been added to the packet.