From 7fe5422c4b4cd58dd7ffeebd984e7668cf61ab5d Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 3 Jun 2013 03:42:36 +0000 Subject: Convert ASN.1 dissectors to use filterable expert info. NOTE: Kerberos ASN.1 template was updated, but not generated to source. svn path=/trunk/; revision=49707 --- asn1/rrc/packet-rrc-template.c | 9 +++++++++ asn1/rrc/rrc.cnf | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'asn1/rrc') diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c index 03e78a8c8e..8018f68463 100644 --- a/asn1/rrc/packet-rrc-template.c +++ b/asn1/rrc/packet-rrc-template.c @@ -111,6 +111,8 @@ static int ett_rrc = -1; static gint ett_rrc_eutraFeatureGroupIndicators = -1; static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1; +static expert_field ei_rrc_no_hrnti = EI_INIT; + /* Global variables */ static proto_tree *top_tree; @@ -292,12 +294,19 @@ void proto_register_rrc(void) { &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, }; + static ei_register_info ei[] = { + { &ei_rrc_no_hrnti, { "rrc.no_hrnti", PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI", EXPFILL }}, + }; + + expert_module_t* expert_rrc; /* Register protocol */ proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Register fields and subtrees */ proto_register_field_array(proto_rrc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_rrc = expert_register_protocol(proto_rrc); + expert_register_field_array(expert_rrc, ei, array_length(ei)); register_dissector("rrc", dissect_rrc, proto_rrc); diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf index f27bc426c2..14737d51ca 100644 --- a/asn1/rrc/rrc.cnf +++ b/asn1/rrc/rrc.cnf @@ -720,7 +720,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE if(num_chans_per_flow[flowd] > 1 ){ rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){ - expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI"); + expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti); } else{ /*If it doesnt exists, insert it*/ @@ -756,7 +756,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE if(num_chans_per_flow[flowd] > 1 ){ rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){ - expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI"); + expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti); } else{ /*If it doesnt exists, insert it*/ -- cgit v1.2.1