forked from osmocom/wireshark
Move the value_string table for the share type values to
"packet-smb-common.c", and use it in "packet-dcerpc-srvsvc". svn path=/trunk/; revision=5545
This commit is contained in:
parent
e4040a6ebd
commit
500c93ee8e
|
@ -4,7 +4,7 @@
|
|||
* Copyright 2002, Richard Sharpe <rsharpe@ns.aus.com>
|
||||
* decode srvsvc calls where Samba knows them ...
|
||||
*
|
||||
* $Id: packet-dcerpc-srvsvc.c,v 1.5 2002/05/24 10:45:40 guy Exp $
|
||||
* $Id: packet-dcerpc-srvsvc.c,v 1.6 2002/05/24 10:57:36 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -103,6 +103,7 @@ srvsvc_dissect_SHARE_INFO_struct(tvbuff_t *tvb, int offset,
|
|||
NDR_POINTER_UNIQUE, "Share",
|
||||
hf_srvsvc_share, 0);
|
||||
|
||||
/* XXX - two share types in a row? */
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
|
||||
hf_srvsvc_share_type, NULL);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
|
||||
|
@ -420,6 +421,7 @@ proto_register_dcerpc_srvsvc(void)
|
|||
{ &hf_srvsvc_info,
|
||||
{ "Info Structure", "srvsvc.info_struct", FT_BYTES,
|
||||
BASE_HEX, NULL, 0x0, "Info Structure", HFILL}},
|
||||
/* XXX - DOS error code, NT status code, or neither? */
|
||||
{ &hf_srvsvc_rc,
|
||||
{ "Return code", "srvsvc.rc", FT_UINT32,
|
||||
BASE_DEC, NULL, 0x0, "Return Code", HFILL}},
|
||||
|
@ -469,7 +471,7 @@ proto_register_dcerpc_srvsvc(void)
|
|||
BASE_NONE, NULL, 0x0, "Share Comment", HFILL}},
|
||||
{ &hf_srvsvc_share_type,
|
||||
{ "Share Type", "srvsvc.share_type", FT_UINT32,
|
||||
BASE_HEX, NULL, 0x0, "Share Type", HFILL}},
|
||||
BASE_DEC, VALS(share_type_vals), 0x0, "Share Type", HFILL}},
|
||||
};
|
||||
|
||||
static gint *ett[] = {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Common routines for smb packet dissection
|
||||
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
|
||||
*
|
||||
* $Id: packet-smb-common.c,v 1.9 2002/04/30 11:03:08 guy Exp $
|
||||
* $Id: packet-smb-common.c,v 1.10 2002/05/24 10:57:38 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -27,6 +27,17 @@
|
|||
|
||||
#include "packet-smb-common.h"
|
||||
|
||||
/*
|
||||
* Share type values - used in LANMAN and in SRVSVC.
|
||||
*/
|
||||
const value_string share_type_vals[] = {
|
||||
{0, "Directory tree"},
|
||||
{1, "Printer queue"},
|
||||
{2, "Communications device"},
|
||||
{3, "IPC"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
int display_ms_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index)
|
||||
{
|
||||
char *str;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for SMB packet dissection
|
||||
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
* $Id: packet-smb-common.h,v 1.11 2002/04/30 23:48:15 guy Exp $
|
||||
* $Id: packet-smb-common.h,v 1.12 2002/05/24 10:57:38 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -64,4 +64,6 @@ int dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, char *nam
|
|||
int
|
||||
dissect_nt_sec_desc(tvbuff_t *tvb, int offset, proto_tree *parent_tree, int len);
|
||||
|
||||
extern const value_string share_type_vals[];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
|
|||
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
|
||||
* Guy Harris 2001
|
||||
*
|
||||
* $Id: packet-smb-pipe.c,v 1.76 2002/04/30 11:03:06 guy Exp $
|
||||
* $Id: packet-smb-pipe.c,v 1.77 2002/05/24 10:57:37 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -54,6 +54,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
|
|||
#include "smb.h"
|
||||
#include "packet-smb-pipe.h"
|
||||
#include "packet-smb-browse.h"
|
||||
#include "packet-smb-common.h"
|
||||
#include "packet-dcerpc.h"
|
||||
#include "reassemble.h"
|
||||
|
||||
|
@ -197,14 +198,6 @@ static const value_string status_vals[] = {
|
|||
{0, NULL}
|
||||
};
|
||||
|
||||
static const value_string share_type_vals[] = {
|
||||
{0, "Directory tree"},
|
||||
{1, "Printer queue"},
|
||||
{2, "Communications device"},
|
||||
{3, "IPC"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
static const value_string privilege_vals[] = {
|
||||
{0, "Guest"},
|
||||
{1, "User"},
|
||||
|
|
Loading…
Reference in New Issue