23 #include "ns3/ipv4-address.h" 103 .SetGroupName (
"Internet")
151 os <<
"Ipv4 PKTINFO [DestAddr: " <<
m_addr;
153 os <<
", RecvIf:" << (uint32_t)
m_ifindex;
154 os <<
", TTL:" << (uint32_t)
m_ttl;
static Ipv4Address Deserialize(const uint8_t buf[4])
void Write(const uint8_t *buffer, uint32_t size)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint32_t GetRecvIf(void) const
Get the tag's receiving interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
TAG_BUFFER_INLINE uint32_t ReadU32(void)
Ipv4Address m_addr
Header destination address.
TAG_BUFFER_INLINE uint8_t ReadU8(void)
uint32_t m_ifindex
interface index
virtual void Serialize(TagBuffer i) const
void SetTtl(uint8_t ttl)
Set the tag's Time to Live Implemented, but not used in the stack yet.
Ipv4Address GetAddress(void) const
Get the tag's address.
Ipv4Address m_spec_dst
Local address.
virtual void Print(std::ostream &os) const
TAG_BUFFER_INLINE void WriteU32(uint32_t v)
uint8_t GetTtl(void) const
Get the tag's Time to Live Implemented, but not used in the stack yet.
tag a set of bytes in a packet
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t m_ttl
Time to Live.
TAG_BUFFER_INLINE void WriteU8(uint8_t v)
This class implements Linux struct pktinfo in order to deliver ancillary information to the socket in...
Ipv4 addresses are stored in host order in this class.
virtual void Deserialize(TagBuffer i)
virtual uint32_t GetSerializedSize(void) const
void SetLocalAddress(Ipv4Address addr)
Set the tag's local address.
void Read(uint8_t *buffer, uint32_t size)
void SetAddress(Ipv4Address addr)
Set the tag's address.
Ipv4Address GetLocalAddress(void) const
Get the tag's local address.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void Serialize(uint8_t buf[4]) const
Serialize this address to a 4-byte buffer.
void SetRecvIf(uint32_t ifindex)
Set the tag's receiving interface.