aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dcerpc-dfs.c
diff options
context:
space:
mode:
authortpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7>2002-06-24 00:03:18 +0000
committertpot <tpot@f5534014-38df-0310-8fa8-9805f1628bb7>2002-06-24 00:03:18 +0000
commit39fcea8a39ab86c493cfec8895d2c533e99f6420 (patch)
treef263cc80f6ca77b7160544442eeff3d5e2dd5377 /packet-dcerpc-dfs.c
parent79ee4c939324175b8f55c44cd59ddfd68dff2807 (diff)
Change each DCERPC dissector to pass in a hf value on initialisation
for a value_string that corresponds to that dissectors opnums. Pass in -1 if no such table is available. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5749 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-dcerpc-dfs.c')
-rw-r--r--packet-dcerpc-dfs.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/packet-dcerpc-dfs.c b/packet-dcerpc-dfs.c
index 54a1033561..12b2228394 100644
--- a/packet-dcerpc-dfs.c
+++ b/packet-dcerpc-dfs.c
@@ -2,7 +2,7 @@
* Routines for SMB \\PIPE\\netdfs packet disassembly
* Copyright 2001, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc-dfs.c,v 1.3 2002/05/31 00:31:12 tpot Exp $
+ * $Id: packet-dcerpc-dfs.c,v 1.4 2002/06/24 00:03:17 tpot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,6 +35,8 @@
static int proto_dcerpc_dfs = -1;
static gint ett_dcerpc_dfs = -1;
+static int hf_dfs_opnum = -1;
+
static e_uuid_t uuid_dcerpc_dfs = {
0x4fc742e0, 0x4a10, 0x11cf,
{ 0x82, 0x73, 0x00, 0xaa, 0x00, 0x4a, 0xe6, 0x73 }
@@ -43,18 +45,33 @@ static e_uuid_t uuid_dcerpc_dfs = {
static guint16 ver_dcerpc_dfs = 3;
static dcerpc_sub_dissector dcerpc_dfs_dissectors[] = {
- { DFS_EXIST, "DFS_EXIST", NULL, NULL },
- { DFS_ADD, "DFS_ADD", NULL, NULL },
- { DFS_REMOVE, "DFS_REMOVE", NULL, NULL },
- { DFS_GET_INFO, "DFS_GET_INFO", NULL, NULL },
- { DFS_ENUM, "DFS_ENUM", NULL, NULL },
+ { DFS_EXIST, "Exist", NULL, NULL },
+ { DFS_ADD, "Add", NULL, NULL },
+ { DFS_REMOVE, "Remove", NULL, NULL },
+ { DFS_GET_INFO, "GetInfo", NULL, NULL },
+ { DFS_ENUM, "Enum", NULL, NULL },
{0, NULL, NULL, NULL }
};
+static const value_string dfs_opnum_vals[] = {
+ { DFS_EXIST, "Exit" },
+ { DFS_ADD, "Add" },
+ { DFS_REMOVE, "Remove" },
+ { DFS_GET_INFO, "GetInfo" },
+ { DFS_ENUM, "Enum" },
+ { 0, NULL },
+};
+
void
proto_register_dcerpc_dfs(void)
{
+ static hf_register_info hf[] = {
+ { &hf_dfs_opnum,
+ { "Operation", "dfs.opnum", FT_UINT16, BASE_DEC,
+ VALS(dfs_opnum_vals), 0x0, "Operation", HFILL }},
+ };
+
static gint *ett[] = {
&ett_dcerpc_dfs
};
@@ -62,6 +79,8 @@ proto_register_dcerpc_dfs(void)
proto_dcerpc_dfs = proto_register_protocol(
"Microsoft Distributed File System", "DFS", "dfs");
+ proto_register_field_array(proto_dcerpc_dfs, hf, array_length(hf));
+
proto_register_subtree_array(ett, array_length(ett));
}
@@ -71,5 +90,5 @@ proto_reg_handoff_dcerpc_dfs(void)
/* Register protocol as dcerpc */
dcerpc_init_uuid(proto_dcerpc_dfs, ett_dcerpc_dfs, &uuid_dcerpc_dfs,
- ver_dcerpc_dfs, dcerpc_dfs_dissectors);
+ ver_dcerpc_dfs, dcerpc_dfs_dissectors, hf_dfs_opnum);
}