use large positve values for illegal DVB-SI string encodings
interpret encoding fields as UINT32 so that the displayed value matches the actual bytes in the packet svn path=/trunk/; revision=53927
This commit is contained in:
parent
67912bf798
commit
20c7414c71
|
@ -34,10 +34,6 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
typedef enum {
|
||||
DVB_ENCODING_INVALID = -3, /* length invalid */
|
||||
DVB_ENCODING_RESERVED = -2, /* reserved by spec */
|
||||
|
||||
DVB_ENCODING_UNKNOWN = -1, /* not defined by spec */
|
||||
|
||||
DVB_ENCODING_LATIN = 0,
|
||||
DVB_ENCODING_ISO_8859_5,
|
||||
|
@ -70,6 +66,10 @@ typedef enum {
|
|||
DVB_ENCODING_EXT_ISO_8859_13 = DVB_ENCODING_EXT_BASE | 13,
|
||||
DVB_ENCODING_EXT_ISO_8859_14 = DVB_ENCODING_EXT_BASE | 14,
|
||||
DVB_ENCODING_EXT_ISO_8859_15 = DVB_ENCODING_EXT_BASE | 15,
|
||||
|
||||
DVB_ENCODING_INVALID = G_MAXUINT32-3, /* length invalid */
|
||||
DVB_ENCODING_RESERVED = G_MAXUINT32-2, /* reserved by spec */
|
||||
DVB_ENCODING_UNKNOWN = G_MAXUINT32-1, /* not defined by spec */
|
||||
} dvb_encoding_e;
|
||||
|
||||
extern const value_string dvb_string_encoding_vals[];
|
||||
|
|
|
@ -2223,7 +2223,8 @@ dissect_si_string(tvbuff_t *tvb, gint offset, gint str_len,
|
|||
return;
|
||||
|
||||
enc_len = dvb_analyze_string_charset(tvb, offset, str_len, &encoding);
|
||||
proto_tree_add_int(tree, hf_dvbci_mmi_char_tbl, tvb, offset, enc_len, encoding);
|
||||
proto_tree_add_uint(tree, hf_dvbci_mmi_char_tbl,
|
||||
tvb, offset, enc_len, encoding);
|
||||
|
||||
offset += enc_len;
|
||||
str_len -= enc_len;
|
||||
|
@ -2898,7 +2899,7 @@ dissect_dvbci_payload_mmi(guint32 tag, gint len_field,
|
|||
&ei_dvbci_invalid_char_tbl, tvb, offset, msg_len);
|
||||
break;
|
||||
}
|
||||
proto_tree_add_int(tree, hf_dvbci_mmi_char_tbl,
|
||||
proto_tree_add_uint(tree, hf_dvbci_mmi_char_tbl,
|
||||
tvb, offset, enc_len, encoding);
|
||||
offset += enc_len;
|
||||
}
|
||||
|
@ -3719,7 +3720,7 @@ dissect_dvbci_payload_opp(guint32 tag, gint len_field _U_,
|
|||
tvb_reported_length_remaining(tvb, offset));
|
||||
break;
|
||||
}
|
||||
proto_tree_add_int(tree, hf_dvbci_opp_char_tbl,
|
||||
proto_tree_add_uint(tree, hf_dvbci_opp_char_tbl,
|
||||
tvb, offset, enc_len, encoding);
|
||||
offset += enc_len;
|
||||
|
||||
|
@ -5282,7 +5283,7 @@ proto_register_dvbci(void)
|
|||
},
|
||||
{ &hf_dvbci_mmi_char_tbl,
|
||||
{ "Character table", "dvb-ci.mmi.char_tbl",
|
||||
FT_INT32, BASE_DEC, VALS(dvb_string_encoding_vals), 0, NULL, HFILL}
|
||||
FT_UINT32, BASE_HEX, VALS(dvb_string_encoding_vals), 0, NULL, HFILL}
|
||||
},
|
||||
{ &hf_dvbci_blind_ans,
|
||||
{ "Blind answer flag", "dvb-ci.mmi.blind_ans",
|
||||
|
@ -5653,7 +5654,7 @@ proto_register_dvbci(void)
|
|||
},
|
||||
{ &hf_dvbci_opp_char_tbl,
|
||||
{ "Character table", "dvb-ci.opp.char_tbl",
|
||||
FT_INT32, BASE_DEC, VALS(dvb_string_encoding_vals), 0, NULL, HFILL}
|
||||
FT_UINT32, BASE_HEX, VALS(dvb_string_encoding_vals), 0, NULL, HFILL}
|
||||
},
|
||||
{ &hf_dvbci_sdt_rst_trusted,
|
||||
{ "SDT running status trusted", "dvb-ci.opp.sdt_rst_trusted",
|
||||
|
|
|
@ -1212,7 +1212,7 @@ proto_mpeg_descriptor_dissect_short_event(tvbuff_t *tvb, guint offset, proto_tre
|
|||
|
||||
if (name_len>0) {
|
||||
enc_len = dvb_analyze_string_charset(tvb, offset, name_len, &encoding);
|
||||
proto_tree_add_int(tree, hf_mpeg_descr_short_event_name_encoding, tvb, offset, enc_len, encoding);
|
||||
proto_tree_add_uint(tree, hf_mpeg_descr_short_event_name_encoding, tvb, offset, enc_len, encoding);
|
||||
proto_tree_add_item(tree, hf_mpeg_descr_short_event_name,
|
||||
tvb, offset+enc_len, name_len-enc_len, dvb_enc_to_item_enc(encoding));
|
||||
}
|
||||
|
@ -3515,7 +3515,7 @@ proto_register_mpeg_descriptor(void)
|
|||
|
||||
{ &hf_mpeg_descr_short_event_name_encoding, {
|
||||
"Event Name Encoding", "mpeg_descr.short_evt.name_enc",
|
||||
FT_INT32, BASE_DEC, VALS(dvb_string_encoding_vals), 0, NULL, HFILL
|
||||
FT_UINT32, BASE_HEX, VALS(dvb_string_encoding_vals), 0, NULL, HFILL
|
||||
} },
|
||||
|
||||
{ &hf_mpeg_descr_short_event_name, {
|
||||
|
|
Loading…
Reference in New Issue