Use extended value string functions to access dce_error_vals (which has 4397 entries)
svn path=/trunk/; revision=34500
This commit is contained in:
parent
45da078b7d
commit
5ed532268f
|
@ -76,7 +76,7 @@ conv_dissect_who_are_you_rqst (tvbuff_t *tvb, int offset,
|
|||
actuid.Data1, actuid.Data2, actuid.Data3, actuid.Data4[0], actuid.Data4[1],
|
||||
actuid.Data4[2], actuid.Data4[3], actuid.Data4[4], actuid.Data4[5], actuid.Data4[6], actuid.Data4[7]);
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -93,11 +93,11 @@ conv_dissect_who_are_you_resp (tvbuff_t *tvb, int offset,
|
|||
|
||||
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_conv_who_are_you_resp_seq, &seq);
|
||||
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_conv_rc, &st);
|
||||
|
||||
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO)) {
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "conv_who_are_you response seq:%u st:%s",
|
||||
seq, val_to_str(st, dce_error_vals, "%u"));
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "conv_who_are_you response seq:%u st:%s",
|
||||
seq, val_to_str_ext(st, &dce_error_vals_ext, "%u"));
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -125,7 +125,7 @@ conv_dissect_who_are_you2_rqst (tvbuff_t *tvb, int offset,
|
|||
actuid.Data1, actuid.Data2, actuid.Data3, actuid.Data4[0], actuid.Data4[1],
|
||||
actuid.Data4[2], actuid.Data4[3], actuid.Data4[4], actuid.Data4[5], actuid.Data4[6], actuid.Data4[7]);
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
static int
|
||||
|
@ -136,7 +136,7 @@ conv_dissect_who_are_you2_resp (tvbuff_t *tvb, int offset,
|
|||
/*
|
||||
* [out] unsigned32 *seq,
|
||||
* [out] uuid_t *cas_uuid,
|
||||
*
|
||||
*
|
||||
* [out] unsigned32 *st
|
||||
*/
|
||||
guint32 seq, st;
|
||||
|
@ -147,11 +147,11 @@ conv_dissect_who_are_you2_resp (tvbuff_t *tvb, int offset,
|
|||
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_conv_rc, &st);
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO)) {
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,
|
||||
"conv_who_are_you2 response seq:%u st:%s cas:%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
seq, val_to_str(st, dce_error_vals, "%u"),
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,
|
||||
"conv_who_are_you2 response seq:%u st:%s cas:%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
seq, val_to_str_ext(st, &dce_error_vals_ext, "%u"),
|
||||
cas_uuid.Data1, cas_uuid.Data2, cas_uuid.Data3, cas_uuid.Data4[0], cas_uuid.Data4[1],
|
||||
cas_uuid.Data4[2], cas_uuid.Data4[3], cas_uuid.Data4[4], cas_uuid.Data4[5], cas_uuid.Data4[6], cas_uuid.Data4[7]);
|
||||
cas_uuid.Data4[2], cas_uuid.Data4[3], cas_uuid.Data4[4], cas_uuid.Data4[5], cas_uuid.Data4[6], cas_uuid.Data4[7]);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -159,9 +159,9 @@ conv_dissect_who_are_you2_resp (tvbuff_t *tvb, int offset,
|
|||
|
||||
|
||||
static dcerpc_sub_dissector conv_dissectors[] = {
|
||||
{ 0, "who_are_you",
|
||||
{ 0, "who_are_you",
|
||||
conv_dissect_who_are_you_rqst, conv_dissect_who_are_you_resp },
|
||||
{ 1, "who_are_you2",
|
||||
{ 1, "who_are_you2",
|
||||
conv_dissect_who_are_you2_rqst, conv_dissect_who_are_you2_resp },
|
||||
{ 2, "are_you_there", NULL, NULL },
|
||||
{ 3, "who_are_you_auth", NULL, NULL },
|
||||
|
@ -176,7 +176,7 @@ proto_register_conv (void)
|
|||
{ &hf_conv_opnum,
|
||||
{ "Operation", "conv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_conv_rc,
|
||||
{"Status", "conv.status", FT_UINT32, BASE_DEC, VALS(dce_error_vals), 0x0, NULL, HFILL }},
|
||||
{"Status", "conv.status", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &dce_error_vals_ext, 0x0, NULL, HFILL }},
|
||||
|
||||
{ &hf_conv_who_are_you_rqst_actuid,
|
||||
{"Activity UID", "conv.who_are_you_rqst_actuid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID", HFILL }},
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <epan/value_string.h>
|
||||
#include "packet-dcerpc-dce122.h"
|
||||
|
||||
const value_string dce_error_vals[] = {
|
||||
static const value_string dce_error_vals[] = {
|
||||
{ 0, "SUCCESS", },
|
||||
{ 539918337, "event already in set" },
|
||||
{ 539918338, "event still part of some set" },
|
||||
|
@ -4426,3 +4426,7 @@ const value_string dce_error_vals[] = {
|
|||
{ 704852032, "zlc_Init() returning .ld" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
#define array_length(x) (sizeof x / sizeof x[0])
|
||||
|
||||
value_string_ext dce_error_vals_ext = VALUE_STRING_EXT_INIT(dce_error_vals);
|
||||
|
|
|
@ -27,6 +27,6 @@
|
|||
#ifndef __PACKET_DCERPC__DCE122_H__
|
||||
#define __PACKET_DCERPC__DCE122_H__
|
||||
|
||||
extern const value_string dce_error_vals[];
|
||||
extern value_string_ext dce_error_vals_ext;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -65,8 +65,8 @@ proto_register_dtsprovider (void)
|
|||
{ "Operation", "dtsprovider.opnum", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_dtsprovider_status,
|
||||
{ "Status", "dtsprovider.status", FT_UINT32, BASE_DEC,
|
||||
VALS(dce_error_vals), 0x0, "Return code, status of executed command", HFILL }}
|
||||
{ "Status", "dtsprovider.status", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
|
||||
&dce_error_vals_ext, 0x0, "Return code, status of executed command", HFILL }}
|
||||
};
|
||||
|
||||
static gint *ett[] = {
|
||||
|
|
|
@ -324,7 +324,7 @@ inode, volume, etc all will be garbage.
|
|||
guint32 st; \
|
||||
const char *st_str; \
|
||||
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_st, &st); \
|
||||
st_str = val_to_str (st, dce_error_vals, "%u"); \
|
||||
st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u"); \
|
||||
if (st){ \
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) \
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO, "%s st:%s ", name, st_str); \
|
||||
|
@ -905,7 +905,7 @@ dissect_afsErrorStatus (tvbuff_t * tvb, int offset,
|
|||
offset =
|
||||
dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_afserrorstatus_st,
|
||||
&st);
|
||||
st_str = val_to_str (st, dce_error_vals, "%u");
|
||||
st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
|
||||
|
|
|
@ -223,14 +223,14 @@ static const guint8 *st_str;
|
|||
|
||||
#define MACRO_ST_CLEAR(name) \
|
||||
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_st, &st); \
|
||||
st_str = val_to_str (st, dce_error_vals, "%u"); \
|
||||
if (st){ \
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) \
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO, "%s st:%s ", name, st_str); \
|
||||
}else{ \
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) \
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str); \
|
||||
}
|
||||
st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u"); \
|
||||
if (st){ \
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) \
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO, "%s st:%s ", name, st_str); \
|
||||
} else{ \
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) \
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str); \
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_afsnetaddr (tvbuff_t * tvb, int offset,
|
||||
|
|
|
@ -157,7 +157,7 @@ dissect_error_status_t (tvbuff_t * tvb, int offset,
|
|||
offset =
|
||||
dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_status_t,
|
||||
&st);
|
||||
st_str = val_to_str (st, dce_error_vals, "%u");
|
||||
st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
|
||||
|
@ -977,7 +977,7 @@ dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset,
|
|||
offset =
|
||||
dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
|
||||
hf_rs_pgo_query_result_t, &st);
|
||||
status = val_to_str (st, dce_error_vals, "%u");
|
||||
status = val_to_str_ext (st, &dce_error_vals_ext, "%u");
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, " status:%s ", status);
|
||||
|
|
Loading…
Reference in New Issue