aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/t125
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-11-15 10:38:43 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-11-15 10:38:43 +0000
commitcc173164a2cdff965286a78e58d2d84b8e45f3bb (patch)
tree38701444cff0f8aac2dc415783c730bd590bbc43 /asn1/t125
parentab871e3551645d7438a54b31d130008b70a81a7b (diff)
only dissect it as t125 if it looks like t125
dissect_ber_choice() returns the index of the choice taken not the tag value svn path=/trunk/; revision=23460
Diffstat (limited to 'asn1/t125')
-rw-r--r--asn1/t125/packet-t125-template.c18
-rw-r--r--asn1/t125/t125.cnf18
2 files changed, 19 insertions, 17 deletions
diff --git a/asn1/t125/packet-t125-template.c b/asn1/t125/packet-t125-template.c
index 04106c447d..b28e8890ee 100644
--- a/asn1/t125/packet-t125-template.c
+++ b/asn1/t125/packet-t125-template.c
@@ -22,14 +22,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * To quote the author of the previous H245 dissector:
- * "This is a complete replacement of the previous limitied dissector
- * that Ronnie was crazy enough to write by hand. It was a lot of time
- * to hack it by hand, but it is incomplete and buggy and it is good when
- * it will go away."
- * Ronnie did a great job and all the VoIP users had made good use of it!
- * Credit to Tomas Kukosa for developing the asn2wrs compiler.
- *
*/
#ifdef HAVE_CONFIG_H
@@ -68,6 +60,9 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
proto_item *item = NULL;
proto_tree *tree = NULL;
+ gint8 class;
+ gboolean pc;
+ gint32 tag;
if (check_col(pinfo->cinfo, COL_PROTOCOL)){
col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.125");
@@ -79,8 +74,13 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_length(tvb), FALSE);
tree = proto_item_add_subtree(item, ett_t125);
+ get_ber_identifier(tvb, 0, &class, &pc, &tag);
- dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree);
+ if ( (class==BER_CLASS_APP) && (tag>=101) && (tag<=104) ){
+ dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree);
+ } else {
+ proto_tree_add_text(tree, tvb, 0, -1, "T.125 payload");
+ }
return tvb_length(tvb);
}
diff --git a/asn1/t125/t125.cnf b/asn1/t125/t125.cnf
index 1adccdeff7..978779ea09 100644
--- a/asn1/t125/t125.cnf
+++ b/asn1/t125/t125.cnf
@@ -19,22 +19,24 @@ DomainMCSPDU
#----------------------------------------------------------------------------------------
#.FN_BODY ConnectMCSPDU VAL_PTR = &connectmcs_value
- guint32 connectmcs_value;
+ gint connectmcs_value;
%(DEFAULT_BODY)s
- if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
- col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "MCS: %%s ",
- val_to_str(connectmcs_value, t125_ConnectMCSPDU_vals, "<unknown>"));
+ if( (connectmcs_value!=-1) && t125_ConnectMCSPDU_vals[connectmcs_value].strptr ){
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
+ col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "MCS: %%s ", t125_ConnectMCSPDU_vals[connectmcs_value].strptr);
+ }
}
#.END
#.FN_BODY DomainMCSPDU VAL_PTR = &domainmcs_value
- guint32 domainmcs_value;
+ gint domainmcs_value;
%(DEFAULT_BODY)s
- if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
- col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "MCS: %%s ",
- val_to_str(domainmcs_value, t125_DomainMCSPDU_vals, "<unknown>"));
+ if( (domainmcs_value!=-1) && t125_DomainMCSPDU_vals[domainmcs_value].strptr ){
+ if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){
+ col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "MCS: %%s ", t125_DomainMCSPDU_vals[domainmcs_value].strptr);
+ }
}
#.END