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

BinPAC::DCE_RPC_Header Class Reference

#include <dce_rpc_pac.h>

Collaboration diagram for BinPAC::DCE_RPC_Header:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DCE_RPC_Header ()
 ~DCE_RPC_Header ()
int parse (const uint8 *const t_begin_of_data, const uint8 *const t_end_of_data, int t_byteorder)
int const  byteorder () const
uint8 const & rpc_vers () const
uint8 const & rpc_vers_minor () const
uint8 const & PTYPE () const
uint8 const & pfc_flags () const
NDR_Format *const & packed_drep () const
uint16 const & frag_length () const
uint16 const & auth_length () const
uint32 const & call_id () const

Protected Attributes

int byteorder_
uint8 rpc_vers_
uint8 rpc_vers_minor_
uint8 PTYPE_
uint8 pfc_flags_
NDR_Formatpacked_drep_
uint16 frag_length_
uint16 auth_length_
uint32 call_id_

Constructor & Destructor Documentation

BinPAC::DCE_RPC_Header::DCE_RPC_Header  ) 
 

Definition at line 141 of file dce_rpc_pac.cc.

00142         {
00143         rpc_vers_ = 0;
00144         rpc_vers_minor_ = 0;
00145         PTYPE_ = 0;
00146         pfc_flags_ = 0;
00147         packed_drep_ = 0;
00148         frag_length_ = 0;
00149         auth_length_ = 0;
00150         call_id_ = 0;
00151         }

BinPAC::DCE_RPC_Header::~DCE_RPC_Header  ) 
 

Definition at line 153 of file dce_rpc_pac.cc.

00154         {
00155         delete packed_drep_;
00156         }


Member Function Documentation

uint16 const& BinPAC::DCE_RPC_Header::auth_length  )  const [inline]
 

Definition at line 119 of file dce_rpc_pac.h.

References auth_length_, and BinPAC::uint16.

Referenced by BinPAC::DCE_RPC_PDU::parse(), and BinPAC::DCE_RPC_Auth::parse().

00119 { return auth_length_; }

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

Definition at line 112 of file dce_rpc_pac.h.

References byteorder_.

Referenced by BinPAC::DCE_RPC_PDU::parse().

00112 { return byteorder_; };

uint32 const& BinPAC::DCE_RPC_Header::call_id  )  const [inline]
 

Definition at line 120 of file dce_rpc_pac.h.

References call_id_, and BinPAC::uint32.

00120 { return call_id_; }

uint16 const& BinPAC::DCE_RPC_Header::frag_length  )  const [inline]
 

Definition at line 118 of file dce_rpc_pac.h.

References frag_length_, and BinPAC::uint16.

Referenced by SMB_Session::LooksLikeRPC(), DCE_RPC_Session::LooksLikeRPC(), and BinPAC::DCE_RPC_PDU::parse().

00118 { return frag_length_; }

NDR_Format* const& BinPAC::DCE_RPC_Header::packed_drep  )  const [inline]
 

Definition at line 117 of file dce_rpc_pac.h.

References packed_drep_.

00117 { return packed_drep_; }

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

Definition at line 158 of file dce_rpc_pac.cc.

References BinPAC::bigendian, and BinPAC::uint8.

Referenced by SMB_Session::LooksLikeRPC(), DCE_RPC_Session::LooksLikeRPC(), and BinPAC::DCE_RPC_PDU::parse().

