Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-dcerpc-nt.c packet-dcerpc-nt.h packet

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Mar 2002 15:30:12 -0600 (CST)
guy         2002/03/10 15:30:11 CST

  Modified files:
    .                    packet-dcerpc-nt.c packet-dcerpc-nt.h 
                         packet-dcerpc-samr.c 
  Log:
  Use "dissect_ndr_nt_UNICODE_STRING_str()", not
  "dissect_ndr_nt_UNICODE_STRING_string()", in
  "samr_dissect_connect2_server()"; that eliminates an unnecessary extra
  level of protocol tree.
  
  That removes the last call to "dissect_ndr_nt_UNICODE_STRING_string()";
  eliminate that routine.
  
  In "dissect_ndr_nt_UNICODE_STRING()", initially create the subtree with
  the name of the field as a string, so that if an exception is thrown
  before the name is set, the subtree won't show up as blank when
  displayed or printed.  Also pass in the name to "dissect_ndr_pointer()",
  so the same happens for subtrees below it.  Append only the string data,
  not its name, to items up the tree, as the name was put in when the item
  was created.  Also, when adding a colon before the string, put a space
  after the colon, as is done elsewhere in Ethereal.
  
  When appending additional strings, put the blank before the new string,
  not after it.
  
  In "dissect_ndr_nt_STRING()", put the subtree into the string with the
  name of the field, rather than just "String".  Pass in that name to
  "dissect_ndr_pointer()", so subtrees below it get a name when they're
  initially created.
  
  Get rid of colons in the name string passed to "dissect_ndr_pointer()"
  in some calls.  Supply a non-null name string in more calls to
  "dissect_ndr_pointer()", and fix some calls to pass in the name of the
  field being handed to "dissect_ndr_pointer()".
  
  There's no need to fetch the entire "header_field_info" structure for a
  protocol field in order to get the field's name - just use
  "proto_registrar_get_name()" to get the name.
  
  Use a length of -1, not 0, when creating a subtree whose length will be
  set when the dissection of the items under the subtree is complete; that
  way, if an exception is thrown while dissecting the items - which means
  the item goes past the end of the tvbuff - the item will refer to all
  data to the end of the tvbuff, rather than referring to nothing.
  
  Fix a typo in the name of the "hf_samr_unknown_string" field.
  
  Revision  Changes    Path
  1.10      +12 -70    ethereal/packet-dcerpc-nt.c
  1.7       +1 -5      ethereal/packet-dcerpc-nt.h
  1.19      +71 -69    ethereal/packet-dcerpc-samr.c