aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/rtse/rtse.cnf
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-09-04 16:22:12 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-09-04 16:22:12 +0000
commitd9e1a9c0bbf93cd8573f970ef151c65d41f34629 (patch)
treebd96a6585605579987c8081a983df86d196a88d4 /asn1/rtse/rtse.cnf
parentbc4b6481b473f64f20cb5d1c013b79eced4ddef5 (diff)
From Graeme Lunt
I attach my RTSE dissector (in tar file) which requires the included ROS dissector, as well as a patch to the latest pres.{cnf,asn}. The ROS dissector uses a new field in the SESSION_DATA_STRUCTURE to pass the ROS operation to the sub-dissector, though this is also set by other dissectors (RTSE uses it in X.410 mode). Note that X.400 P1 in X.410 mode doesn't use ROS, so it is useful not to explicitly include ROS in my X411 dissector. However, the inclusion of a ROS dissector won't effect any dissectors that currently implement their own ROS. I also include dissectors for: X.411 (P1) X.400 OSI Message Transfer Service X.420 (P22) X.400 OSI Information Object STANAG 4406 (P772) STANAG 4406 Military Message Extensions (to P22) These rely on the RTSE and ROS dissectors. svn path=/trunk/; revision=15679
Diffstat (limited to 'asn1/rtse/rtse.cnf')
-rw-r--r--asn1/rtse/rtse.cnf111
1 files changed, 111 insertions, 0 deletions
diff --git a/asn1/rtse/rtse.cnf b/asn1/rtse/rtse.cnf
new file mode 100644
index 0000000000..e7885d4df1
--- /dev/null
+++ b/asn1/rtse/rtse.cnf
@@ -0,0 +1,111 @@
+#.EXPORTS
+RTORQapdu
+RTOACapdu
+RTORJapdu
+RTABapdu
+
+#.FN_BODY RTORJapdu/userDataRJ
+/*XXX not implemented yet */
+
+#.FN_BODY RTABapdu/userdataAB
+/*XXX not implemented yet */
+
+#.FN_BODY RTORQapdu
+
+ if(session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data))
+ session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
+
+ offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
+ RTORQapdu_set, hf_index, ett_rtse_RTORQapdu);
+
+
+#.FN_BODY RTOACapdu
+
+ if(session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data))
+ session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
+
+ offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
+ RTOACapdu_set, hf_index, ett_rtse_RTOACapdu);
+
+
+#.FN_BODY T_open
+
+ char *oid = NULL;
+
+ switch(app_proto) {
+ case 1: /* mts-transfer-protocol-1984 */
+ oid = "applicationProtocol.1";
+ break;
+ case 12: /* mts-transfer-protocol */
+ oid = "applicationProtocol.12";
+ break;
+ default:
+ if(session && session->pres_ctx_id)
+ oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id);
+ break;
+ }
+
+ if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
+ oid = "applicationProtocol.12";
+
+ if(oid) {
+
+ offset = call_rtse_oid_callback(oid, tvb, offset, pinfo, top_tree ? top_tree : tree);
+ }
+
+ /* else XXX: need to flag we can't find the presentation context */
+
+#.FN_BODY RTTRapdu
+ tvbuff_t *next_tvb = NULL;
+
+ offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hf_index, &next_tvb);
+
+ if(next_tvb) {
+
+ /* XXX: we should check is this is an EXTERNAL first */
+
+ /* ROS won't do this for us */
+ if(session)
+ session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
+
+ offset = dissect_rtse_EXTERNAL(FALSE, next_tvb, 0, pinfo, tree, -1);
+
+ }
+
+#.FN_BODY EXTERNAL
+ gint8 class;
+ gboolean pc, ind_field;
+ gint32 tag;
+ guint32 len1;
+
+ /* XXX asn2eth can not yet handle tagged assignment so for the
+ * time being just remove this tag manually inside the EXTERNAL
+ * dissector.
+ */
+ offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
+ offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+ EXTERNAL_sequence, hf_index, ett_rtse_EXTERNAL);
+
+#.FN_BODY EXTERNAL/indirect-reference
+ char *oid;
+
+ offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset,
+ hf_rtse_indirect_reference,
+ &indir_ref);
+
+ /* look up the indirect reference */
+ if(oid = find_oid_by_pres_ctx_id(pinfo, indir_ref)) {
+ strcpy(object_identifier_id, oid);
+ }
+
+
+#.FN_BODY EXTERNAL/encoding/single-ASN1-type
+ offset=call_rtse_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
+
+
+#.FN_BODY T_applicationProtocol
+
+ offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index, &app_proto);
+
+#.END