32 #include "ns3/mac48-address.h" 
   33 #include "ns3/callback.h" 
   34 #include "ns3/assert.h" 
   36 #include "ns3/deprecated.h" 
   79     uint32_t 
GetEnd (
void) 
const;
 
  275   Packet (uint8_t 
const*buffer, uint32_t size, 
bool magic);
 
  286   Packet (uint8_t 
const*buffer, uint32_t size);
 
  304   inline uint32_t 
GetSize (
void) 
const;
 
  433   uint32_t 
CopyData (uint8_t *buffer, uint32_t size) 
const;
 
  443   void CopyData (std::ostream *os, uint32_t size) 
const;
 
  475   uint64_t 
GetUid (
void) 
const;
 
  487   void Print (std::ostream &os) 
const;
 
  555   uint32_t 
Serialize (uint8_t* buffer, uint32_t maxSize) 
const;
 
  720     (uint32_t oldSize, uint32_t newSize);
 
  749   uint32_t 
Deserialize (uint8_t 
const*buffer, uint32_t size);
 
PacketMetadata m_metadata
the packet's metadata 
 
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer. 
 
bool FindFirstMatchingByteTag(Tag &tag) const 
Finds the first tag matching the parameter Tag type. 
 
void(* Mac48AddressTracedCallback)(Ptr< const Packet > packet, Mac48Address mac)
TracedCallback signature for packet and Mac48Address. 
 
void PrintPacketTags(std::ostream &os) const 
Print the list of packet tags. 
 
uint32_t Deserialize(uint8_t const *buffer, uint32_t size)
Deserializes a packet. 
 
const struct PacketTagList::TagData * m_data
the tag data 
 
automatically resized byte buffer 
 
Forward calls to a chain of Callback. 
 
void AddPacketTag(const Tag &tag) const 
Add a packet tag. 
 
List of the packet tags stored in a packet. 
 
uint64_t GetUid(void) const 
Returns the packet's Uid. 
 
uint32_t Serialize(uint8_t *buffer, uint32_t maxSize) const 
Serialize a packet, tags, and metadata into a byte buffer. 
 
keep track of the byte tags stored in a packet. 
 
static uint32_t m_globalUid
Global counter of packets Uid. 
 
