Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

BinPAC::DCE_RPC_PDU Class Reference

#include <dce_rpc_pac.h>

Collaboration diagram for BinPAC::DCE_RPC_PDU:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DCE_RPC_PDU ()
 ~DCE_RPC_PDU ()
int parse (const uint8 *const t_begin_of_data, const uint8 *const t_end_of_data, int t_byteorder)
int const  byteorder () const
int const & body_length () const
DCE_RPC_Header *const & header () const
DCE_RPC_Body *const & body () const
DCE_RPC_Auth *const & auth () const

Protected Attributes

int byteorder_
int body_length_
DCE_RPC_Headerheader_
DCE_RPC_Bodybody_
DCE_RPC_Authauth_

Constructor & Destructor Documentation

BinPAC::DCE_RPC_PDU::DCE_RPC_PDU  ) 
 

Definition at line 723 of file dce_rpc_pac.cc.

References auth_, body_, body_length_, and header_.

00724         {
00725         body_length_ = 0;
00726         header_ = 0;
00727         body_ = 0;
00728         auth_ = 0;
00729         }

BinPAC::DCE_RPC_PDU::~DCE_RPC_PDU  ) 
 

Definition at line 731 of file dce_rpc_pac.cc.

References auth_, body_, and header_.

00732         {
00733         delete header_;
00734         delete body_;
00735         delete auth_;
00736         }


Member Function Documentation

DCE_RPC_Auth* const& BinPAC::DCE_RPC_PDU::auth  )  const [inline]
 

Definition at line 360 of file dce_rpc_pac.h.

References auth_.

00360 { return auth_; }

DCE_RPC_Body* const& BinPAC::DCE_RPC_PDU::body  )  const [inline]
 

Definition at line 359 of file dce_rpc_pac.h.

References body_.

Referenced by DCE_RPC_Session::DeliverBind(), DCE_RPC_Session::DeliverRequest(), and DCE_RPC_Session::DeliverResponse().

00359 { return body_; }

int const& BinPAC::DCE_RPC_PDU::body_length  )  const [inline]
 

Definition at line 357 of file dce_rpc_pac.h.

References body_length_.

Referenced by parse().

00357 { return body_length_; }

int const BinPAC::DCE_RPC_PDU::byteorder  )  const [inline]
 

Definition at line 356 of file dce_rpc_pac.h.

References byteorder_.

Referenced by DCE_RPC_Session::DeliverEpmapperMapResponse(), and parse().

00356 { return byteorder_; };

DCE_RPC_Header* const& BinPAC::DCE_RPC_PDU::header  )  const [inline]
 

Definition at line 358 of file dce_rpc_pac.h.

References header_.

Referenced by DCE_RPC_Session::DeliverPDU(), and parse().

00358 { return header_; }

int BinPAC::DCE_RPC_PDU::parse const uint8 *const  t_begin_of_data,
const uint8 *const  t_end_of_data,
int  t_byteorder
 

Definition at line 738 of file dce_rpc_pac.cc.

References auth_, BinPAC::DCE_RPC_Header::auth_length(), BinPAC::bigendian, body_, body_length(), body_length_, byteorder(), BinPAC::DCE_RPC_Header::byteorder(), byteorder_, BinPAC::DCE_RPC_Header::frag_length(), header(), header_, BinPAC::littleendian, BinPAC::DCE_RPC_Auth::parse(), BinPAC::DCE_RPC_Body::parse(), BinPAC::DCE_RPC_Header::parse(), and BinPAC::uint8.

Referenced by DCE_RPC_Session::DeliverPDU().

00739         {
00740         // Checking out-of-bound for "DCE_RPC_PDU:header"
00741         if ( t_begin_of_data + (16) > t_end_of_data )
00742                 {
00743                 // Handle out-of-bound condition
00744                 throw ExceptionOutOfBound("DCE_RPC_PDU:header",
00745                         (0) + (16), 
00746                         (t_end_of_data) - (t_begin_of_data));
00747                 }
00748         // Parse "header"
00749         header_ = new DCE_RPC_Header();
00750         t_byteorder = littleendian;
00751         header_->parse(t_begin_of_data, t_end_of_data, t_byteorder);
00752         body_length_ = header()->frag_length() - 16 - header()->auth_length();
00753         
00754         // Parse "header"
00755         
00756         // Parse "body"
00757         body_ = new DCE_RPC_Body(header(), body_length());
00758         byteorder_ = header()->byteorder();
00759         int t_body__size = 
00760                 body_->parse((t_begin_of_data + 16), t_end_of_data, byteorder());
00761         
00762         const uint8* const t_dataptr_after_body = (t_begin_of_data + 16) + (t_body__size);
00763         // Parse "auth"
00764         auth_ = new DCE_RPC_Auth(header());
00765         int t_auth__size = 
00766                 auth_->parse(t_dataptr_after_body, t_end_of_data, bigendian);
00767         
00768         const uint8* const t_dataptr_after_auth = t_dataptr_after_body + (t_auth__size);
00769         int t_val__size = t_dataptr_after_auth - t_begin_of_data;
00770         return t_val__size;
00771         }


Member Data Documentation

DCE_RPC_Auth* BinPAC::DCE_RPC_PDU::auth_ [protected]
 

Definition at line 367 of file dce_rpc_pac.h.

Referenced by auth(), DCE_RPC_PDU(), parse(), and ~DCE_RPC_PDU().

DCE_RPC_Body* BinPAC::DCE_RPC_PDU::body_ [protected]
 

Definition at line 366 of file dce_rpc_pac.h.

Referenced by body(), DCE_RPC_PDU(), parse(), and ~DCE_RPC_PDU().

int BinPAC::DCE_RPC_PDU::body_length_ [protected]
 

Definition at line 364 of file dce_rpc_pac.h.

Referenced by body_length(), DCE_RPC_PDU(), and parse().

int BinPAC::DCE_RPC_PDU::byteorder_ [protected]
 

Definition at line 363 of file dce_rpc_pac.h.

Referenced by byteorder(), and parse().

DCE_RPC_Header* BinPAC::DCE_RPC_PDU::header_ [protected]
 

Definition at line 365 of file dce_rpc_pac.h.

Referenced by DCE_RPC_PDU(), header(), parse(), and ~DCE_RPC_PDU().


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 03:16:12 2005 for bro_docs by doxygen 1.3.5