From 2f450cf7c9d2fc927a698da991d07975454d6715 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Fri, 22 Mar 2013 17:19:46 +0000 Subject: Add some of the global codes as asn2wrs handle them now. svn path=/trunk/; revision=48478 --- asn1/isdn-sup/Makefile.common | 3 ++- asn1/isdn-sup/isdn-sup.cnf | 8 ++++++-- asn1/isdn-sup/packet-isdn-sup-template.c | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) (limited to 'asn1/isdn-sup') diff --git a/asn1/isdn-sup/Makefile.common b/asn1/isdn-sup/Makefile.common index 81781cb01b..ca766428d0 100644 --- a/asn1/isdn-sup/Makefile.common +++ b/asn1/isdn-sup/Makefile.common @@ -36,7 +36,8 @@ ASN_FILE_LIST = \ Conference-Add-On-Operations.asn \ Diversion-Operations.asn \ MCID-Operations.asn \ - User-To-User-Signalling-Operations.asn + User-To-User-Signalling-Operations.asn \ + Freephone-Operations.asn # The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn # files do not exist for all protocols: Please add/remove as required. diff --git a/asn1/isdn-sup/isdn-sup.cnf b/asn1/isdn-sup/isdn-sup.cnf index 2cf09e0c15..9ca3cf2e45 100644 --- a/asn1/isdn-sup/isdn-sup.cnf +++ b/asn1/isdn-sup/isdn-sup.cnf @@ -38,11 +38,15 @@ NumberScreened #.FIELD_RENAME #.END -#.TABLE10_BODY OPERATION +#.TABLE10_BODY OPERATION.&operationCode.local { %(&operationCode)3s, "%(_name)s" }, #.END -#.TABLE11_BODY OPERATION +#.TABLE11_BODY OPERATION.&operationCode.local + /* %(_name)-24s */ { %(&operationCode)3s, %(_argument_pdu)s, %(_result_pdu)s }, +#.END + +#.TABLE31_BODY OPERATION.&operationCode.global /* %(_name)-24s */ { %(&operationCode)3s, %(_argument_pdu)s, %(_result_pdu)s }, #.END diff --git a/asn1/isdn-sup/packet-isdn-sup-template.c b/asn1/isdn-sup/packet-isdn-sup-template.c index 6971c5f029..a54e600895 100644 --- a/asn1/isdn-sup/packet-isdn-sup-template.c +++ b/asn1/isdn-sup/packet-isdn-sup-template.c @@ -57,6 +57,12 @@ typedef struct _isdn_sup_op_t { new_dissector_t res_pdu; } isdn_sup_op_t; +typedef struct _isdn_global_sup_op_t { + const char* oid; + new_dissector_t arg_pdu; + new_dissector_t res_pdu; +} isdn_sup_global_op_t; + typedef struct isdn_sup_err_t { gint32 errcode; @@ -96,6 +102,11 @@ static const isdn_sup_op_t isdn_sup_op_tab[] = { }; +static const isdn_sup_global_op_t isdn_sup_global_op_tab[] = { + +#include "packet-isdn-sup-table31.c" +}; + static const isdn_sup_err_t isdn_sup_err_tab[] = { #include "packet-isdn-sup-table21.c" }; @@ -285,6 +296,13 @@ void proto_reg_handoff_isdn_sup(void) { dissector_add_uint("q932.ros.etsi.local.res", isdn_sup_op_tab[i].opcode, isdn_sup_res_handle); } + for (i=0; i<(int)array_length(isdn_sup_global_op_tab); i++) { + if(isdn_sup_global_op_tab->arg_pdu) + dissector_add_string("q932.ros.global.arg", isdn_sup_global_op_tab[i].oid, new_create_dissector_handle(isdn_sup_global_op_tab[i].arg_pdu, proto_isdn_sup)); + if(isdn_sup_global_op_tab->res_pdu) + dissector_add_string("q932.ros.global.res", isdn_sup_global_op_tab[i].oid, new_create_dissector_handle(isdn_sup_global_op_tab[i].res_pdu, proto_isdn_sup)); + } + isdn_sup_err_handle = new_create_dissector_handle(dissect_isdn_sup_err, proto_isdn_sup); for (i=0; i<(int)array_length(isdn_sup_err_tab); i++) { -- cgit v1.2.1