aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpcap.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-10-15 18:46:26 +0000
committerBill Meier <wmeier@newsguy.com>2011-10-15 18:46:26 +0000
commit126aa8539380e6b0b465b48d30f349b76afdc489 (patch)
tree16b43738b14751d74a8ca8e4de803ba0b6c87196 /epan/dissectors/packet-rpcap.c
parent4c9bb81ad7b0f609fa236c808a1ab9ef6cab5a79 (diff)
Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
Diffstat (limited to 'epan/dissectors/packet-rpcap.c')
-rw-r--r--epan/dissectors/packet-rpcap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c
index 38575ef571..129e3501ba 100644
--- a/epan/dissectors/packet-rpcap.c
+++ b/epan/dissectors/packet-rpcap.c
@@ -391,7 +391,7 @@ dissect_rpcap_error (tvbuff_t *tvb, packet_info *pinfo,
tvb_format_text_wsp (tvb, offset, len));
}
- ti = proto_tree_add_item (parent_tree, hf_error, tvb, offset, len, ENC_BIG_ENDIAN);
+ ti = proto_tree_add_item (parent_tree, hf_error, tvb, offset, len, ENC_ASCII|ENC_NA);
expert_add_info_format (pinfo, ti, PI_SEQUENCE, PI_NOTE,
"Error: %s", tvb_format_text_wsp (tvb, offset, len));
}
@@ -497,12 +497,12 @@ dissect_rpcap_findalldevs_if (tvbuff_t *tvb, packet_info *pinfo _U_,
if (namelen) {
proto_item_append_text (ti, ": %s", tvb_get_ephemeral_string (tvb, offset, namelen));
- proto_tree_add_item (tree, hf_if_name, tvb, offset, namelen, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_if_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
offset += namelen;
}
if (desclen) {
- proto_tree_add_item (tree, hf_if_desc, tvb, offset, desclen, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_if_desc, tvb, offset, desclen, ENC_ASCII|ENC_NA);
offset += desclen;
}
@@ -664,11 +664,11 @@ dissect_rpcap_auth_request (tvbuff_t *tvb, packet_info *pinfo _U_,
guint8 *username, *password;
username = tvb_get_ephemeral_string (tvb, offset, slen1);
- proto_tree_add_item (tree, hf_auth_username, tvb, offset, slen1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_auth_username, tvb, offset, slen1, ENC_ASCII|ENC_NA);
offset += slen1;
password = tvb_get_ephemeral_string (tvb, offset, slen2);
- proto_tree_add_item (tree, hf_auth_password, tvb, offset, slen2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_auth_password, tvb, offset, slen2, ENC_ASCII|ENC_NA);
offset += slen2;
proto_item_append_text (ti, " (%s/%s)", username, password);
@@ -683,7 +683,7 @@ dissect_rpcap_open_request (tvbuff_t *tvb, packet_info *pinfo _U_,
gint len;
len = tvb_length_remaining (tvb, offset);
- proto_tree_add_item (parent_tree, hf_open_request, tvb, offset, len, ENC_BIG_ENDIAN);
+ proto_tree_add_item (parent_tree, hf_open_request, tvb, offset, len, ENC_ASCII|ENC_NA);
}