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

BinPAC::DCE_RPC_Request Class Reference

#include <dce_rpc_pac.h>

Collaboration diagram for BinPAC::DCE_RPC_Request:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DCE_RPC_Request (int arg_length)
 ~DCE_RPC_Request ()
int parse (const uint8 *const t_begin_of_data, const uint8 *const t_end_of_data, int t_byteorder)
int const  length () const
uint32 const & alloc_hint () const
p_context_id_t *const & p_cont_id () const
uint16 const & opnum () const
array< uint8 > const & stub () const

Protected Attributes

int length_
uint32 alloc_hint_
p_context_id_tp_cont_id_
uint16 opnum_
array< uint8stub_

Constructor & Destructor Documentation

BinPAC::DCE_RPC_Request::DCE_RPC_Request int  arg_length  ) 
 

Definition at line 416 of file dce_rpc_pac.cc.

References alloc_hint_, length_, BinPAC::make_array(), opnum_, p_cont_id_, and stub_.

00417         {
00418         length_ = arg_length;
00419         alloc_hint_ = 0;
00420         p_cont_id_ = 0;
00421         opnum_ = 0;
00422         make_array(stub_, 0);
00423         }

BinPAC::DCE_RPC_Request::~DCE_RPC_Request  ) 
 

Definition at line 425 of file dce_rpc_pac.cc.

References BinPAC::delete_array(), p_cont_id_, and stub_.

00426         {
00427         delete p_cont_id_;
00428         delete_array(stub_);
00429         }


Member Function Documentation

uint32 const& BinPAC::DCE_RPC_Request::alloc_hint  )  const [inline]
 

Definition at line 235 of file dce_rpc_pac.h.

References alloc_hint_, and BinPAC::uint32.

00235 { return alloc_hint_; }

int const BinPAC::DCE_RPC_Request::length  )  const [inline]
 

Definition at line 234 of file dce_rpc_pac.h.

References length_.

Referenced by parse().

00234 { return length_; };

uint16 const& BinPAC::DCE_RPC_Request::opnum  )  const [inline]
 

Definition at line 237 of file dce_rpc_pac.h.

References opnum_, and BinPAC::uint16.

Referenced by DCE_RPC_Session::DeliverRequest().

00237 { return opnum_; }

p_context_id_t* const& BinPAC::DCE_RPC_Request::p_cont_id  )  const [inline]
 

Definition at line 236 of file dce_rpc_pac.h.

References p_cont_id_.

00236 { return p_cont_id_; }

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

Definition at line 431 of file dce_rpc_pac.cc.

References alloc_hint_, length(), opnum_, p_cont_id_, BinPAC::p_context_id_t::parse(), stub_, and BinPAC::uint8.

00432         {
00433         // Checking out-of-bound for "DCE_RPC_Request:opnum"
00434         if ( (t_begin_of_data + 6) + (2) > t_end_of_data )
00435                 {
00436                 // Handle out-of-bound condition
00437                 throw ExceptionOutOfBound("DCE_RPC_Request:opnum",
00438                         (6) + (2), 
00439                         (t_end_of_data) - (t_begin_of_data));
00440                 }
00441         // Parse "alloc_hint"
00442         alloc_hint_ = UnMarshall<uint32>(t_begin_of_data, alloc_hint_, t_byteorder);
00443         
00444         // Parse "p_cont_id"
00445         p_cont_id_ = new p_context_id_t();
00446         p_cont_id_->parse((t_begin_of_data + 4), t_end_of_data, t_byteorder);
00447         
00448         // Parse "opnum"
00449         opnum_ = UnMarshall<uint16>((t_begin_of_data + 6), opnum_, t_byteorder);
00450         
00451         // Parse "stub"
00452         int t_stub__arraylength = length() - 8;
00453         int t_stub__size = 1 * t_stub__arraylength;
00454         // Checking out-of-bound for "DCE_RPC_Request:stub"
00455         if ( (t_begin_of_data + 8) + (t_stub__size) > t_end_of_data )
00456                 {
00457                 // Handle out-of-bound condition
00458                 throw ExceptionOutOfBound("DCE_RPC_Request:stub",
00459                         (8) + (t_stub__size), 
00460                         (t_end_of_data) - (t_begin_of_data));
00461                 }
00462         make_array<uint8>(stub_, t_stub__arraylength);
00463         const uint8* t_stub__elem__data = (t_begin_of_data + 8);
00464         for ( int t_stub__elem__it = 0; 
00465                 t_stub__elem__it < t_stub__arraylength; 
00466                 ++t_stub__elem__it )
00467                 {
00468                 uint8 t_stub__elem;
00469                 t_stub__elem = *((uint8 *) (t_stub__elem__data));
00470                 stub_.v[t_stub__elem__it] = t_stub__elem;
00471                 t_stub__elem__data += 1;
00472                 }
00473         
00474         const uint8* const t_dataptr_after_stub = (t_begin_of_data + 8) + (t_stub__size);
00475         int t_val__size = t_dataptr_after_stub - t_begin_of_data;
00476         return t_val__size;
00477         }

array<uint8> const& BinPAC::DCE_RPC_Request::stub  )  const [inline]
 

Definition at line 238 of file dce_rpc_pac.h.

References stub_.

Referenced by DCE_RPC_Session::DeliverRequest().

00238 { return stub_; }


Member Data Documentation

uint32 BinPAC::DCE_RPC_Request::alloc_hint_ [protected]
 

Definition at line 242 of file dce_rpc_pac.h.

Referenced by alloc_hint(), DCE_RPC_Request(), and parse().

int BinPAC::DCE_RPC_Request::length_ [protected]
 

Definition at line 241 of file dce_rpc_pac.h.

Referenced by DCE_RPC_Request(), and length().

uint16 BinPAC::DCE_RPC_Request::opnum_ [protected]
 

Definition at line 244 of file dce_rpc_pac.h.

Referenced by DCE_RPC_Request(), opnum(), and parse().

p_context_id_t* BinPAC::DCE_RPC_Request::p_cont_id_ [protected]
 

Definition at line 243 of file dce_rpc_pac.h.

Referenced by DCE_RPC_Request(), p_cont_id(), parse(), and ~DCE_RPC_Request().

array<uint8> BinPAC::DCE_RPC_Request::stub_ [protected]
 

Definition at line 245 of file dce_rpc_pac.h.

Referenced by DCE_RPC_Request(), parse(), stub(), and ~DCE_RPC_Request().


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