summaryrefslogtreecommitdiff
path: root/asn1/camel
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-07-23 23:02:54 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-07-23 23:02:54 +0000
commitba2549b83a896d3705b9380fdbe4a918c3aaf2b7 (patch)
tree253df4e53d408eb27c1384632197617a4845124c /asn1/camel
parent43966696b96e392d41ad1950e6d8840d7dfde06d (diff)
downloadwireshark-ba2549b83a896d3705b9380fdbe4a918c3aaf2b7.tar.gz
Fix bug
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1699 Bad decoding of Camel PromptAndCollectUserInfo By fixing up the generation of HF vars for Arg etc Add an OID name to INAP. svn path=/trunk/; revision=22391
Diffstat (limited to 'asn1/camel')
-rw-r--r--asn1/camel/Makefile.nmake1
-rw-r--r--asn1/camel/camel.cnf73
-rw-r--r--asn1/camel/packet-camel-template.c4
3 files changed, 31 insertions, 47 deletions
diff --git a/asn1/camel/Makefile.nmake b/asn1/camel/Makefile.nmake
index 62930de049..a79363de41 100644
--- a/asn1/camel/Makefile.nmake
+++ b/asn1/camel/Makefile.nmake
@@ -8,6 +8,7 @@ UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
PROTOCOL_NAME=camel
DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+COTRACTS_ASN= ../tcap/TC-Notation-Extensions.asn CAP-gsmSCF-gsmSRF-pkgs-contracts-acs.asn CAP-gsmSSF-gsmSCF-pkgs-contracts-acs.asn CAP-gprsSSF-gsmSCF-pkgs-contracts-acs.asn CAP-smsSSF-gsmSCF-pkgs-contracts-acs.asn
ROS_ASN= ../ros/Remote-Operations-Information-Objects.asn ../ros/Remote-Operations-Generic-ROS-PDUs.asn
ASN_FILE_LIST=TCAPMessages.asn CAP-object-identifiers.asn CAP-classes.asn CAP-datatypes.asn CAP-errorcodes.asn CAP-errortypes.asn CAP-operationcodes.asn CAP-GPRS-ReferenceNumber.asn CAP-gsmSCF-gsmSRF-ops-args.asn CAP-gsmSSF-gsmSCF-ops-args.asn CAP-gprsSSF-gsmSCF-ops-args.asn CAP-SMS-ops-args.asn CAP-U-ABORT-Data.asn $(ROS_ASN)
diff --git a/asn1/camel/camel.cnf b/asn1/camel/camel.cnf
index 1de4720d79..0f1c2d2fe2 100644
--- a/asn1/camel/camel.cnf
+++ b/asn1/camel/camel.cnf
@@ -1,5 +1,6 @@
# camel.cnf
# camel conformation file
+# Anders Broman 2007
# $Id$
#.INCLUDE ../gsmmap/gsm_map-exp.cnf
@@ -9,18 +10,35 @@
CS1-DataTypes inap
CS2-datatypes inap
-#.PDU
+#.ASSIGNED_OBJECT_IDENTIFIER classes
+#.ASSIGNED_OBJECT_IDENTIFIER ros-InformationObjects
+#.ASSIGNED_OBJECT_IDENTIFIER tc-Messages
+#.ASSIGNED_OBJECT_IDENTIFIER tc-NotationExtensions
+#.ASSIGNED_OBJECT_IDENTIFIER gprsSSF-gsmSCF-Operations
+#.ASSIGNED_OBJECT_IDENTIFIER gsmSCF-gsmSRF-Operations
+#.ASSIGNED_OBJECT_IDENTIFIER gsmSSF-gsmSCF-Operations
+#.ASSIGNED_OBJECT_IDENTIFIER sms-Operations
+#.ASSIGNED_OBJECT_IDENTIFIER gsmSSF-gsmSCF-Protocol
+#.ASSIGNED_OBJECT_IDENTIFIER gsmSCF-gsmSRF-Protocol
#.OMIT_ASSIGNMENT Remote-Operations-Information-Objects
Bind
Unbind
#.END
-
#.OMIT_ASSIGNMENT
# Removed as they are giving 'defined but not used' warnings currently.
RejectProblem
TariffSwitchInterval
Priority
+#.END
+
+#.PDU_NEW
+# This list is "created" by TABLEx (manual copy paste from the created file)
+ERROR.&ParameterType
+OPERATION.&ArgumentType
+OPERATION.&ResultType
+#.END
+
#.REGISTER
CAP-GPRS-ReferenceNumber B "0.4.0.0.1.1.5.2" "id-CAP-GPRS-ReferenceNumber"
@@ -62,7 +80,9 @@ CAMEL-AChBillingChargingCharacteristics/timeDurationCharging/tariffSwitchInterva
ApplyChargingGPRSArg/tariffSwitchInterval applyChargingGPRS-tariffSwitchInterval
TimeIfTariffSwitch/tariffSwitchInterval timeIfTariffSwitch-tariffSwitchInterval
-
+# This table creates the value_sting to name Camel operation codes and errors
+# in file packet-camel-table.c which is included in the template file
+#
#.TABLE_HDR
/* CAMEL OPERATIONS */
const value_string camel_opr_code_strings[] = {
@@ -83,6 +103,9 @@ static const value_string camel_err_code_string_vals[] = {
};
#.END
+# This table creates the switch() to branch on Camel operation codes and errors
+# in file packet-camel-table2.c which is included in the template file
+#
#.TABLE2_HDR
static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
proto_item *cause;
@@ -90,7 +113,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
switch(opcode){
#.TABLE2_BODY OPERATION.&ArgumentType
case %(&operationCode)s: /* %(_ident)s */
- offset= %(_argument_fn)s(FALSE, tvb, offset, actx, tree, hf_camel_%(_ident)s);
+ offset= %(_argument_pdu)s(tvb, actx->pinfo , tree);
break;
#.TABLE2_FTR
cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
@@ -108,7 +131,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
switch(opcode){
#.TABLE2_BODY OPERATION.&ResultType
case %(&operationCode)s: /* %(_ident)s */
- offset= %(_result_fn)s(FALSE, tvb, offset, actx, tree, hf_camel_%(_ident)s);
+ offset= %(_result_pdu)s(tvb, actx->pinfo , tree);
break;
#.TABLE2_FTR
default:
@@ -126,7 +149,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
switch(errorCode) {
#.TABLE2_BODY ERROR.&ParameterType
case %(&errorCode)s: /* %(_ident)s */
- %(_parameter_fn)s(FALSE, tvb, offset, actx, tree, hf_camel_%(_ident)s);
+ %(_parameter_pdu)s(tvb, actx->pinfo , tree);
break;
#.TABLE2_FTR
default:
@@ -138,44 +161,6 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
}
#.END
-#.TABLE3_HDR
-/* CAMEL OPERATIONS hf filelds */
-#.TABLE3_BODY OPERATION
- { &hf_camel_%(_ident)s,
- { "%(_ident)s", "camel.%(_ident)s",
- FT_NONE, BASE_NONE, NULL, 0,
- "camel.%(_ident)s", HFILL }},
-
-#.TABLE3_FTR
-/* END CAMEL OPERATIONS hf filelds */
-#.END
-#.TABLE3_HDR
-/* CAMEL ERRORS hf filelds */
-#.TABLE3_BODY ERROR.&ParameterType
- { &hf_camel_%(_ident)s,
- { "%(_ident)s", "camel.%(_ident)s",
- FT_NONE, BASE_NONE, NULL, 0,
- "camel.%(_ident)s", HFILL }},
-#.TABLE3_FTR
-/* END CAMEL ERRORS hf filelds */
-#.END
-
-#.TABLE4_HDR
-/* CAMEL OPERATIONS hf filelds */
-#.TABLE4_BODY OPERATION
-int hf_camel_%(_ident)s = -1;
-#.TABLE4_FTR
-/* END CAMEL OPERATIONS hf filelds */
-#.END
-
-#.TABLE4_HDR
-/* CAMEL ERRORS hf filelds */
-#.TABLE4_BODY ERROR.&ParameterType
-int hf_camel_%(_ident)s = -1;
-#.TABLE4_FTR
-/* END CAMEL ERRORS hf filelds */
-#.END
-
# ROS stuff here XXX change when TCAP is redone.
#.FN_BODY Code/local VAL_PTR = &opcode
diff --git a/asn1/camel/packet-camel-template.c b/asn1/camel/packet-camel-template.c
index 4344909f02..0b31466db1 100644
--- a/asn1/camel/packet-camel-template.c
+++ b/asn1/camel/packet-camel-template.c
@@ -100,8 +100,6 @@ int hf_camelsrt_DeltaTime35=-1;
int hf_camelsrt_DeltaTime80=-1;
int hf_camel_CAMEL_AChBillingChargingCharacteristics = -1;
-#include "packet-camel-table4.c"
-
#include "packet-camel-hf.c"
static struct camelsrt_info_t * gp_camelsrt_info;
@@ -403,6 +401,7 @@ void proto_reg_handoff_camel(void) {
register_ber_oid_dissector_handle("0.4.0.0.1.0.52.1",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network|umts-Network(1) applicationContext(0) cap-gsmSRF-to-gsmscf(52) version2(1)" );
register_ber_oid_dissector_handle("0.4.0.0.1.21.3.50",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) cAP3OE(21) ac(3) id-ac-CAP-gprsSSF-gsmSCF-AC(50)" );
register_ber_oid_dissector_handle("0.4.0.0.1.21.3.61",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) cAP3OE(21) ac(3) id-ac-cap3-sms-AC(61)" );
+
#include "packet-camel-dis-tab.c"
} else {
range_foreach(ssn_range, range_delete_callback);
@@ -545,7 +544,6 @@ void proto_register_camel(void) {
#ifdef REMOVED
#endif
-#include "packet-camel-table3.c"
#include "packet-camel-hfarr.c"
};