class Packet : public Event


Inheritance:


Public Fields

static int hdrlen_
u_int8_t incoming
According to cmu code: This flag is set by the MAC layer on an incoming packet and is cleared by the link layer
Packet* next_
for queues and the free list
PacketStamp txinfo_
the pkt stamp carries all info about how/where the pkt was sent needed for a receiver to determine if it correctly receives the pkt

Public Methods

inline unsigned char* access(int off)
inline unsigned char* accessdata()
This is used for backward compatibility, i.e., assuming user data is PacketData and return its pointer.
static inline Packet* alloc(int)
static inline Packet* alloc()
inline void allocdata(int)
inline unsigned char* const bits()
inline Packet* copy()
inline int datalen()
static void dump_header(Packet *p, int offset, int length)
static inline void free(Packet*)
Packet()
inline void setdata(AppData* d)
inline AppData* userdata()
This is used to access application-specific data, not limited to PacketData.

Protected Fields

static Packet* free_
packet free list

Private Fields

unsigned char* bits_
header bits
AppData* data_
unsigned char* data_; // variable size buffer for 'data' unsigned int datalen_; // length of variable size buffer variable size buffer for 'data'
bool fflag_

Private Methods

static void init(Packet*)
initialize pkt hdr

Inherited from Event:

Public Fields

Handler* handler_
double time_
int uid_

Documentation

unsigned char* bits_
header bits

AppData* data_
unsigned char* data_; // variable size buffer for 'data' unsigned int datalen_; // length of variable size buffer variable size buffer for 'data'

static void init(Packet*)
initialize pkt hdr

bool fflag_

static Packet* free_
packet free list

Packet* next_
for queues and the free list

static int hdrlen_

Packet()

inline unsigned char* const bits()

inline Packet* copy()

static inline Packet* alloc()

static inline Packet* alloc(int)

inline void allocdata(int)

static inline void free(Packet*)

inline unsigned char* access(int off)

inline unsigned char* accessdata()
This is used for backward compatibility, i.e., assuming user data is PacketData and return its pointer.

inline AppData* userdata()
This is used to access application-specific data, not limited to PacketData.

inline void setdata(AppData* d)

inline int datalen()

static void dump_header(Packet *p, int offset, int length)

PacketStamp txinfo_
the pkt stamp carries all info about how/where the pkt was sent needed for a receiver to determine if it correctly receives the pkt

u_int8_t incoming
According to cmu code: This flag is set by the MAC layer on an incoming packet and is cleared by the link layer. It is an ugly hack, but there's really no other way because NS always calls the recv() function of an object.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

Adapted for the NS documentation page

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de