aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/HI2Operations
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2018-12-05 13:41:11 +0100
committerAnders Broman <a.broman58@gmail.com>2018-12-05 13:38:55 +0000
commitbd8cfad8b83737e0cd19932a5ce56e6ec345887d (patch)
treecf1ce467821b5a638ac6c596be298c85b0ea7570 /epan/dissectors/asn1/HI2Operations
parent59e71df81cac81552b8b51780e15d087c26692d7 (diff)
Add dissection of HI3CCLinkData
Change-Id: I002c31972c4bcc231527eeaa2c6b21c3b1a9636a Reviewed-on: https://code.wireshark.org/review/30920 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/asn1/HI2Operations')
-rw-r--r--epan/dissectors/asn1/HI2Operations/CMakeLists.txt5
-rw-r--r--epan/dissectors/asn1/HI2Operations/HI2Operations.cnf66
-rw-r--r--epan/dissectors/asn1/HI2Operations/HI3CCLinkData.asn68
-rw-r--r--epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.c9
-rw-r--r--epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.h32
5 files changed, 177 insertions, 3 deletions
diff --git a/epan/dissectors/asn1/HI2Operations/CMakeLists.txt b/epan/dissectors/asn1/HI2Operations/CMakeLists.txt
index a18915c8ca..29e762d869 100644
--- a/epan/dissectors/asn1/HI2Operations/CMakeLists.txt
+++ b/epan/dissectors/asn1/HI2Operations/CMakeLists.txt
@@ -11,6 +11,7 @@ set( PROTOCOL_NAME HI2Operations )
set( ASN_FILE_LIST
HI2Operations_ver11.asn
+ HI3CCLinkData.asn
UmtsHI2Operations.asn
TS101909201.asn
PCESP.asn
@@ -20,6 +21,7 @@ set( ASN_FILE_LIST
set( EXTRA_DIST
${ASN_FILE_LIST}
packet-${PROTOCOL_NAME}-template.c
+ packet-${PROTOCOL_NAME}-template.h
${PROTOCOL_NAME}.cnf
)
@@ -30,7 +32,4 @@ set( SRC_FILES
set( A2W_FLAGS -b )
-set( EXTRA_CNF
-)
-
ASN2WRS()
diff --git a/epan/dissectors/asn1/HI2Operations/HI2Operations.cnf b/epan/dissectors/asn1/HI2Operations/HI2Operations.cnf
index e7ca5113d3..37d086f369 100644
--- a/epan/dissectors/asn1/HI2Operations/HI2Operations.cnf
+++ b/epan/dissectors/asn1/HI2Operations/HI2Operations.cnf
@@ -6,14 +6,17 @@ UmtsHI2Operations UmtsHI2
PCESP PCESP
TS101909201 TS101909201
EN301040 EN301040
+HI3CCLinkData hi3cclinkdata
#.MODULE_IMPORT
#.EXPORTS
+UUS1-Content_PDU
#.REGISTER
#.PDU
IRIsContent
+UUS1-Content
#.NO_EMIT
@@ -28,6 +31,69 @@ LIMODIFYconf
LISTATUSind
StatusType
+#.FN_HDR UUS1-Content
+
+/* Heuristic test to see if it's our content */
+ gint8 tmp_class;
+ gboolean tmp_pc;
+ gint32 tmp_tag;
+ int tmp_offset;
+ guint length = tvb_captured_length(tvb);
+ guint32 tmp_length;
+ gboolean tmp_ind;
+
+ /* Check for min length */
+ if (length < 6){
+ return 0;
+ }
+ /* We start with UUS1-Content ::= SEQUENCE */
+ tmp_offset = get_ber_identifier(tvb, offset, &tmp_class, &tmp_pc, &tmp_tag);
+ if(tmp_class != BER_CLASS_UNI){
+ return 0;
+ }
+ if(tmp_pc != 1){
+ return 0;
+ }
+ if(tmp_tag != BER_UNI_TAG_SEQUENCE){
+ return 0;
+ }
+ /* Get length just to move offset forward */
+ tmp_offset = get_ber_length(tvb, tmp_offset, &tmp_length, &tmp_ind);
+
+ /* Next 2 mandatorry elements
+ * lawfullInterceptionIdentifier [1] LawfulInterceptionIdentifier,
+ * communicationIdentifier [2] CommunicationIdentifier,
+ */
+ tmp_offset = get_ber_identifier(tvb, tmp_offset, &tmp_class, &tmp_pc, &tmp_tag);
+ if(tmp_class != BER_CLASS_CON){
+ return 0;
+ }
+ if(tmp_pc != 0){
+ return 0;
+ }
+ if(tmp_tag != 1){
+ return 0;
+ }
+
+#.FN_BODY Network-Element-Identifier/e164-Format VAL_PTR = &parameter_tvb
+ tvbuff_t *parameter_tvb=NULL;
+
+%(DEFAULT_BODY)s
+ if (!parameter_tvb)
+ return offset;
+
+ dissect_isup_calling_party_number_parameter(parameter_tvb, actx->pinfo, tree, NULL);
+
+#.FN_BODY UUS1-Content/bearer-capability VAL_PTR =&parameter_tvb
+ tvbuff_t *parameter_tvb;
+
+%(DEFAULT_BODY)s
+
+ if (!parameter_tvb)
+ return offset;
+
+ dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), tree);
+
#.TYPE_RENAME
#.FIELD_RENAME
diff --git a/epan/dissectors/asn1/HI2Operations/HI3CCLinkData.asn b/epan/dissectors/asn1/HI2Operations/HI3CCLinkData.asn
new file mode 100644
index 0000000000..ccd7a5cdc9
--- /dev/null
+++ b/epan/dissectors/asn1/HI2Operations/HI3CCLinkData.asn
@@ -0,0 +1,68 @@
+HI3CCLinkData
+{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) hi3(2) cclinkLI(4) version4(4)}
+
+DEFINITIONS IMPLICIT TAGS ::=
+
+BEGIN
+
+IMPORTS
+ -- from clause D.5
+ LawfulInterceptionIdentifier,
+ CommunicationIdentifier,
+ CC-Link-Identifier
+ FROM HI2Operations
+ {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) hi2(1) version8(8)};
+
+-- =============================
+-- Object Identifier Definitions
+-- =============================
+
+-- LawfulIntercept DomainId
+-- WS Allready in HI2... lawfulInterceptDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2)}
+
+-- hi3 Domain
+hi3CCLinkId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId hi3(2) ccLinkLI(4)}
+hi3CCLinkIdOperationId OBJECT IDENTIFIER ::= {hi3CCLinkId version4(4)}
+
+UUS1-Content ::= SEQUENCE
+{
+ domainID [0] OBJECT IDENTIFIER (hi3CCLinkIdOperationId) OPTIONAL,
+ -- Once using FTP delivery mechanism
+ lawfullInterceptionIdentifier [1] LawfulInterceptionIdentifier,
+ communicationIdentifier [2] CommunicationIdentifier,
+ cC-Link-Identifier [3] CC-Link-Identifier OPTIONAL,
+ direction-Indication [4] Direction-Indication,
+ bearer-capability [5] OCTET STRING (SIZE(1..12)) OPTIONAL,
+ -- transport the Bearer capability information element (value part)
+ -- Protocol: EN 300 403-1 [6]
+ service-Information [7] Service-Information OPTIONAL,
+ ...
+}
+
+-- ==================
+-- PARAMETERS FORMATS
+-- ==================
+
+Direction-Indication ::= ENUMERATED
+{
+ mono-mode(0),
+ cc-from-target(1),
+ cc-from-other-party(2),
+ ...,
+ direction-unknown(3)
+}
+
+Service-Information ::= SET
+{
+ high-layer-capability [0] OCTET STRING (SIZE(1)) OPTIONAL,
+ -- HLC (octet 4 only)
+ -- Protocol: EN 300 403-1 [6]
+ tMR [1] OCTET STRING (SIZE(1)) OPTIONAL,
+ -- Transmission Medium Requirement
+ -- Protocol: ISUP EN 300 356 [5]
+ bearerServiceCode [2] OCTET STRING (SIZE(1)) OPTIONAL,
+ teleServiceCode [3] OCTET STRING (SIZE(1)) OPTIONAL
+ -- from MAP, TS GSM 09.02 [32], clause 14.7.9 and clause 14.7.10
+}
+
+END -- end of HI3CCLinkData
diff --git a/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.c b/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.c
index 705d42ddad..f2b0869433 100644
--- a/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.c
+++ b/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.c
@@ -17,6 +17,9 @@
#include <epan/asn1.h>
#include "packet-ber.h"
+#include "packet-isup.h"
+#include "packet-q931.h"
+#include "packet-HI2Operations.h"
#define PNAME "HI2Operations"
#define PSNAME "HI2OPERATIONS"
@@ -56,10 +59,16 @@ void proto_register_HI2Operations(void) {
proto_register_subtree_array(ett, array_length(ett));
register_dissector("HI2Operations", dissect_IRIsContent_PDU, proto_HI2Operations);
+
+
}
/*--- proto_reg_handoff_HI2Operations -------------------------------------------*/
void proto_reg_handoff_HI2Operations(void) {
+
+ heur_dissector_add("q931_user", dissect_HI2Operations_UUS1_Content_PDU, "HI3CCLinkData", "hi3cclinkdata",
+ proto_HI2Operations, HEURISTIC_ENABLE);
+
}
diff --git a/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.h b/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.h
new file mode 100644
index 0000000000..29c5d96509
--- /dev/null
+++ b/epan/dissectors/asn1/HI2Operations/packet-HI2Operations-template.h
@@ -0,0 +1,32 @@
+/* packet-HI2Operations-template.h
+ *
+ * Routines for HI2 (ETSI TS 101 671 V3.5.1 (2009-11))
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+
+#ifndef PACKET_HI2OPERATIONS_H
+#define PACKET_HI2OPERATIONS_H
+
+#include "packet-HI2Operations-exp.h"
+
+#endif /* if PACKET_HI2OPERATIONS_H */
+
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */