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

BinPAC::SMB_nt_create_andx Class Reference

#include <smb_pac.h>

Collaboration diagram for BinPAC::SMB_nt_create_andx:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SMB_nt_create_andx (int arg_unicode)
 ~SMB_nt_create_andx ()
int parse (const uint8 *const t_begin_of_data, const uint8 *const t_end_of_data, int t_byteorder)
int const  unicode () const
uint8 const & word_count () const
SMB_andx *const & andx () const
uint8 const & reserved () const
uint16 const & name_length () const
uint32 const & flags () const
array< uint8 > const & rest_words () const
uint16 const & byte_count () const
SMB_string *const & name () const

Protected Attributes

int unicode_
uint8 word_count_
SMB_andxandx_
uint8 reserved_
uint16 name_length_
uint32 flags_
array< uint8rest_words_
uint16 byte_count_
SMB_stringname_

Constructor & Destructor Documentation

BinPAC::SMB_nt_create_andx::SMB_nt_create_andx int  arg_unicode  ) 
 

Definition at line 604 of file smb_pac.cc.

References andx_, byte_count_, flags_, BinPAC::make_array(), name_, name_length_, reserved_, rest_words_, unicode_, and word_count_.

00605         {
00606         unicode_ = arg_unicode;
00607         word_count_ = 0;
00608         andx_ = 0;
00609         reserved_ = 0;
00610         name_length_ = 0;
00611         flags_ = 0;
00612         make_array(rest_words_, 0);
00613         byte_count_ = 0;
00614         name_ = 0;
00615         }

BinPAC::SMB_nt_create_andx::~SMB_nt_create_andx  ) 
 

Definition at line 617 of file smb_pac.cc.

References andx_, BinPAC::delete_array(), name_, and rest_words_.

00618         {
00619         delete andx_;
00620         delete_array(rest_words_);
00621         delete name_;
00622         }


Member Function Documentation

SMB_andx* const& BinPAC::SMB_nt_create_andx::andx  )  const [inline]
 

Definition at line 279 of file smb_pac.h.

References andx_.

Referenced by SMB_Session::ParseNtCreateAndx().

00279 { return andx_; }

uint16 const& BinPAC::SMB_nt_create_andx::byte_count  )  const [inline]
 

Definition at line 284 of file smb_pac.h.

References byte_count_, and BinPAC::uint16.

00284 { return byte_count_; }

uint32 const& BinPAC::SMB_nt_create_andx::flags  )  const [inline]
 

Definition at line 282 of file smb_pac.h.

References flags_, and BinPAC::uint32.

00282 { return flags_; }

SMB_string* const& BinPAC::SMB_nt_create_andx::name  )  const [inline]
 

Definition at line 285 of file smb_pac.h.

References name_.

Referenced by SMB_Session::ParseNtCreateAndx().

00285 { return name_; }

uint16 const& BinPAC::SMB_nt_create_andx::name_length  )  const [inline]
 

Definition at line 281 of file smb_pac.h.

References name_length_, and BinPAC::uint16.

00281 { return name_length_; }

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

Definition at line 624 of file smb_pac.cc.

References andx_, byte_count_, flags_, name_, name_length_, BinPAC::SMB_string::parse(), BinPAC::SMB_andx::parse(), reserved_, rest_words_, BinPAC::uint8, unicode(), word_count(), and word_count_.

Referenced by SMB_Session::ParseNtCreateAndx().

00625         {
00626         // Checking out-of-bound for "SMB_nt_create_andx:flags"
00627         if ( (t_begin_of_data + 8) + (4) > t_end_of_data )
00628                 {
00629                 // Handle out-of-bound condition
00630                 throw ExceptionOutOfBound("SMB_nt_create_andx:flags",
00631                         (8) + (4), 
00632                         (t_end_of_data) - (t_begin_of_data));
00633                 }
00634         // Parse "word_count"
00635         word_count_ = *((uint8 *) (t_begin_of_data));
00636         
00637         // Parse "andx"
00638         andx_ = new SMB_andx();
00639         andx_->parse((t_begin_of_data + 1), t_end_of_data, t_byteorder);
00640         
00641         // Parse "reserved"
00642         reserved_ = *((uint8 *) ((t_begin_of_data + 5)));
00643         
00644         // Parse "name_length"
00645         name_length_ = UnMarshall<uint16>((t_begin_of_data + 6), name_length_, t_byteorder);
00646         
00647         // Parse "flags"
00648         flags_ = UnMarshall<uint32>((t_begin_of_data + 8), flags_, t_byteorder);
00649         
00650         // Parse "rest_words"
00651         int t_rest_words__arraylength = word_count() * 2 - 11;
00652         int t_rest_words__size = 1 * t_rest_words__arraylength;
00653         // Checking out-of-bound for "SMB_nt_create_andx:rest_words"
00654         if ( (t_begin_of_data + 12) + (t_rest_words__size) > t_end_of_data )
00655                 {
00656                 // Handle out-of-bound condition
00657                 throw ExceptionOutOfBound("SMB_nt_create_andx:rest_words",
00658                         (12) + (t_rest_words__size), 
00659                         (t_end_of_data) - (t_begin_of_data));
00660                 }
00661         make_array<uint8>(rest_words_, t_rest_words__arraylength);
00662         const uint8* t_rest_words__elem__data = (t_begin_of_data + 12);
00663         for ( int t_rest_words__elem__it = 0; 
00664                 t_rest_words__elem__it < t_rest_words__arraylength; 
00665                 ++t_rest_words__elem__it )
00666                 {
00667                 uint8 t_rest_words__elem;
00668                 t_rest_words__elem = *((uint8 *) (t_rest_words__elem__data));
00669                 rest_words_.v[t_rest_words__elem__it] = t_rest_words__elem;
00670                 t_rest_words__elem__data += 1;
00671                 }
00672         
00673         const uint8* const t_dataptr_after_rest_words = (t_begin_of_data + 12) + (t_rest_words__size);
00674         // Checking out-of-bound for "SMB_nt_create_andx:byte_count"
00675         if ( t_dataptr_after_rest_words + (2) > t_end_of_data )
00676                 {
00677                 // Handle out-of-bound condition
00678                 throw ExceptionOutOfBound("SMB_nt_create_andx:byte_count",
00679                         ((t_dataptr_after_rest_words - t_begin_of_data)) + (2), 
00680                         (t_end_of_data) - (t_begin_of_data));
00681                 }
00682         // Parse "byte_count"
00683         byte_count_ = UnMarshall<uint16>(t_dataptr_after_rest_words, byte_count_, t_byteorder);
00684         
00685         // Parse "name"
00686         name_ = new SMB_string(unicode(), ((t_dataptr_after_rest_words + 2) - t_begin_of_data));
00687         int t_name__size = 
00688                 name_->parse((t_dataptr_after_rest_words + 2), t_end_of_data, t_byteorder);
00689         
00690         const uint8* const t_dataptr_after_name = (t_dataptr_after_rest_words + 2) + (t_name__size);
00691         int t_val__size = t_dataptr_after_name - t_begin_of_data;
00692         return t_val__size;
00693         }

uint8 const& BinPAC::SMB_nt_create_andx::reserved  )  const [inline]
 

Definition at line 280 of file smb_pac.h.

References reserved_, and BinPAC::uint8.

00280 { return reserved_; }

array<uint8> const& BinPAC::SMB_nt_create_andx::rest_words  )  const [inline]
 

Definition at line 283 of file smb_pac.h.

References rest_words_.

00283 { return rest_words_; }

int const BinPAC::SMB_nt_create_andx::unicode  )  const [inline]
 

Definition at line 277 of file smb_pac.h.

References unicode_.

Referenced by parse().

00277 { return unicode_; };

uint8 const& BinPAC::SMB_nt_create_andx::word_count  )  const [inline]
 

Definition at line 278 of file smb_pac.h.

References BinPAC::uint8, and word_count_.

Referenced by parse().

00278 { return word_count_; }


Member Data Documentation

SMB_andx* BinPAC::SMB_nt_create_andx::andx_ [protected]
 

Definition at line 290 of file smb_pac.h.

Referenced by andx(), parse(), SMB_nt_create_andx(), and ~SMB_nt_create_andx().

uint16 BinPAC::SMB_nt_create_andx::byte_count_ [protected]
 

Definition at line 295 of file smb_pac.h.

Referenced by byte_count(), parse(), and SMB_nt_create_andx().

uint32 BinPAC::SMB_nt_create_andx::flags_ [protected]
 

Definition at line 293 of file smb_pac.h.

Referenced by flags(), parse(), and SMB_nt_create_andx().

SMB_string* BinPAC::SMB_nt_create_andx::name_ [protected]
 

Definition at line 296 of file smb_pac.h.

Referenced by name(), parse(), SMB_nt_create_andx(), and ~SMB_nt_create_andx().

uint16 BinPAC::SMB_nt_create_andx::name_length_ [protected]
 

Definition at line 292 of file smb_pac.h.

Referenced by name_length(), parse(), and SMB_nt_create_andx().

uint8 BinPAC::SMB_nt_create_andx::reserved_ [protected]
 

Definition at line 291 of file smb_pac.h.

Referenced by parse(), reserved(), and SMB_nt_create_andx().

array<uint8> BinPAC::SMB_nt_create_andx::rest_words_ [protected]
 

Definition at line 294 of file smb_pac.h.

Referenced by parse(), rest_words(), SMB_nt_create_andx(), and ~SMB_nt_create_andx().

int BinPAC::SMB_nt_create_andx::unicode_ [protected]
 

Definition at line 288 of file smb_pac.h.

Referenced by SMB_nt_create_andx(), and unicode().

uint8 BinPAC::SMB_nt_create_andx::word_count_ [protected]
 

Definition at line 289 of file smb_pac.h.

Referenced by parse(), SMB_nt_create_andx(), and word_count().


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