diff options
author | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-06-28 16:39:31 +0000 |
---|---|---|
committer | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-06-28 16:39:31 +0000 |
commit | fa2f7d53380d3e036ba59e542dc3dc563a62d178 (patch) | |
tree | be46ce6d1a54e0db8fb64bd4c0184e92050fdc9a /epan/dissectors/packet-hip.c | |
parent | 76a744b23baebdf36c6b117384d208efca8fb15b (diff) |
Make dissector handle unexpected data better.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28875 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-hip.c')
-rw-r--r-- | epan/dissectors/packet-hip.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-hip.c b/epan/dissectors/packet-hip.c index 97583ba641..2f06c173d6 100644 --- a/epan/dissectors/packet-hip.c +++ b/epan/dissectors/packet-hip.c @@ -435,7 +435,7 @@ dissect_hip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) control_h = tvb_get_ntohs(tvb, newoffset); newoffset += 2; - col_set_str(pinfo->cinfo, COL_INFO, match_strval(hiph_packet_type, pinfo_vals)); + col_set_str(pinfo->cinfo, COL_INFO, val_to_str(hiph_packet_type, pinfo_vals, "Unknown")); /* populate a tree in the second pane with the status of the link layer (i.e. none) */ if(tree) { @@ -534,7 +534,7 @@ dissect_hip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti_tlv = proto_tree_add_uint_format(hip_tlv_tree, hf_hip_type, tvb, offset, 4 + tlv_length_h, tlv_type_h, "%s (type=%u, length=%u)", - match_strval(tlv_type_h, hip_param_vals), + val_to_str(tlv_type_h, hip_param_vals, "Unknown"), tlv_type_h, tlv_length_h); /* Parse value */ @@ -720,7 +720,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len /* First Group ID*/ proto_tree_add_uint_format(t, hf_hip_tlv_dh_group_id, tvb, newoffset, 1, n, "%u (%s)", n, - match_strval(n, dh_group_id_vals)); + val_to_str(n, dh_group_id_vals, "Unknown")); /* First Public value len */ newoffset++; pv_len = tvb_get_ntohs(tvb, newoffset); @@ -735,7 +735,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len newoffset += pv_len; proto_tree_add_uint_format(t, hf_hip_tlv_dh_group_id, tvb, newoffset, 1, n, "%u (%s)", n, - match_strval(n, dh_group_id_vals)); + val_to_str(n, dh_group_id_vals, "Unknown")); /* Second Public value len */ newoffset += 1; pv_len = tvb_get_ntohs(tvb, newoffset); @@ -758,7 +758,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len trans = tvb_get_ntohs(tvb, newoffset); proto_tree_add_uint_format(t, hf_hip_tlv_trans_id, tvb, newoffset, 2, trans, "%u (%s)", trans, - match_strval(trans, transform_id_vals)); + val_to_str(trans, transform_id_vals, "Unknown")); tlv_len -= 2; newoffset += 2; } @@ -771,7 +771,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len trans = tvb_get_ntohs(tvb, newoffset); proto_tree_add_uint_format(t, hf_hip_tlv_trans_id, tvb, newoffset, 2, trans, "%u (%s)", trans, - match_strval(trans, transform_id_vals)); + val_to_str(trans, transform_id_vals, "Unknown")); tlv_len -= 2; newoffset += 2; } @@ -788,7 +788,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len trans = tvb_get_ntohs(tvb, newoffset); proto_tree_add_uint_format(t, hf_hip_tlv_nat_traversal_mode_id, tvb, newoffset, 2, trans, "%u (%s)", trans, - match_strval(trans, mode_id_vals)); + val_to_str(trans, mode_id_vals, "Unknown")); tlv_len -= 2; newoffset += 2; } @@ -1010,7 +1010,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len reg_type = tvb_get_guint8(tvb, newoffset); proto_tree_add_uint_format(t, hf_hip_tlv_reg_type, tvb, newoffset, 1, reg_type, "%u (%s)", reg_type, - match_strval(reg_type, reg_type_vals)); + val_to_str(reg_type, reg_type_vals, "Unknown")); /* one byte per registration type */ tlv_len--; newoffset++; @@ -1031,7 +1031,7 @@ dissect_hip_tlv(tvbuff_t *tvb, int offset, proto_item *ti, int type, int tlv_len n = tvb_get_guint8(tvb, offset+4); proto_tree_add_uint_format(t, hf_hip_tlv_sig_alg, tvb, newoffset, 1, n, "%u (%s)", n, - match_strval(n, sig_alg_vals)); + val_to_str(n, sig_alg_vals, "Unknown")); newoffset++; /* Signature */ proto_tree_add_item(t, hf_hip_tlv_sig, tvb, newoffset, tlv_len-1, |