00159         {
00160         // Checking out-of-bound for "DCE_RPC_Header:val"
00161         if ( t_begin_of_data + (16) > t_end_of_data )
00162                 {
00163                 // Handle out-of-bound condition
00164                 throw ExceptionOutOfBound("DCE_RPC_Header:val",
00165                         (0) + (16), 
00166                         (t_end_of_data) - (t_begin_of_data));
00167                 }
00168         // Parse "rpc_vers"
00169         rpc_vers_ = *((uint8 *) (t_begin_of_data));
00170         
00171         // Parse "rpc_vers_minor"
00172         rpc_vers_minor_ = *((uint8 *) ((t_begin_of_data + 1)));
00173         
00174         // Parse "PTYPE"
00175         PTYPE_ = *((uint8 *) ((t_begin_of_data + 2)));
00176         
00177         // Parse "pfc_flags"
00178         pfc_flags_ = *((uint8 *) ((t_begin_of_data + 3)));
00179         
00180         // Parse "packed_drep"
00181         packed_drep_ = new NDR_Format();
00182         packed_drep_->parse((t_begin_of_data + 4), t_end_of_data, bigendian);
00183         
00184         // Parse "frag_length"
00185         byteorder_ = packed_drep()->byteorder();
00186         frag_length_ = UnMarshall<uint16>((t_begin_of_data + 8), frag_length_, byteorder());
00187         
00188         // Parse "auth_length"
00189         auth_length_ = UnMarshall<uint16>((t_begin_of_data + 10), auth_length_, byteorder());
00190         
00191         // Parse "call_id"
00192         call_id_ = UnMarshall<uint32>((t_begin_of_data + 12), call_id_, byteorder());
00193         
00194         return 16;
00195         }

uint8 const& BinPAC::DCE_RPC_Header::pfc_flags  )  const [inline]
 

Definition at line 116 of file dce_rpc_pac.h.

References pfc_flags_, and BinPAC::uint8.

00116 { return pfc_flags_; }

uint8 const& BinPAC::DCE_RPC_Header::PTYPE  )  const [inline]
 

Definition at line 115 of file dce_rpc_pac.h.

References PTYPE_, and BinPAC::uint8.

Referenced by BinPAC::DCE_RPC_Body::parse().

00115 { return PTYPE_; }

uint8 const& BinPAC::DCE_RPC_Header::rpc_vers  )  const [inline]
 

Definition at line 113 of file dce_rpc_pac.h.

References rpc_vers_, and BinPAC::uint8.

Referenced by SMB_Session::LooksLikeRPC(), and DCE_RPC_Session::LooksLikeRPC().

00113 { return rpc_vers_; }

uint8 const& BinPAC::DCE_RPC_Header::rpc_vers_minor  )  const [inline]
 

Definition at line 114 of file dce_rpc_pac.h.

References rpc_vers_minor_, and BinPAC::uint8.

Referenced by SMB_Session::LooksLikeRPC(), and DCE_RPC_Session::LooksLikeRPC().

00114 { return rpc_vers_minor_; }


Member Data Documentation

uint16 BinPAC::DCE_RPC_Header::auth_length_ [protected]
 

Definition at line 130 of file dce_rpc_pac.h.

Referenced by auth_length().

int BinPAC::DCE_RPC_Header::byteorder_ [protected]
 

Definition at line 123 of file dce_rpc_pac.h.

Referenced by byteorder().

uint32 BinPAC::DCE_RPC_Header::call_id_ [protected]
 

Definition at line 131 of file dce_rpc_pac.h.

Referenced by call_id().

uint16 BinPAC::DCE_RPC_Header::frag_length_ [protected]
 

Definition at line 129 of file dce_rpc_pac.h.

Referenced by frag_length().

NDR_Format* BinPAC::DCE_RPC_Header::packed_drep_ [protected]
 

Definition at line 128 of file dce_rpc_pac.h.

Referenced by packed_drep().

uint8 BinPAC::DCE_RPC_Header::pfc_flags_ [protected]
 

Definition at line 127 of file dce_rpc_pac.h.

Referenced by pfc_flags().

uint8 BinPAC::DCE_RPC_Header::PTYPE_ [protected]
 

Definition at line 126 of file dce_rpc_pac.h.

Referenced by PTYPE().

uint8 BinPAC::DCE_RPC_Header::rpc_vers_ [protected]
 

Definition at line 124 of file dce_rpc_pac.h.

Referenced by rpc_vers().

uint8 BinPAC::DCE_RPC_Header::rpc_vers_minor_ [protected]
 

Definition at line 125 of file dce_rpc_pac.h.

Referenced by rpc_vers_minor().


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