aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ntlmssp.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-11-15 00:15:20 +0000
committerBill Meier <wmeier@newsguy.com>2013-11-15 00:15:20 +0000
commit2fb674f7399f122bdf3cdb9d3f7df259bf4e663a (patch)
treec4771d25aa6e62cf0d9765c36b03ac211d92bc73 /epan/dissectors/packet-ntlmssp.c
parent494d4bb5e2eae171e8ccbffa13f382ceae262daa (diff)
Create/use value_string_ext to reference a value-string-array.
Define an array as const. svn path=/trunk/; revision=53334
Diffstat (limited to 'epan/dissectors/packet-ntlmssp.c')
-rw-r--r--epan/dissectors/packet-ntlmssp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index 9df6bc4d48..addd203f64 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -77,7 +77,7 @@ typedef struct _md4_pass {
guint8 md4[NTLMSSP_KEY_LEN];
} md4_pass;
-static unsigned char gbl_zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
+static const unsigned char gbl_zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
static GHashTable* hash_packet = NULL;
/*
@@ -1196,6 +1196,7 @@ static const value_string ntlm_name_types[] = {
{ NTLM_TARGET_INFO_CHANNEL_BINDINGS, "Channel Bindings"},
{ 0, NULL }
};
+static value_string_ext ntlm_name_types_ext = VALUE_STRING_EXT_INIT(ntlm_name_types);
/* The following *must* match the order of the list of attribute types */
/* Assumption: values in the list are a sequence starting with 0 and */
@@ -1286,7 +1287,7 @@ dissect_ntlmssp_target_info_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
item_length = content_length + 4;
target_info_tf = proto_tree_add_text(tree, tvb, item_offset, item_length, "Attribute: %s",
- val_to_str(item_type, ntlm_name_types, "Unknown (%d)"));
+ val_to_str_ext(item_type, &ntlm_name_types_ext, "Unknown (%d)"));
target_info_tree = proto_item_add_subtree (target_info_tf, *tif_p->ett);
proto_tree_add_item (target_info_tree, *tif_p->hf_item_type, tvb, type_offset, 2, ENC_LITTLE_ENDIAN);
@@ -3077,7 +3078,7 @@ proto_register_ntlmssp(void)
{ &hf_ntlmssp_challenge_target_info_item_type,
{ "Target Info Item Type", "ntlmssp.challenge.target_info.item.type",
- FT_UINT16, BASE_HEX, VALS(ntlm_name_types), 0x0,
+ FT_UINT16, BASE_HEX | BASE_EXT_STRING, &ntlm_name_types_ext, 0x0,
NULL, HFILL }
},
{ &hf_ntlmssp_challenge_target_info_item_len,
@@ -3144,7 +3145,7 @@ proto_register_ntlmssp(void)
{ &hf_ntlmssp_ntlmv2_response_item_type,
{ "NTLMV2 Response Item Type", "ntlmssp.ntlmv2_response.item.type",
- FT_UINT16, BASE_HEX, VALS(ntlm_name_types), 0x0,
+ FT_UINT16, BASE_HEX | BASE_EXT_STRING, &ntlm_name_types_ext, 0x0,
NULL, HFILL }
},
{ &hf_ntlmssp_ntlmv2_response_item_len,