diff options
author | Michael Mann <mmann78@netscape.net> | 2014-08-08 09:19:29 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-08-09 01:57:08 +0000 |
commit | cd02af56a1e39c66b44fd7957aff3b7b77a59e9d (patch) | |
tree | 4a3e859751bb73268115a607e9dffcec008bb411 /epan/dissectors/packet-atn-ulcs.c | |
parent | bb15274a4a82fcab1c06935fa1e249f436420a02 (diff) |
Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions.
Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree.
Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141
Reviewed-on: https://code.wireshark.org/review/3500
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-atn-ulcs.c')
-rw-r--r-- | epan/dissectors/packet-atn-ulcs.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/epan/dissectors/packet-atn-ulcs.c b/epan/dissectors/packet-atn-ulcs.c index bc3334e448..2c6ad90512 100644 --- a/epan/dissectors/packet-atn-ulcs.c +++ b/epan/dissectors/packet-atn-ulcs.c @@ -1690,6 +1690,7 @@ const value_string atn_ses_type[] = #define ATN_PRES_PROTO "ICAO Doc9705 ULCS Presentation (ISO 8822/8823-1:1994)" static int hf_atn_pres_err = -1; +static int hf_atn_pres_pdu_type = -1; static gint ett_atn_pres = -1; #define ATN_SES_PRES_MASK 0xf803 @@ -2073,13 +2074,11 @@ dissect_atn_ulcs( /* need session context to identify PPDU type */ /* note: */ - /* it is *unfeasible* to use proto_tree_add_item here: */ - /* presentation type is always the same constant but its type */ - /* is implicitly determined by preceding session context */ - proto_tree_add_text(atn_ulcs_tree, + proto_tree_add_uint_format(atn_ulcs_tree, hf_atn_pres_pdu_type, tvb, offset, 1, + value_ses_pres, "%s (0x%02x)", val_to_str( value_ses_pres & ATN_SES_PRES_MASK , atn_pres_vals, "?"), value_pres); @@ -2482,7 +2481,7 @@ void proto_register_atn_ulcs (void) NULL, HFILL }}, /*--- End of included file: packet-atn-ulcs-hfarr.c ---*/ -#line 796 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c" +#line 795 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c" {&hf_atn_ses_type, { "SPDU Type", "atn-ulcs.ses.type", @@ -2529,6 +2528,14 @@ void proto_register_atn_ulcs (void) PRES_CPR_ER_MASK, NULL, HFILL}}, + { &hf_atn_pres_pdu_type, + { "PDU type", "atn-ulcs.pres.pdu_type", + FT_UINT8, + BASE_HEX, + NULL, + ATN_SES_PRES_MASK, + NULL, + HFILL}}, }; static gint *ett[] = { @@ -2562,7 +2569,7 @@ void proto_register_atn_ulcs (void) &ett_atn_ulcs_AttributeTypeAndValue, /*--- End of included file: packet-atn-ulcs-ettarr.c ---*/ -#line 846 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c" +#line 853 "../../asn1/atn-ulcs/packet-atn-ulcs-template.c" &ett_atn_ses, &ett_atn_pres, &ett_atn_acse, |