2001-12-16 20:17:10 +00:00
|
|
|
/* packet-dcerpc-nt.c
|
|
|
|
* Routines for DCERPC over SMB packet disassembly
|
2003-01-16 22:40:48 +00:00
|
|
|
* Copyright 2001-2003, Tim Potter <tpot@samba.org>
|
2001-12-16 20:17:10 +00:00
|
|
|
*
|
2003-05-15 05:24:19 +00:00
|
|
|
* $Id: packet-dcerpc-nt.c,v 1.74 2003/05/15 05:24:18 guy Exp $
|
2001-12-16 20:17:10 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-12-16 20:17:10 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-12-16 20:17:10 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-12-16 20:17:10 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <glib.h>
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
2001-12-16 20:17:10 +00:00
|
|
|
#include "packet-dcerpc.h"
|
|
|
|
#include "packet-dcerpc-nt.h"
|
|
|
|
#include "smb.h"
|
2002-03-10 23:24:48 +00:00
|
|
|
#include "packet-smb-common.h" /* for dissect_smb_64bit_time() */
|
2001-12-16 20:17:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This file contains helper routines that are used by the DCERPC over SMB
|
|
|
|
* dissectors for ethereal.
|
|
|
|
*/
|
|
|
|
|
2003-05-15 05:24:19 +00:00
|
|
|
/*
|
|
|
|
* Used by several dissectors.
|
|
|
|
*/
|
|
|
|
const value_string platform_id_vals[] = {
|
|
|
|
{ 300, "DOS" },
|
|
|
|
{ 400, "OS/2" },
|
|
|
|
{ 500, "Windows NT" },
|
|
|
|
{ 600, "OSF" },
|
|
|
|
{ 700, "VMS" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2003-02-07 08:56:12 +00:00
|
|
|
/* Parse some common RPC structures */
|
2002-03-06 08:58:01 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
gint ett_nt_unicode_string = -1; /* FIXME: make static */
|
2002-03-06 08:58:01 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
/* Dissect a counted string as a callback to dissect_ndr_pointer_cb() */
|
|
|
|
|
|
|
|
static int hf_nt_cs_len = -1;
|
|
|
|
static int hf_nt_cs_size = -1;
|
|
|
|
|
2002-03-11 00:15:20 +00:00
|
|
|
int
|
2003-02-03 02:00:54 +00:00
|
|
|
dissect_ndr_counted_string_cb(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
2003-02-08 09:41:44 +00:00
|
|
|
char *drep, int hf_index,
|
2003-02-03 02:00:54 +00:00
|
|
|
dcerpc_callback_fnct_t *callback,
|
|
|
|
void *callback_args)
|
2002-03-11 00:15:20 +00:00
|
|
|
{
|
2003-02-03 02:00:54 +00:00
|
|
|
dcerpc_info *di = pinfo->private_data;
|
|
|
|
guint16 len, size;
|
2002-03-11 00:15:20 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
/* Structure starts with short, but is aligned for longs */
|
|
|
|
|
|
|
|
ALIGN_TO_4_BYTES;
|
|
|
|
|
|
|
|
if (di->conformant_run)
|
2002-03-11 00:15:20 +00:00
|
|
|
return offset;
|
2003-02-03 02:00:54 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
struct {
|
|
|
|
short len;
|
|
|
|
short size;
|
|
|
|
[size_is(size/2), length_is(len/2), ptr] unsigned short *string;
|
|
|
|
} UNICODE_STRING;
|
2002-03-11 00:15:20 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
|
|
|
|
hf_nt_cs_len, &len);
|
2002-03-13 07:38:34 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, drep,
|
|
|
|
hf_nt_cs_size, &size);
|
|
|
|
|
|
|
|
offset = dissect_ndr_pointer_cb(tvb, offset, pinfo, tree, drep,
|
2003-02-07 22:44:54 +00:00
|
|
|
dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE,
|
2003-02-03 02:00:54 +00:00
|
|
|
"Character Array", hf_index, callback, callback_args);
|
|
|
|
|
|
|
|
return offset;
|
2002-03-11 00:15:20 +00:00
|
|
|
}
|
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
static gint ett_nt_counted_string = -1;
|
|
|
|
|
|
|
|
static int
|
|
|
|
dissect_ndr_counted_string_helper(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *drep, int hf_index, int levels,
|
|
|
|
gboolean add_subtree)
|
2002-03-11 00:15:20 +00:00
|
|
|
{
|
2003-02-03 02:00:54 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *subtree = tree;
|
2002-03-11 00:15:20 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
if (add_subtree) {
|
2002-03-11 00:15:20 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
item = proto_tree_add_text(
|
|
|
|
tree, tvb, offset, 0,
|
|
|
|
proto_registrar_get_name(hf_index));
|
2002-03-11 00:15:20 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
subtree = proto_item_add_subtree(item, ett_nt_counted_string);
|
2002-03-11 00:15:20 +00:00
|
|
|
}
|
|
|
|
|
2003-02-08 09:41:44 +00:00
|
|
|
/*
|
|
|
|
* Add 2 levels, so that the string gets attached to the
|
|
|
|
* "Character Array" top-level item and to the top-level item
|
|
|
|
* added above.
|
|
|
|
*/
|
2003-02-03 02:00:54 +00:00
|
|
|
return dissect_ndr_counted_string_cb(
|
|
|
|
tvb, offset, pinfo, subtree, drep, hf_index,
|
2003-04-27 00:49:14 +00:00
|
|
|
cb_wstr_postprocess, GINT_TO_POINTER(2 + levels));
|
2002-03-11 00:15:20 +00:00
|
|
|
}
|
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
/* Dissect a counted string in-line. */
|
|
|
|
|
2003-01-28 06:27:01 +00:00
|
|
|
int
|
2003-02-03 02:00:54 +00:00
|
|
|
dissect_ndr_counted_string(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *drep, int hf_index, int levels)
|
2003-01-28 06:27:01 +00:00
|
|
|
{
|
2003-02-03 02:00:54 +00:00
|
|
|
return dissect_ndr_counted_string_helper(
|
|
|
|
tvb, offset, pinfo, tree, drep, hf_index, levels, TRUE);
|
|
|
|
}
|
2003-01-31 06:47:55 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
/* Dissect a counted string as a callback to dissect_ndr_pointer().
|
|
|
|
This doesn't add a adds a proto item and subtreee for the string as
|
|
|
|
the pointer dissection already creates one. */
|
2003-01-31 06:47:55 +00:00
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
int
|
|
|
|
dissect_ndr_counted_string_ptr(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *drep)
|
|
|
|
{
|
|
|
|
dcerpc_info *di = pinfo->private_data;
|
|
|
|
|
|
|
|
return dissect_ndr_counted_string_helper(
|
2003-02-08 09:41:44 +00:00
|
|
|
tvb, offset, pinfo, tree, drep, di->hf_index, 0, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Dissect a counted byte_array as a callback to dissect_ndr_pointer_cb() */
|
|
|
|
|
|
|
|
static gint ett_nt_counted_byte_array = -1;
|
|
|
|
|
|
|
|
/* Dissect a counted byte array in-line. */
|
|
|
|
|
|
|
|
int
|
2003-05-09 01:43:59 +00:00
|
|
|
dissect_ndr_counted_byte_array_cb(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *drep, int hf_index,
|
|
|
|
dcerpc_callback_fnct_t *callback,
|
|
|
|
void *callback_args)
|
2003-02-08 09:41:44 +00:00
|
|
|
{
|
|
|
|
dcerpc_info *di = pinfo->private_data;
|
|
|
|
proto_item *item;
|
|
|
|
proto_tree *subtree;
|
|
|
|
guint16 len, size;
|
|
|
|
|
|
|
|
/* Structure starts with short, but is aligned for longs */
|
|
|
|
|
|
|
|
ALIGN_TO_4_BYTES;
|
|
|
|
|
|
|
|
if (di->conformant_run)
|
|
|
|
return offset;
|
|
|
|
|
|
|
|
item = proto_tree_add_text(tree, tvb, offset, 0,
|
|
|
|
proto_registrar_get_name(hf_index));
|
|
|
|
|
|
|
|
subtree = proto_item_add_subtree(item, ett_nt_counted_byte_array);
|
|
|
|
|
|
|
|
/*
|
|
|
|
struct {
|
|
|
|
short len;
|
|
|
|
short size;
|
|
|
|
[size_is(size), length_is(len), ptr] unsigned char *string;
|
|
|
|
} WHATEVER_THIS_IS_CALLED;
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
offset = dissect_ndr_uint16(tvb, offset, pinfo, subtree, drep,
|
|
|
|
hf_nt_cs_len, &len);
|
|
|
|
|
|
|
|
offset = dissect_ndr_uint16(tvb, offset, pinfo, subtree, drep,
|
|
|
|
hf_nt_cs_size, &size);
|
|
|
|
|
2003-05-09 01:43:59 +00:00
|
|
|
offset = dissect_ndr_pointer_cb(tvb, offset, pinfo, subtree, drep,
|
2003-02-08 09:41:44 +00:00
|
|
|
dissect_ndr_char_cvstring, NDR_POINTER_UNIQUE,
|
2003-05-09 01:43:59 +00:00
|
|
|
"Byte Array", hf_index, callback, callback_args);
|
2003-02-08 09:41:44 +00:00
|
|
|
|
|
|
|
return offset;
|
2003-01-28 06:27:01 +00:00
|
|
|
}
|
2002-03-10 23:24:48 +00:00
|
|
|
|
2003-05-09 01:43:59 +00:00
|
|
|
int
|
|
|
|
dissect_ndr_counted_byte_array(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *drep, int hf_index)
|
|
|
|
{
|
|
|
|
return dissect_ndr_counted_byte_array_cb(
|
|
|
|
tvb, offset, pinfo, tree, drep, hf_index, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2002-03-10 23:24:48 +00:00
|
|
|
/* This function is used to dissect a DCERPC encoded 64 bit time value.
|
|
|
|
XXX it should be fixed both here and in dissect_smb_64bit_time so
|
2002-08-28 21:04:11 +00:00
|
|
|
it can handle both BIG and LITTLE endian encodings
|
2002-03-10 23:24:48 +00:00
|
|
|
*/
|
|
|
|
int
|
2002-08-28 21:04:11 +00:00
|
|
|
dissect_ndr_nt_NTTIME (tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
2002-05-04 09:05:44 +00:00
|
|
|
char *drep _U_, int hf_index)
|
2002-03-10 23:24:48 +00:00
|
|
|
{
|
|
|
|
dcerpc_info *di;
|
|
|
|
|
|
|
|
di=pinfo->private_data;
|
|
|
|
if(di->conformant_run){
|
|
|
|
/*just a run to handle conformant arrays, nothing to dissect */
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
ALIGN_TO_4_BYTES;
|
|
|
|
|
2002-04-30 11:03:08 +00:00
|
|
|
offset = dissect_smb_64bit_time(tvb, tree, offset, hf_index);
|
2002-03-10 23:24:48 +00:00
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2002-03-25 05:42:02 +00:00
|
|
|
/* Define this symbol to display warnings about request/response and
|
|
|
|
policy handle hash table collisions. This happens when a packet with
|
|
|
|
the same conversation, smb fid and dcerpc call id occurs. I think this
|
|
|
|
is due to a bug in the dcerpc/smb fragment reassembly code. */
|
|
|
|
|
|
|
|
#undef DEBUG_HASH_COLL
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Policy handle hashing
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
guint8 policy_hnd[20];
|
|
|
|
} pol_hash_key;
|
|
|
|
|
|
|
|
typedef struct {
|
2002-04-22 09:43:03 +00:00
|
|
|
guint32 open_frame, close_frame; /* Frame numbers for open/close */
|
|
|
|
char *name; /* Name of policy handle */
|
2002-03-25 05:42:02 +00:00
|
|
|
} pol_hash_value;
|
|
|
|
|
|
|
|
#define POL_HASH_INIT_COUNT 100
|
|
|
|
|
|
|
|
static GHashTable *pol_hash;
|
|
|
|
static GMemChunk *pol_hash_key_chunk;
|
|
|
|
static GMemChunk *pol_hash_value_chunk;
|
|
|
|
|
|
|
|
/* Hash function */
|
|
|
|
|
|
|
|
static guint pol_hash_fn(gconstpointer k)
|
|
|
|
{
|
2002-11-28 03:57:50 +00:00
|
|
|
const pol_hash_key *key = (const pol_hash_key *)k;
|
2002-03-25 05:42:02 +00:00
|
|
|
|
|
|
|
/* Bytes 4-7 of the policy handle are a timestamp so should make a
|
|
|
|
reasonable hash value */
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2002-03-25 05:42:02 +00:00
|
|
|
return key->policy_hnd[4] + (key->policy_hnd[5] << 8) +
|
|
|
|
(key->policy_hnd[6] << 16) + (key->policy_hnd[7] << 24);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return true if a policy handle is all zeros */
|
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
static gboolean is_null_pol(e_ctx_hnd *policy_hnd)
|
2002-03-25 05:42:02 +00:00
|
|
|
{
|
|
|
|
static guint8 null_policy_hnd[20];
|
|
|
|
|
|
|
|
return memcmp(policy_hnd, null_policy_hnd, 20) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Hash compare function */
|
|
|
|
|
|
|
|
static gint pol_hash_compare(gconstpointer k1, gconstpointer k2)
|
|
|
|
{
|
2002-11-28 03:57:50 +00:00
|
|
|
const pol_hash_key *key1 = (const pol_hash_key *)k1;
|
|
|
|
const pol_hash_key *key2 = (const pol_hash_key *)k2;
|
2002-03-25 05:42:02 +00:00
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
return memcmp(key1->policy_hnd, key2->policy_hnd,
|
2002-03-25 05:42:02 +00:00
|
|
|
sizeof(key1->policy_hnd)) == 0;
|
|
|
|
}
|
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
/* Store the open and close frame numbers of a policy handle */
|
2002-03-25 05:42:02 +00:00
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
void dcerpc_smb_store_pol_pkts(e_ctx_hnd *policy_hnd, guint32 open_frame,
|
2002-06-28 01:23:26 +00:00
|
|
|
guint32 close_frame)
|
2002-03-25 05:42:02 +00:00
|
|
|
{
|
|
|
|
pol_hash_key *key;
|
|
|
|
pol_hash_value *value;
|
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
if (is_null_pol(policy_hnd) || (open_frame == 0 && close_frame == 0))
|
2002-04-17 07:52:26 +00:00
|
|
|
return;
|
|
|
|
|
2002-03-25 05:42:02 +00:00
|
|
|
/* Look up existing value */
|
|
|
|
|
|
|
|
key = g_mem_chunk_alloc(pol_hash_key_chunk);
|
|
|
|
|
|
|
|
memcpy(&key->policy_hnd, policy_hnd, sizeof(key->policy_hnd));
|
|
|
|
|
|
|
|
if ((value = g_hash_table_lookup(pol_hash, key))) {
|
|
|
|
|
|
|
|
/* Update existing value */
|
|
|
|
|
|
|
|
if (open_frame) {
|
|
|
|
#ifdef DEBUG_HASH_COLL
|
|
|
|
if (value->open_frame != open_frame)
|
|
|
|
g_warning("dcerpc_smb: pol_hash open frame collision %d/%d\n", value->open_frame, open_frame);
|
|
|
|
#endif
|
|
|
|
value->open_frame = open_frame;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (close_frame) {
|
|
|
|
#ifdef DEBUG_HASH_COLL
|
|
|
|
if (value->close_frame != close_frame)
|
|
|
|
g_warning("dcerpc_smb: pol_hash close frame collision %d/%d\n", value->close_frame, close_frame);
|
|
|
|
#endif
|
|
|
|
value->close_frame = close_frame;
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create a new value */
|
|
|
|
|
|
|
|
value = g_mem_chunk_alloc(pol_hash_value_chunk);
|
|
|
|
|
|
|
|
value->open_frame = open_frame;
|
|
|
|
value->close_frame = close_frame;
|
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
value->name = NULL;
|
|
|
|
|
|
|
|
g_hash_table_insert(pol_hash, key, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Store a text string with a policy handle */
|
|
|
|
|
|
|
|
void dcerpc_smb_store_pol_name(e_ctx_hnd *policy_hnd, char *name)
|
|
|
|
{
|
|
|
|
pol_hash_key *key;
|
|
|
|
pol_hash_value *value;
|
|
|
|
|
|
|
|
if (is_null_pol(policy_hnd))
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* Look up existing value */
|
|
|
|
|
|
|
|
key = g_mem_chunk_alloc(pol_hash_key_chunk);
|
|
|
|
|
|
|
|
memcpy(&key->policy_hnd, policy_hnd, sizeof(key->policy_hnd));
|
|
|
|
|
|
|
|
if ((value = g_hash_table_lookup(pol_hash, key))) {
|
|
|
|
|
|
|
|
/* Update existing value */
|
|
|
|
|
|
|
|
if (value->name && name) {
|
|
|
|
#ifdef DEBUG_HASH_COLL
|
|
|
|
if (strcmp(value->name, name) != 0)
|
|
|
|
g_warning("dcerpc_smb: pol_hash name collision %s/%s\n", value->name, name);
|
|
|
|
#endif
|
|
|
|
free(value->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
value->name = strdup(name);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create a new value */
|
|
|
|
|
|
|
|
value = g_mem_chunk_alloc(pol_hash_value_chunk);
|
|
|
|
|
|
|
|
value->open_frame = 0;
|
|
|
|
value->close_frame = 0;
|
|
|
|
|
2002-03-25 05:42:02 +00:00
|
|
|
if (name)
|
|
|
|
value->name = strdup(name);
|
|
|
|
else
|
2003-01-16 22:40:48 +00:00
|
|
|
value->name = strdup("<UNKNOWN>");
|
2002-03-25 05:42:02 +00:00
|
|
|
|
|
|
|
g_hash_table_insert(pol_hash, key, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Retrieve a policy handle */
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
gboolean dcerpc_smb_fetch_pol(e_ctx_hnd *policy_hnd, char **name,
|
2002-04-22 09:43:03 +00:00
|
|
|
guint32 *open_frame, guint32 *close_frame)
|
2002-03-25 05:42:02 +00:00
|
|
|
{
|
|
|
|
pol_hash_key key;
|
|
|
|
pol_hash_value *value;
|
|
|
|
|
|
|
|
/* Prevent uninitialised return vars */
|
|
|
|
|
|
|
|
if (name)
|
|
|
|
*name = NULL;
|
|
|
|
|
|
|
|
if (open_frame)
|
|
|
|
*open_frame = 0;
|
|
|
|
|
|
|
|
if (close_frame)
|
|
|
|
*close_frame = 0;
|
|
|
|
|
|
|
|
/* Look up existing value */
|
|
|
|
|
|
|
|
memcpy(&key.policy_hnd, policy_hnd, sizeof(key.policy_hnd));
|
|
|
|
|
|
|
|
value = g_hash_table_lookup(pol_hash, &key);
|
|
|
|
|
|
|
|
/* Return name and frame numbers */
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
if (value) {
|
|
|
|
if (name)
|
|
|
|
*name = value->name;
|
2002-03-25 05:42:02 +00:00
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
if (open_frame)
|
|
|
|
*open_frame = value->open_frame;
|
2002-03-25 05:42:02 +00:00
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
if (close_frame)
|
|
|
|
*close_frame = value->close_frame;
|
|
|
|
}
|
2002-03-25 05:42:02 +00:00
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
return value != NULL;
|
2002-03-25 05:42:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Iterator to free a policy handle key/value pair */
|
|
|
|
|
2002-05-11 22:53:58 +00:00
|
|
|
static void free_pol_keyvalue(gpointer key _U_, gpointer value,
|
|
|
|
gpointer user_data _U_)
|
2002-03-25 05:42:02 +00:00
|
|
|
{
|
|
|
|
pol_hash_value *pol_value = (pol_hash_value *)value;
|
|
|
|
|
|
|
|
/* Free user data */
|
|
|
|
|
|
|
|
if (pol_value->name) {
|
|
|
|
free(pol_value->name);
|
|
|
|
pol_value->name = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Initialise policy handle hash */
|
|
|
|
|
|
|
|
static void init_pol_hash(void)
|
|
|
|
{
|
|
|
|
/* Initialise memory chunks */
|
|
|
|
|
|
|
|
if (pol_hash_key_chunk)
|
|
|
|
g_mem_chunk_destroy(pol_hash_key_chunk);
|
|
|
|
|
|
|
|
pol_hash_key_chunk = g_mem_chunk_new(
|
|
|
|
"Policy handle hash keys", sizeof(pol_hash_key),
|
|
|
|
POL_HASH_INIT_COUNT * sizeof(pol_hash_key), G_ALLOC_ONLY);
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2002-03-25 05:42:02 +00:00
|
|
|
if (pol_hash_value_chunk)
|
|
|
|
g_mem_chunk_destroy(pol_hash_value_chunk);
|
|
|
|
|
|
|
|
pol_hash_value_chunk = g_mem_chunk_new(
|
|
|
|
"Policy handle hash values", sizeof(pol_hash_value),
|
|
|
|
POL_HASH_INIT_COUNT * sizeof(pol_hash_value), G_ALLOC_ONLY);
|
|
|
|
|
|
|
|
/* Initialise hash table */
|
|
|
|
|
|
|
|
if (pol_hash) {
|
|
|
|
g_hash_table_foreach(pol_hash, free_pol_keyvalue, NULL);
|
|
|
|
g_hash_table_destroy(pol_hash);
|
|
|
|
}
|
|
|
|
|
|
|
|
pol_hash = g_hash_table_new(pol_hash_fn, pol_hash_compare);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check if there is unparsed data remaining in a frame and display an
|
|
|
|
error. I guess this could be made into an exception like the malformed
|
|
|
|
frame exception. For the DCERPC over SMB dissectors a long frame
|
|
|
|
indicates a bug in a dissector. */
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
void dcerpc_smb_check_long_frame(tvbuff_t *tvb, int offset,
|
2002-03-25 05:42:02 +00:00
|
|
|
packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
if (tvb_length_remaining(tvb, offset) != 0) {
|
|
|
|
|
2002-05-15 03:28:43 +00:00
|
|
|
proto_tree_add_text(
|
2002-08-28 21:04:11 +00:00
|
|
|
tree, tvb, offset, tvb_length_remaining(tvb, offset),
|
2002-05-15 03:28:43 +00:00
|
|
|
"[Long frame (%d bytes): SPOOLSS]",
|
|
|
|
tvb_length_remaining(tvb, offset));
|
2002-03-25 05:42:02 +00:00
|
|
|
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO,
|
|
|
|
"[Long frame (%d bytes): SPOOLSS]",
|
|
|
|
tvb_length_remaining(tvb, offset));
|
|
|
|
}
|
|
|
|
}
|
2002-04-16 02:02:04 +00:00
|
|
|
|
|
|
|
/* Dissect a NT status code */
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_ntstatus(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep,
|
2002-04-16 02:02:04 +00:00
|
|
|
int hfindex, guint32 *pdata)
|
|
|
|
{
|
|
|
|
guint32 status;
|
|
|
|
|
|
|
|
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
|
|
|
|
hfindex, &status);
|
|
|
|
|
2003-01-16 22:40:48 +00:00
|
|
|
if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
|
2002-04-16 02:02:04 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
|
2002-08-28 21:04:11 +00:00
|
|
|
val_to_str(status, NT_errors,
|
2002-06-25 02:58:11 +00:00
|
|
|
"Unknown error 0x%08x"));
|
2002-04-16 02:02:04 +00:00
|
|
|
if (pdata)
|
|
|
|
*pdata = status;
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2002-04-17 07:52:26 +00:00
|
|
|
|
2002-05-09 02:44:22 +00:00
|
|
|
/* Dissect a DOS status code */
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_doserror(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep,
|
2002-05-09 02:44:22 +00:00
|
|
|
int hfindex, guint32 *pdata)
|
|
|
|
{
|
|
|
|
guint32 status;
|
|
|
|
|
|
|
|
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
|
|
|
|
hfindex, &status);
|
|
|
|
|
2003-01-16 22:40:48 +00:00
|
|
|
if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
|
2002-05-09 02:44:22 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
|
2002-08-28 21:04:11 +00:00
|
|
|
val_to_str(status, DOS_errors,
|
2002-06-25 02:57:39 +00:00
|
|
|
"Unknown error 0x%08x"));
|
2002-05-09 02:44:22 +00:00
|
|
|
if (pdata)
|
|
|
|
*pdata = status;
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2002-04-17 07:52:26 +00:00
|
|
|
/* Dissect a NT policy handle */
|
|
|
|
|
2003-01-24 05:32:54 +00:00
|
|
|
static int hf_nt_policy_open_frame = -1;
|
|
|
|
static int hf_nt_policy_close_frame = -1;
|
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
static gint ett_nt_policy_hnd = -1;
|
|
|
|
|
2002-04-17 07:52:26 +00:00
|
|
|
int
|
|
|
|
dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep, int hfindex,
|
2002-05-11 22:29:43 +00:00
|
|
|
e_ctx_hnd *pdata, gboolean is_open, gboolean is_close)
|
2002-04-17 07:52:26 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_tree *subtree;
|
|
|
|
e_ctx_hnd hnd;
|
2002-04-22 09:43:03 +00:00
|
|
|
guint32 open_frame = 0, close_frame = 0;
|
2002-04-17 07:52:26 +00:00
|
|
|
char *name;
|
2002-05-07 00:35:14 +00:00
|
|
|
int old_offset = offset;
|
2002-04-17 07:52:26 +00:00
|
|
|
|
|
|
|
/* Add to proto tree */
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
item = proto_tree_add_text(tree, tvb, offset, sizeof(e_ctx_hnd),
|
2002-05-07 00:35:14 +00:00
|
|
|
"Policy Handle");
|
2002-04-17 07:52:26 +00:00
|
|
|
|
|
|
|
subtree = proto_item_add_subtree(item, ett_nt_policy_hnd);
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
offset = dissect_ndr_ctx_hnd(tvb, offset, pinfo, subtree, drep,
|
|
|
|
hfindex, &hnd);
|
2002-04-17 07:52:26 +00:00
|
|
|
|
2002-05-11 22:29:43 +00:00
|
|
|
/* Store request/reply information */
|
2002-08-28 21:04:11 +00:00
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
dcerpc_smb_store_pol_pkts(&hnd, 0, is_close ? pinfo->fd->num : 0);
|
|
|
|
dcerpc_smb_store_pol_pkts(&hnd, is_open ? pinfo->fd->num: 0, 0);
|
2002-05-11 22:29:43 +00:00
|
|
|
|
2002-04-17 07:52:26 +00:00
|
|
|
/* Insert request/reply information if known */
|
|
|
|
|
2002-06-28 01:23:26 +00:00
|
|
|
if (dcerpc_smb_fetch_pol(&hnd, &name, &open_frame, &close_frame)) {
|
2002-04-17 07:52:26 +00:00
|
|
|
|
|
|
|
if (open_frame)
|
2003-01-24 05:32:54 +00:00
|
|
|
proto_tree_add_uint(
|
|
|
|
subtree, hf_nt_policy_open_frame, tvb,
|
|
|
|
old_offset, sizeof(e_ctx_hnd), open_frame);
|
2002-04-17 07:52:26 +00:00
|
|
|
|
|
|
|
if (close_frame)
|
2003-01-24 05:32:54 +00:00
|
|
|
proto_tree_add_uint(
|
|
|
|
subtree, hf_nt_policy_close_frame, tvb,
|
|
|
|
old_offset, sizeof(e_ctx_hnd), close_frame);
|
|
|
|
|
2002-05-11 22:29:43 +00:00
|
|
|
if (name != NULL)
|
|
|
|
proto_item_append_text(item, ": %s", name);
|
2002-04-17 07:52:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (pdata)
|
|
|
|
*pdata = hnd;
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2002-05-09 02:44:22 +00:00
|
|
|
|
|
|
|
/* Some helper routines to dissect a range of uint8 characters. I don't
|
|
|
|
think these are "official" NDR representations and are probably specific
|
|
|
|
to NT so for the moment they're put here instead of in packet-dcerpc.c
|
|
|
|
and packet-dcerpc-ndr.c. */
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_dcerpc_uint8s(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep, int hfindex,
|
2002-11-28 03:57:50 +00:00
|
|
|
int length, const guint8 **pdata)
|
2002-05-09 02:44:22 +00:00
|
|
|
{
|
2002-11-28 03:57:50 +00:00
|
|
|
const guint8 *data;
|
2002-05-09 02:44:22 +00:00
|
|
|
|
2002-11-28 03:57:50 +00:00
|
|
|
data = (const guint8 *)tvb_get_ptr(tvb, offset, length);
|
2002-05-09 02:44:22 +00:00
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_item (tree, hfindex, tvb, offset, length, (drep[0] & 0x10));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pdata)
|
|
|
|
*pdata = data;
|
|
|
|
|
|
|
|
return offset + length;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_ndr_uint8s(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep,
|
2002-11-28 03:57:50 +00:00
|
|
|
int hfindex, int length, const guint8 **pdata)
|
2002-05-09 02:44:22 +00:00
|
|
|
{
|
|
|
|
dcerpc_info *di;
|
|
|
|
|
|
|
|
di=pinfo->private_data;
|
|
|
|
if(di->conformant_run){
|
|
|
|
/* just a run to handle conformant arrays, no scalars to dissect */
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* no alignment needed */
|
2002-08-28 21:04:11 +00:00
|
|
|
return dissect_dcerpc_uint8s(tvb, offset, pinfo,
|
2002-05-09 02:44:22 +00:00
|
|
|
tree, drep, hfindex, length, pdata);
|
|
|
|
}
|
2002-06-05 04:17:47 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
dissect_dcerpc_uint16s(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep, int hfindex,
|
2002-11-28 21:03:36 +00:00
|
|
|
int length)
|
2002-06-05 04:17:47 +00:00
|
|
|
{
|
|
|
|
if (tree) {
|
|
|
|
proto_tree_add_item (tree, hfindex, tvb, offset, length * 2, (drep[0] & 0x10));
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset + length * 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_ndr_uint16s(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2002-08-28 21:04:11 +00:00
|
|
|
proto_tree *tree, char *drep,
|
2002-11-28 21:03:36 +00:00
|
|
|
int hfindex, int length)
|
2002-06-05 04:17:47 +00:00
|
|
|
{
|
|
|
|
dcerpc_info *di;
|
|
|
|
|
|
|
|
di=pinfo->private_data;
|
|
|
|
if(di->conformant_run){
|
|
|
|
/* just a run to handle conformant arrays, no scalars to dissect */
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (offset % 2)
|
|
|
|
offset++;
|
|
|
|
|
2002-08-28 21:04:11 +00:00
|
|
|
return dissect_dcerpc_uint16s(tvb, offset, pinfo,
|
2002-11-28 21:03:36 +00:00
|
|
|
tree, drep, hfindex, length);
|
2002-06-05 04:17:47 +00:00
|
|
|
}
|
2003-01-24 05:32:54 +00:00
|
|
|
|
2003-01-28 06:27:01 +00:00
|
|
|
/*
|
|
|
|
* Helper routines for dissecting NDR strings
|
|
|
|
*/
|
|
|
|
|
2003-04-27 00:49:14 +00:00
|
|
|
void cb_wstr_postprocess(packet_info *pinfo, proto_tree *tree _U_,
|
2003-01-28 06:27:01 +00:00
|
|
|
proto_item *item, tvbuff_t *tvb,
|
|
|
|
int start_offset, int end_offset,
|
|
|
|
void *callback_args)
|
|
|
|
{
|
|
|
|
gint options = GPOINTER_TO_INT(callback_args);
|
2003-01-30 08:19:39 +00:00
|
|
|
gint levels = CB_STR_ITEM_LEVELS(options);
|
2003-01-28 06:27:01 +00:00
|
|
|
char *s;
|
|
|
|
|
2003-01-30 06:08:10 +00:00
|
|
|
/* Align start_offset on 4-byte boundary. */
|
|
|
|
|
|
|
|
if (start_offset % 4)
|
|
|
|
start_offset += 4 - (start_offset % 4);
|
|
|
|
|
2003-01-28 06:27:01 +00:00
|
|
|
/* Get string value */
|
|
|
|
|
|
|
|
if ((end_offset - start_offset) <= 12)
|
|
|
|
return; /* XXX: Use unistr2 dissector instead? */
|
|
|
|
|
2003-02-24 01:22:30 +00:00
|
|
|
s = tvb_fake_unicode(
|
|
|
|
tvb, start_offset + 12, (end_offset - start_offset - 12) / 2,
|
|
|
|
TRUE);
|
2003-01-28 06:27:01 +00:00
|
|
|
|
|
|
|
/* Append string to COL_INFO */
|
|
|
|
|
|
|
|
if (options & CB_STR_COL_INFO) {
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", s);
|
|
|
|
}
|
|
|
|
|
2003-01-30 08:19:39 +00:00
|
|
|
/* Append string to upper-level proto_items */
|
2003-02-25 02:04:56 +00:00
|
|
|
|
|
|
|
if (levels > 0 && item && s && s[0]) {
|
2003-01-28 06:27:01 +00:00
|
|
|
proto_item_append_text(item, ": %s", s);
|
2003-01-30 08:19:39 +00:00
|
|
|
item = item->parent;
|
|
|
|
levels--;
|
|
|
|
if (levels > 0) {
|
|
|
|
proto_item_append_text(item, ": %s", s);
|
|
|
|
item = item->parent;
|
|
|
|
levels--;
|
|
|
|
while (levels > 0) {
|
|
|
|
proto_item_append_text(item, " %s", s);
|
|
|
|
item = item->parent;
|
|
|
|
levels--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2003-01-28 06:27:01 +00:00
|
|
|
|
|
|
|
/* Save string to dcv->private_data */
|
|
|
|
|
|
|
|
if (options & CB_STR_SAVE) {
|
|
|
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
|
|
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
|
|
|
|
|
|
|
dcv->private_data = g_strdup(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free(s);
|
|
|
|
}
|
|
|
|
|
2003-04-27 00:49:14 +00:00
|
|
|
void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_,
|
|
|
|
proto_item *item, tvbuff_t *tvb,
|
|
|
|
int start_offset, int end_offset,
|
|
|
|
void *callback_args)
|
|
|
|
{
|
|
|
|
gint options = GPOINTER_TO_INT(callback_args);
|
|
|
|
gint levels = CB_STR_ITEM_LEVELS(options);
|
|
|
|
char *s;
|
|
|
|
|
|
|
|
/* Align start_offset on 4-byte boundary. */
|
|
|
|
|
|
|
|
if (start_offset % 4)
|
|
|
|
start_offset += 4 - (start_offset % 4);
|
|
|
|
|
|
|
|
/* Get string value */
|
|
|
|
|
|
|
|
if ((end_offset - start_offset) <= 12)
|
|
|
|
return; /* XXX: Use unistr2 dissector instead? */
|
|
|
|
|
2003-04-27 21:48:46 +00:00
|
|
|
s = tvb_format_text(tvb, start_offset + 12, (end_offset - start_offset - 12) );
|
2003-04-27 00:49:14 +00:00
|
|
|
|
|
|
|
/* Append string to COL_INFO */
|
|
|
|
|
|
|
|
if (options & CB_STR_COL_INFO) {
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", s);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Append string to upper-level proto_items */
|
|
|
|
|
|
|
|
if (levels > 0 && item && s && s[0]) {
|
|
|
|
proto_item_append_text(item, ": %s", s);
|
|
|
|
item = item->parent;
|
|
|
|
levels--;
|
|
|
|
if (levels > 0) {
|
|
|
|
proto_item_append_text(item, ": %s", s);
|
|
|
|
item = item->parent;
|
|
|
|
levels--;
|
|
|
|
while (levels > 0) {
|
|
|
|
proto_item_append_text(item, " %s", s);
|
|
|
|
item = item->parent;
|
|
|
|
levels--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Save string to dcv->private_data */
|
|
|
|
|
|
|
|
if (options & CB_STR_SAVE) {
|
|
|
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
|
|
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
|
|
|
|
|
|
|
dcv->private_data = g_strdup(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free(s);
|
|
|
|
}
|
|
|
|
|
2003-01-28 06:27:01 +00:00
|
|
|
/* Dissect a pointer to a NDR string and append the string value to the
|
|
|
|
proto_item. */
|
|
|
|
|
|
|
|
int dissect_ndr_str_pointer_item(tvbuff_t *tvb, gint offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
char *drep, int type, char *text,
|
2003-01-30 08:19:39 +00:00
|
|
|
int hf_index, int levels)
|
2003-01-28 06:27:01 +00:00
|
|
|
{
|
|
|
|
return dissect_ndr_pointer_cb(
|
|
|
|
tvb, offset, pinfo, tree, drep,
|
2003-02-07 22:44:54 +00:00
|
|
|
dissect_ndr_wchar_cvstring, type, text, hf_index,
|
2003-04-27 00:49:14 +00:00
|
|
|
cb_wstr_postprocess, GINT_TO_POINTER(levels + 1));
|
2003-01-28 06:27:01 +00:00
|
|
|
}
|
|
|
|
|
2003-01-24 05:32:54 +00:00
|
|
|
/*
|
|
|
|
* Register ett/hf values and perform DCERPC over SMB specific
|
|
|
|
* initialisation.
|
|
|
|
*/
|
|
|
|
void dcerpc_smb_init(int proto_dcerpc)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
|
2003-02-03 02:00:54 +00:00
|
|
|
/* String handling */
|
|
|
|
|
|
|
|
{ &hf_nt_cs_size,
|
|
|
|
{ "Size", "nt.str.size", FT_UINT16, BASE_DEC,
|
|
|
|
NULL, 0x0, "Size of string in short integers",
|
|
|
|
HFILL }},
|
|
|
|
|
|
|
|
{ &hf_nt_cs_len,
|
|
|
|
{ "Length", "nt.str.len", FT_UINT16, BASE_DEC,
|
|
|
|
NULL, 0x0, "Length of string in short integers",
|
|
|
|
HFILL }},
|
|
|
|
|
2003-01-24 05:32:54 +00:00
|
|
|
/* Policy handles */
|
|
|
|
|
|
|
|
{ &hf_nt_policy_open_frame,
|
|
|
|
{ "Frame handle opened", "dcerpc.nt.open_frame",
|
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
"Frame handle opened", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_nt_policy_close_frame,
|
2003-04-27 00:34:27 +00:00
|
|
|
{ "Frame handle closed", "dcerpc.nt.close_frame",
|
2003-01-24 05:32:54 +00:00
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
"Frame handle closed", HFILL }},
|
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_nt_unicode_string,
|
2003-02-03 02:00:54 +00:00
|
|
|
&ett_nt_counted_string,
|
2003-02-08 09:41:44 +00:00
|
|
|
&ett_nt_counted_byte_array,
|
2003-01-24 05:32:54 +00:00
|
|
|
&ett_nt_policy_hnd,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Register ett's and hf's */
|
|
|
|
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
proto_register_field_array(proto_dcerpc, hf, array_length(hf));
|
|
|
|
|
|
|
|
/* Initialise policy handle hash */
|
|
|
|
|
|
|
|
init_pol_hash();
|
|
|
|
}
|