98 std::vector<uint8_t> buf(
tmp + 5);
100 ipv4Dst.Serialize(buf.data() + 4);
101 macSrc.CopyTo(buf.data() + 8);
a polymophic address class
void AddHeader() override
Add the header to the packet.
ArpHeader m_header
The ARP header.
ArpQueueDiscItem()=delete
const ArpHeader & GetHeader() const
bool m_headerAdded
True if the header has already been added to the packet.
uint32_t Hash(uint32_t perturbation) const override
Computes the hash of the packet's 5-tuple.
void Print(std::ostream &os) const override
Print the item contents.
bool Mark() override
Inherited from the base class, but we cannot mark ARP packets.
uint32_t GetSize() const override
~ArpQueueDiscItem() override
Destructor.
Ipv4 addresses are stored in host order in this class.
Smart pointer class similar to boost::intrusive_ptr.
QueueDiscItem is the abstract base class for items that are stored in a queue disc.
Address GetAddress() const
Get the MAC address included in this item.
uint8_t GetTxQueueIndex() const
Get the transmission queue index included in this item.
uint16_t GetProtocol() const
Get the L3 protocol included in this item.
Ptr< Packet > GetPacket() const
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
uint32_t Hash32(const char *buffer, const std::size_t size)
Compute 32-bit hash of a byte buffer, using the default hash function.
#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_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.