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