protlib::NetMsg Class Reference
[Network Messages]

network message More...

#include <source/ariba/utility/transport/tcpip/protlib/network_message.h>

List of all members.

Public Member Functions

 NetMsg (uint32 s)
 constructor
 NetMsg (uchar *b, uint32 s, bool copy=true)
 constructor
 NetMsg (const NetMsg &n)
 copy constructor
 ~NetMsg ()
 destructor
uint32 get_size () const
 get buffer size
uint32 get_bytes_left () const
 get bytes left until buffer ends
uint32 get_pos () const
 get pointer offset
NetMsgset_pos (uint32 p)
 move pointer to offset
NetMsgset_pos_r (int32 rp)
 move pointer relative
NetMsgto_start ()
 set pointer to beginning
uint32 copy_from (const uchar *b, uint32 n)
 copy into NetMsg buffer
uint32 copy_from (const uchar *b, uint32 start, uint32 end)
 copy into NetMsg buffer
uint32 copy_to (uchar *b, uint32 n) const
 copy from NetMsg buffer
uint32 copy_to (uchar *b, uint32 start, uint32 n) const
 copy from NetMsg buffer
ucharget_buffer () const
 get pointer to buffer
uint8 decode8 (bool move=true)
 decode uint8
uint16 decode16 (bool move=true)
 decode uint16
uint32 decode32 (bool move=true)
 decode uint32
uint64 decode64 (bool move=true)
 decode uint64
uint128 decode128 (bool move=true)
 decode uint128
void encode8 (uint8 i, bool move=true)
 encode uint8
void encode16 (uint16 i, bool move=true)
 encode uint16
void encode32 (uint32 i, bool move=true)
 encode uint32
void encode64 (uint64 i, bool move=true)
 encode uint64
void encode128 (uint128 i, bool move=true)
 encode uint128
void decode (uchar *c, uint32 len, bool move=true)
 decode uchars
void encode (const uchar *c, uint32 len, bool move=true)
 encode uchars
uint32 decode (string &s, uint32 len, bool move=true)
 decode string
uint32 encode (const string &s, bool move=true)
 encode string
void decode (struct in_addr &in, bool move=true)
 decode IPv4
void encode (const struct in_addr &in, bool move=true)
 encode IPv4
void decode (struct in6_addr &in, bool move=true)
 decode IPv6
void encode (const struct in6_addr &in, bool move=true)
 encode IPv6
uint32 truncate ()
 truncate buffer
uint32 truncate (uint32 t)
 truncate buffer
void padding (uint32 len, bool move=true)
 apply padding
bool operator== (const NetMsg &n) const
 test for equality
void encode (const NetMsg &m, uint32 len, bool move=true)
 encode a NetMsg into this NetMsg
void decode (NetMsg &m, bool move=true)
 decode a NetMsg from this NetMsg
ostream & hexdump (ostream &os, uchar *startpos=0, uint32 length=0) const
 print a raw hexdump of the buffer

Static Public Attributes

static const uint32 max_size = 128000

Private Attributes

ucharbuf
 buffer for data
uint32 buf_len
 buffer size
ucharpos
 current reading/writing position
ucharbuf_end
 buffer end


Detailed Description

network message

This class is used to exchange data between signalling and transport protocol.

Definition at line 77 of file network_message.h.


Member Data Documentation

buffer end

Ponter to the last byte of the buffer.

Definition at line 170 of file network_message.h.

Referenced by decode(), decode16(), decode32(), decode64(), decode8(), encode(), encode16(), encode32(), encode64(), encode8(), get_bytes_left(), get_pos(), hexdump(), NetMsg(), padding(), set_pos_r(), and truncate().

buffer size

Definition at line 165 of file network_message.h.

Referenced by copy_from(), copy_to(), get_size(), hexdump(), NetMsg(), operator==(), set_pos(), and truncate().


The documentation for this class was generated from the following files:

Generated on Fri Aug 14 23:39:52 2009 for Ariba by  doxygen 1.5.8