void(* SizeTracedCallback)(uint32_t oldSize, uint32_t newSize)
TracedCallback signature for changes in packet size. 
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
Buffer m_buffer
the packet buffer (it's actual contents) 
 
Ptr< NixVector > GetNixVector(void) const 
Get the packet nix-vector. 
 
Item(TypeId tid, uint32_t start, uint32_t end, TagBuffer buffer)
Constructor. 
 
void Print(std::ostream &os) const 
Print the packet contents. 
 
Packet & operator=(const Packet &o)
Basic assignment. 
 
PacketTagIterator GetPacketTagIterator(void) const 
Returns an object which can be used to iterate over the list of packet tags. 
 
a polymophic address class 
 
ByteTagList::Iterator m_current
actual position over the set of byte tags in a packet 
 
Packet()
Create an empty packet with a new uid (as returned by getUid). 
 
void GetTag(Tag &tag) const 
Read the requested tag and store it in the user-provided tag instance. 
 
Ptr< Packet > CreateFragment(uint32_t start, uint32_t length) const 
Create a new packet which contains a fragment of the original packet. 
 
uint32_t PeekTrailer(Trailer &trailer)
Deserialize but does not remove a trailer from the internal buffer. 
 
void AddAtEnd(Ptr< const Packet > packet)
Concatenate the input packet at the end of the current packet. 
 
Tree node for sharing serialized tags. 
 
bool PeekPacketTag(Tag &tag) const 
Search a matching tag and call Tag::Deserialize if it is found. 
 
void RemoveAllPacketTags(void)
Remove all packet tags. 
 
Identifies a byte tag and a set of bytes within a packet to which the tag applies. 
 
void RemoveAtStart(uint32_t size)
Remove size bytes from the start of the current packet. 
 
TagBuffer m_buffer
the buffer associated with this tag. 
 
std::string ToString(void) const 
Return a string representation of the packet. 
 
static void EnablePrinting(void)
Enable printing packets metadata. 
 
void(* AddressTracedCallback)(Ptr< const Packet > packet, const Address &address)
TracedCallback signature for packet and Address. 
 
TypeId m_tid
the ns3::TypeId associated to this tag. 
 
void SetNixVector(Ptr< NixVector > nixVector)
Set the packet nix-vector. 
 
ByteTagList m_byteTagList
the ByteTag list 
 
Defines a linked list of Packet tags, including copy-on-write semantics. 
 
bool ReplacePacketTag(Tag &tag)
Replace the value of a packet tag. 
 
static void EnableChecking(void)
Enable packets metadata checking. 
 
void AddPaddingAtEnd(uint32_t size)
Add a zero-filled padding to the packet. 
 
ByteTagIterator GetByteTagIterator(void) const 
Returns an iterator over the set of byte tags included in this packet. 
 
uint32_t GetEnd(void) const 
The index is an offset from the start of the packet. 
 
void(* SinrTracedCallback)(Ptr< const Packet > packet, double sinr)
TracedCallback signature for packet and SINR. 
 
Iterator over the set of packet tags in a packet. 
 
void PrintByteTags(std::ostream &os) const 
Iterate over the byte tags present in this packet, and invoke the Print method of each tag stored in ...
 
const struct PacketTagList::TagData * m_current
actual position over the set of tags in a packet 
 
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output 
 
Ptr< Packet > Copy(void) const 
performs a COW copy of the packet. 
 
uint32_t PeekHeader(Header &header) const 
Deserialize but does not remove the header from the internal buffer. 
 
uint32_t m_end
the index of the last byte tagged by this tag. 
 
Protocol trailer serialization and deserialization. 
 
tag a set of bytes in a packet 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
PacketMetadata::ItemIterator BeginItem(void) const 
Returns an iterator which points to the first 'item' stored in this buffer. 
 
PacketTagIterator(const struct PacketTagList::TagData *head)
Constructor. 
 
void AddTrailer(const Trailer &trailer)
Add trailer to this packet. 
 
void RemoveAtEnd(uint32_t size)
Remove size bytes from the end of the current packet. 
 
Iterator over the set of byte tags in a packet. 
 
uint32_t RemoveTrailer(Trailer &trailer)
Remove a deserialized trailer from the internal buffer. 
 
PacketTagList m_packetTagList
the packet's Tag list 
 
TypeId GetTypeId(void) const 
 
Identifies a packet tag within a packet. 
 
uint32_t GetSize(void) const 
 
TypeId GetTypeId(void) const 
 
Item(const struct PacketTagList::TagData *data)
Constructor. 
 
void GetTag(Tag &tag) const 
Read the requested tag and store it in the user-provided tag instance. 
 
An iterator for iterating through a byte tag list. 
 
uint32_t GetStart(void) const 
The index is an offset from the start of the packet. 
 
uint32_t GetSerializedSize(void) const 
Returns number of bytes required for packet serialization. 
 
bool RemovePacketTag(Tag &tag)
Remove a packet tag. 
 
void RemoveAllByteTags(void)
Remove all byte tags stored in this packet. 
 
Ptr< NixVector > m_nixVector
the packet's Nix vector 
 
uint32_t CopyData(uint8_t *buffer, uint32_t size) const 
Copy the packet contents to a byte buffer. 
 
uint32_t m_start
the index of the first byte tagged by this tag. 
 
ByteTagIterator(ByteTagList::Iterator i)
Copy Constructor. 
 
A template-based reference counting class. 
 
a unique identifier for an interface. 
 
void AddHeader(const Header &header)
Add header to this packet. 
 
void AddByteTag(const Tag &tag) const 
Tag each byte included in this packet with a new byte tag.