aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/lcsap
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1/lcsap')
-rw-r--r--epan/dissectors/asn1/lcsap/CMakeLists.txt61
-rw-r--r--epan/dissectors/asn1/lcsap/LCS-AP-CommonDataTypes.asn30
-rw-r--r--epan/dissectors/asn1/lcsap/LCS-AP-Constants.asn84
-rw-r--r--epan/dissectors/asn1/lcsap/LCS-AP-Containers.asn116
-rw-r--r--epan/dissectors/asn1/lcsap/LCS-AP-IEs.asn517
-rw-r--r--epan/dissectors/asn1/lcsap/LCS-AP-PDU-Contents.asn257
-rw-r--r--epan/dissectors/asn1/lcsap/LCS-AP-PDU-Descriptions.asn167
-rw-r--r--epan/dissectors/asn1/lcsap/Makefile.am23
-rw-r--r--epan/dissectors/asn1/lcsap/Makefile.common56
-rw-r--r--epan/dissectors/asn1/lcsap/Makefile.nmake26
-rw-r--r--epan/dissectors/asn1/lcsap/lcsap.cnf324
-rw-r--r--epan/dissectors/asn1/lcsap/packet-lcsap-template.c347
-rw-r--r--epan/dissectors/asn1/lcsap/packet-lcsap-template.h32
13 files changed, 2040 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/lcsap/CMakeLists.txt b/epan/dissectors/asn1/lcsap/CMakeLists.txt
new file mode 100644
index 0000000000..0a18a607a1
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/CMakeLists.txt
@@ -0,0 +1,61 @@
+# CMakeLists.txt
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+set( PROTOCOL_NAME lcsap )
+
+set( PROTO_OPT )
+
+set( EXPORT_FILES
+ ${PROTOCOL_NAME}-exp.cnf
+)
+
+set( EXT_ASN_FILE_LIST
+)
+
+set( ASN_FILE_LIST
+ LCS-AP-CommonDataTypes.asn
+ LCS-AP-Constants.asn
+ LCS-AP-Containers.asn
+ LCS-AP-IEs.asn
+ LCS-AP-PDU-Contents.asn
+ LCS-AP-PDU-Descriptions.asn
+)
+
+set( EXTRA_DIST
+ ${ASN_FILE_LIST}
+ packet-${PROTOCOL_NAME}-template.c
+ packet-${PROTOCOL_NAME}-template.h
+ ${PROTOCOL_NAME}.cnf
+)
+
+set( SRC_FILES
+ ${EXTRA_DIST}
+ ${EXT_ASN_FILE_LIST}
+)
+
+set( A2W_FLAGS )
+
+set( EXTRA_CNF
+ "${CMAKE_CURRENT_BINARY_DIR}/../x509if/x509if-exp.cnf"
+)
+
+ASN2WRS()
+
diff --git a/epan/dissectors/asn1/lcsap/LCS-AP-CommonDataTypes.asn b/epan/dissectors/asn1/lcsap/LCS-AP-CommonDataTypes.asn
new file mode 100644
index 0000000000..d0a130399b
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/LCS-AP-CommonDataTypes.asn
@@ -0,0 +1,30 @@
+-- ETSI TS 129 171 V11.1.0 (2012-03)
+-- 7.5.6 Common Definitions
+
+-- **************************************************************
+--
+-- Common definitions
+--
+-- **************************************************************
+
+LCS-AP-CommonDataTypes {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+eps-Access (21) modules (3) lcs-AP (4) version1 (1) lcs-AP-CommonDataTypes (3)}
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+Criticality ::= ENUMERATED { reject, ignore, notify }
+
+Presence ::= ENUMERATED { optional, conditional, mandatory }
+
+ProcedureCode ::= INTEGER (0..255)
+
+ProtocolExtensionID ::= INTEGER (0..65535)
+
+ProtocolIE-ID ::= INTEGER (0..65535)
+
+TriggeringMessage ::= ENUMERATED {initiating-message, successful-outcome, unsuccessful-outcome, outcome}
+
+END
diff --git a/epan/dissectors/asn1/lcsap/LCS-AP-Constants.asn b/epan/dissectors/asn1/lcsap/LCS-AP-Constants.asn
new file mode 100644
index 0000000000..5b7d854499
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/LCS-AP-Constants.asn
@@ -0,0 +1,84 @@
+-- ETSI TS 129 171 V11.1.0 (2012-03)
+-- **************************************************************
+--
+-- Constant definitions
+--
+-- **************************************************************
+
+LCS-AP-Constants {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+eps-Access (21) modules (3) lcs-AP (4) version1 (1) lcs-AP-Constants (4)}
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+-- **************************************************************
+--
+-- Elementary Procedures
+--
+-- **************************************************************
+
+
+id-Location-Service-Request INTEGER ::= 0
+id-Connection-Oriented-Information-Transfer INTEGER ::= 1
+id-Connectionless-Information-Transfer INTEGER ::= 2
+id-Location-Abort INTEGER ::= 3
+id-Reset INTEGER ::= 4
+
+
+-- **************************************************************
+--
+-- IEs
+--
+-- **************************************************************
+
+
+id-Accuracy-Fulfillment-Indicator INTEGER ::= 0
+id-APDU INTEGER ::= 1
+id-Correlation-ID INTEGER ::= 2
+id-Destination-ID INTEGER ::= 3
+id-E-UTRAN-Cell-Identifier INTEGER ::= 4
+id-Include-Velocity INTEGER ::= 5
+id-IMEI INTEGER ::= 6
+id-IMSI INTEGER ::= 7
+id-LCS-Client-Type INTEGER ::= 8
+id-LCS-Priority INTEGER ::= 9
+id-LCS-QOS INTEGER ::= 10
+id-LCS-Cause INTEGER ::= 11
+id-Location-Estimate INTEGER ::= 12
+id-Location-Type INTEGER ::= 13
+id-MultipleAPDUs INTEGER ::= 14
+id-Payload-Type INTEGER ::= 15
+id-Positioning-Data INTEGER ::= 16
+id-Return-Error-Request INTEGER ::= 17
+id-Return-Error-Cause INTEGER ::= 18
+id-Source-Identity INTEGER ::= 19
+id-UE-Positioning-Capability INTEGER ::= 20
+id-Velocity-Estimate INTEGER ::= 21
+id-LCS-Service-Type-ID INTEGER ::= 22
+
+
+
+-- **************************************************************
+--
+-- Extension constants
+--
+-- **************************************************************
+
+-- **************************************************************
+--
+-- Lists
+--
+-- **************************************************************
+
+
+max-No-Of-Points INTEGER ::= 15
+max-Set INTEGER ::= 9
+max-GNSS-Set INTEGER ::= 9
+
+
+maxProtocolExtensions INTEGER ::= 65535
+maxProtocolIEs INTEGER ::= 65535
+
+END
diff --git a/epan/dissectors/asn1/lcsap/LCS-AP-Containers.asn b/epan/dissectors/asn1/lcsap/LCS-AP-Containers.asn
new file mode 100644
index 0000000000..00d0da6daf
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/LCS-AP-Containers.asn
@@ -0,0 +1,116 @@
+-- ETSI TS 129 171 V9.2.0 (2010-10)
+--
+-- 7.5.8 Container Definitions
+-- **************************************************************
+--
+-- Container definitions
+--
+-- **************************************************************
+
+LCS-AP-Containers {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+eps-Access (21) modules (3) lcs-AP (4) version1 (1) lcs-AP-Containers (5)}
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+-- **************************************************************
+--
+-- IE parameter types from other modules.
+--
+-- **************************************************************
+
+IMPORTS
+ Criticality,
+ Presence,
+ ProtocolExtensionID,
+ ProtocolIE-ID
+FROM LCS-AP-CommonDataTypes
+
+ maxProtocolExtensions,
+ maxProtocolIEs
+FROM LCS-AP-Constants;
+
+-- **************************************************************
+--
+-- Class Definition for Protocol IEs
+--
+-- **************************************************************
+
+LCS-AP-PROTOCOL-IES ::= CLASS {
+ &id ProtocolIE-ID UNIQUE,
+ &criticality Criticality DEFAULT ignore,
+ &Value,
+ &presence Presence
+}
+WITH SYNTAX {
+ ID &id
+ CRITICALITY &criticality
+ TYPE &Value
+ PRESENCE &presence
+}
+
+-- **************************************************************
+--
+-- Class Definition for Protocol Extensions
+--
+-- **************************************************************
+
+LCS-AP-PROTOCOL-EXTENSION ::= CLASS {
+ &id ProtocolExtensionID UNIQUE,
+ &criticality Criticality DEFAULT ignore,
+ &Extension,
+ &presence Presence
+}
+WITH SYNTAX {
+ ID &id
+ CRITICALITY &criticality
+ EXTENSION &Extension
+ PRESENCE &presence
+}
+
+-- **************************************************************
+--
+-- Container for Protocol IEs
+--
+-- **************************************************************
+
+ProtocolIE-Container {LCS-AP-PROTOCOL-IES : IEsSetParam} ::=
+ SEQUENCE (SIZE (0..maxProtocolIEs)) OF
+ ProtocolIE-Field {{IEsSetParam}}
+
+ProtocolIE-Field {LCS-AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
+ id LCS-AP-PROTOCOL-IES.&id ({IEsSetParam}),
+ criticality LCS-AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
+ value LCS-AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
+}
+
+-- **************************************************************
+--
+-- Container Lists for Protocol IE Containers
+--
+-- **************************************************************
+
+ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, LCS-AP-PROTOCOL-IES : IEsSetParam} ::=
+ SEQUENCE (SIZE (lowerBound..upperBound)) OF
+ ProtocolIE-Container {{IEsSetParam}}
+
+-- **************************************************************
+--
+-- Container for Protocol Extensions
+--
+-- **************************************************************
+
+ProtocolExtensionContainer {LCS-AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
+ SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
+ ProtocolExtensionField {{ExtensionSetParam}}
+
+ProtocolExtensionField {LCS-AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
+ id LCS-AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
+ criticality LCS-AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
+ extensionValue LCS-AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
+}
+
+
+END
diff --git a/epan/dissectors/asn1/lcsap/LCS-AP-IEs.asn b/epan/dissectors/asn1/lcsap/LCS-AP-IEs.asn
new file mode 100644
index 0000000000..25a0b23027
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/LCS-AP-IEs.asn
@@ -0,0 +1,517 @@
+-- ETSI TS 129 171 V11.1.0 (2012-03)
+--
+-- 7.5.5 Information element definitions
+-- **************************************************************
+--
+-- Information Element Definitions
+--
+-- **************************************************************
+
+
+LCS-AP-IEs {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+eps-Access (21) modules (3) lcs-AP (4) version1 (1) lcs-AP-IEs (2)}
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+IMPORTS
+
+ max-No-Of-Points,
+ max-Set,
+ max-GNSS-Set
+FROM LCS-AP-Constants
+
+ Criticality,
+ ProcedureCode,
+ TriggeringMessage,
+ ProtocolIE-ID
+FROM LCS-AP-CommonDataTypes
+
+ ProtocolExtensionContainer{},
+ LCS-AP-PROTOCOL-EXTENSION
+FROM LCS-AP-Containers;
+
+
+-- A
+
+
+APDU ::= OCTET STRING
+
+Accuracy-Fulfillment-Indicator ::= ENUMERATED {
+ requested-accuracy-fulfilled,
+ requested-accuracy-not-fulfilled,
+ ...
+}
+
+Altitude ::= INTEGER (0..65535)
+-- The valid value for this IE is 0 to 32767.
+-- Reception of value greater than 32767 shall be mapped to the value 32767.
+
+
+Altitude-And-Direction ::= SEQUENCE {
+ direction-Of-Altitude Direction-Of-Altitude,
+ altitude Altitude,
+ ...
+}
+
+Angle ::= INTEGER (0..179)
+
+-- B
+-- WS mod
+-- Bearing ::= INTEGER (0..359)
+
+
+-- C
+
+
+CellIdentity ::= BIT STRING (SIZE (28))
+
+Confidence ::= INTEGER (0..100)
+
+Correlation-ID ::= OCTET STRING (SIZE (4))
+
+
+-- D
+
+DegreesLatitude ::= INTEGER (0..8388607) -- 23 bit field
+
+DegreesLongitude ::= INTEGER (-8388608..8388607) -- 24 bit field
+
+Direction-Of-Altitude ::= ENUMERATED {
+ height,
+ depth
+}
+
+-- E
+
+E-CGI ::= SEQUENCE {
+ pLMNidentity PLMN-ID,
+ cell-ID CellIdentity,
+ iE-Extensions ProtocolExtensionContainer { { E-CGI-ExtIEs} } OPTIONAL,
+ ...}
+
+E-CGI-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Ellipsoid-Point-With-Uncertainty-Ellipse ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ uncertainty-Ellipse Uncertainty-Ellipse,
+ confidence Confidence,
+ iE-Extensions ProtocolExtensionContainer { { Ellipsoid-Point-With-Uncertainty-Ellipse-ExtIEs} } OPTIONAL,
+ ...}
+
+Ellipsoid-Point-With-Uncertainty-Ellipse-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Ellipsoid-Point-With-Altitude ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ altitude-And-Direction Altitude-And-Direction,
+ iE-Extensions ProtocolExtensionContainer { { Ellipsoid-Point-With-Altitude-ExtIEs} } OPTIONAL,
+ ...}
+
+Ellipsoid-Point-With-Altitude-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Ellipsoid-Point-With-Altitude-And-Uncertainty-Ellipsoid ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ altitude-And-Direction Altitude-And-Direction,
+ uncertainty-Ellipse Uncertainty-Ellipse,
+ uncertainty-Altitude Uncertainty-Altitude,
+ confidence Confidence,
+ iE-Extensions ProtocolExtensionContainer { { Ellipsoid-Point-With-Altitude-And-Uncertainty-Ellipsoid-ExtIEs} } OPTIONAL,
+ ...}
+
+Ellipsoid-Point-With-Altitude-And-Uncertainty-Ellipsoid-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Ellipsoid-Arc ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ inner-Radius Inner-Radius,
+ uncertainty-Radius Uncertainty-Code,
+ offset-Angle Angle,
+ included-Angle Angle,
+ confidence Confidence,
+ iE-Extensions ProtocolExtensionContainer { { Ellipsoid-Arc-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Ellipsoid-Arc-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+ENB-ID ::= CHOICE {
+ macro-eNB-ID Macro-eNB-ID,
+ home-eNB-ID Home-eNB-ID,
+ ...
+}
+
+
+
+E-SMLC-ID ::= INTEGER (0..255)
+
+
+-- F
+-- G
+
+Geographical-Area ::= CHOICE {
+ point Point,
+ point-With-Uncertainty Point-With-Uncertainty,
+ ellipsoidPoint-With-Uncertainty-Ellipse Ellipsoid-Point-With-Uncertainty-Ellipse,
+ polygon Polygon,
+ ellipsoid-Point-With-Altitude Ellipsoid-Point-With-Altitude,
+ ellipsoid-Point-With-Altitude-And-Uncertainty-Ellipsoid Ellipsoid-Point-With-Altitude-And-Uncertainty-Ellipsoid,
+ ellipsoid-Arc Ellipsoid-Arc,
+ ...
+}
+
+Geographical-Coordinates ::= SEQUENCE {
+ latitudeSign LatitudeSign,
+ degreesLatitude DegreesLatitude,
+ degreesLongitude DegreesLongitude,
+ iE-Extensions ProtocolExtensionContainer { {Geographical-Coordinates-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Geographical-Coordinates-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Global-eNB-ID ::= SEQUENCE {
+ pLMN-ID PLMN-ID,
+ eNB-ID ENB-ID
+}
+
+
+GNSS-Positioning-Method-And-Usage ::= OCTET STRING (SIZE (1))
+
+GNSS-Positioning-Data-Set ::= SEQUENCE (SIZE (1..max-GNSS-Set)) OF GNSS-Positioning-Method-And-Usage
+
+
+-- H
+
+Home-eNB-ID ::= BIT STRING (SIZE (28))
+
+Horizontal-Accuracy ::= INTEGER (0..127)
+
+
+
+Horizontal-Speed-And-Bearing ::= SEQUENCE {
+ bearing INTEGER (0..359),
+ horizontal-Speed INTEGER (0..2047)
+}
+
+
+Horizontal-Velocity ::= SEQUENCE {
+ horizontal-Speed-And-Bearing Horizontal-Speed-And-Bearing,
+ iE-Extensions ProtocolExtensionContainer { { Horizontal-Velocity-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Horizontal-Velocity-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+Horizontal-With-Vertical-Velocity ::= SEQUENCE {
+ horizontal-Speed-And-Bearing Horizontal-Speed-And-Bearing,
+ vertical-Velocity Vertical-Velocity,
+ iE-Extensions ProtocolExtensionContainer { { Horizontal-With-Vertical-Velocity-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Horizontal-With-Vertical-Velocity-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+Horizontal-Velocity-With-Uncertainty ::= SEQUENCE {
+ horizontal-Speed-And-Bearing Horizontal-Speed-And-Bearing,
+ uncertainty-Speed INTEGER (0..255),
+ iE-Extensions ProtocolExtensionContainer { { Horizontal-Velocity-With-Uncertainty-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Horizontal-Velocity-With-Uncertainty-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+Horizontal-With-Vertical-Velocity-And-Uncertainty ::= SEQUENCE {
+ horizontal-Speed-And-Bearing Horizontal-Speed-And-Bearing,
+ vertical-Velocity Vertical-Velocity,
+ horizontal-Uncertainty-Speed INTEGER (0..255),
+ vertical-Uncertainty-Speed INTEGER (0..255),
+ iE-Extensions ProtocolExtensionContainer { { Horizontal-With-Vertical-Velocity-And-Uncertainty-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Horizontal-With-Vertical-Velocity-And-Uncertainty-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+-- I
+
+IMSI ::= OCTET STRING (SIZE (3..8))
+
+IMEI ::= OCTET STRING (SIZE (8))
+
+
+Include-Velocity ::= ENUMERATED {
+ requested,
+ not-Requested,
+...
+}
+
+
+Inner-Radius ::= INTEGER (0..65535) -- 16 bit field
+
+
+-- J
+-- K
+-- L
+
+LatitudeSign ::= ENUMERATED {
+ north,
+ south
+}
+
+
+Location-Type ::= ENUMERATED {
+ geographic-Information,
+ assistance-Information,
+ ...
+}
+
+LCS-Cause ::= CHOICE {
+radio-Network-Layer Radio-Network-Layer-Cause,
+transport-Layer Transport-Layer-Cause,
+protocol Protocol-Cause,
+misc Misc-Cause
+}
+
+
+LCS-Client-Type ::= ENUMERATED {
+ emergency-Services,
+ value-Added-Services,
+ pLMN-Operator-Services,
+ lawful-Intercept-Services,
+ pLMN-Operator-broadcast-Services,
+ pLMN-Operator-OM,
+ pLMN-Operator-Anonymous-Statistics,
+ pLMN-Operator-Target-MS-Service-Support,
+ ...
+}
+
+
+LCS-Priority ::= OCTET STRING (SIZE (1))
+
+
+LCS-QoS ::= SEQUENCE {
+ horizontal-Accuracy Horizontal-Accuracy OPTIONAL,
+ vertical-Requested Vertical-Requested OPTIONAL,
+ vertical-Accuracy Vertical-Accuracy OPTIONAL,
+ response-Time Response-Time OPTIONAL,
+ ...
+}
+
+LCS-Service-Type-ID ::= INTEGER (0..127)
+
+
+-- M
+
+Macro-eNB-ID ::= BIT STRING (SIZE (20))
+
+Message-Identifier ::= BIT STRING (SIZE (16))
+
+Misc-Cause ::= ENUMERATED {
+ processing-Overload,
+ hardware-Failure,
+ o-And-M-Intervention,
+ unspecified,
+...
+}
+
+MultipleAPDUs ::= SEQUENCE (SIZE (1.. 3)) OF APDU
+
+
+-- N
+
+Network-Element ::= CHOICE {
+global-eNB-ID Global-eNB-ID,
+e-SMLC-ID E-SMLC-ID
+}
+
+-- O
+
+Orientation-Major-Axis ::= INTEGER (0..89)
+
+-- P
+
+Payload-Type ::= ENUMERATED {
+lPP,
+lPPa,
+...
+}
+
+PLMN-ID ::= TBCD-STRING
+
+Point ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ iE-Extensions ProtocolExtensionContainer { {Point-ExtIEs} } OPTIONAL,
+ ...
+}
+
+Point-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Point-With-Uncertainty ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ uncertainty-Code Uncertainty-Code,
+ iE-Extensions ProtocolExtensionContainer { {Point-With-Uncertainty-ExtIEs} } OPTIONAL,
+ ...}
+
+Point-With-Uncertainty-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+Polygon ::= SEQUENCE (SIZE (1..max-No-Of-Points)) OF Polygon-Point
+
+
+Polygon-Point ::= SEQUENCE {
+ geographical-Coordinates Geographical-Coordinates,
+ iE-Extensions ProtocolExtensionContainer { {Polygon-Point-ExtIEs} } OPTIONAL,
+ ...
+ }
+
+Polygon-Point-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+Positioning-Data ::= SEQUENCE {
+ positioning-Data-Set Positioning-Data-Set OPTIONAL,
+ gNSS-Positioning-Data-Set GNSS-Positioning-Data-Set OPTIONAL,
+ iE-Extensions ProtocolExtensionContainer { { Positioning-Data-ExtIEs} } OPTIONAL,
+ ...
+ }
+
+Positioning-Data-ExtIEs LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+Positioning-Data-Set ::= SEQUENCE (SIZE (1..max-Set)) OF Positioning-Method-And-Usage
+
+Positioning-Method-And-Usage ::= OCTET STRING (SIZE (1))
+
+Protocol-Cause ::= ENUMERATED {
+transfer-Syntax-Error,
+abstract-Syntax-Error-Reject,
+abstract-Syntax-Error-Ignore-And-Notify,
+message-Not-Compatible-With-Receiver-State,
+semantic-Error,
+unspecified,
+abstract-Syntax-Error,
+...
+}
+
+-- Q
+-- R
+
+Radio-Network-Layer-Cause ::= ENUMERATED {
+unspecified,
+...
+}
+
+Response-Time ::= ENUMERATED {
+ low-Delay(0),
+ delay-Tolerant(1),
+...
+}
+
+Return-Error-Type ::= ENUMERATED {
+yes,
+no
+}
+
+Return-Error-Cause ::= ENUMERATED {
+system-Failure,
+protocol-Error,
+destination-Unknown,
+destination-Unreachable,
+congestion,
+...
+}
+
+-- S
+-- T
+
+TBCD-STRING ::= OCTET STRING (SIZE (3))
+
+Transport-Layer-Cause ::= ENUMERATED {
+tranport-Resource-Unavailable,
+unspecified,
+...
+}
+
+-- U
+
+Uncertainty-Altitude ::= INTEGER (0..127)
+
+Uncertainty-Code ::= INTEGER (0..127)
+
+Uncertainty-Ellipse ::= SEQUENCE {
+ uncertainty-SemiMajor Uncertainty-Code,
+ uncertainty-SemiMinor Uncertainty-Code,
+ orientation-Major-Axis Orientation-Major-Axis
+}
+
+UE-Positioning-Capability ::= SEQUENCE {
+ lPP BOOLEAN,
+ ...
+}
+
+-- V
+
+Velocity-Estimate ::= CHOICE {
+ horizontal-Velocity Horizontal-Velocity,
+ horizontal-With-Vertical-Velocity Horizontal-With-Vertical-Velocity,
+ horizontal-Velocity-With-Uncertainty Horizontal-Velocity-With-Uncertainty,
+ horizontal-With-Vertical-Velocity-And-Uncertainty Horizontal-With-Vertical-Velocity-And-Uncertainty,
+ ...
+}
+
+Vertical-Requested ::= ENUMERATED {
+ vertical-coordinate-Is-Not-Requested(0),
+ vertical-coordinate-Is-Requested(1)
+}
+
+Vertical-Accuracy ::= INTEGER (0..127)
+
+Vertical-Velocity ::= SEQUENCE {
+ vertical-Speed INTEGER (0..255),
+ vertical-Speed-Direction Vertical-Speed-Direction
+}
+
+Vertical-Speed-Direction ::= ENUMERATED {
+ upward,
+ downward
+}
+
+
+-- W
+-- X
+-- Y
+
+END
diff --git a/epan/dissectors/asn1/lcsap/LCS-AP-PDU-Contents.asn b/epan/dissectors/asn1/lcsap/LCS-AP-PDU-Contents.asn
new file mode 100644
index 0000000000..5168d50c66
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/LCS-AP-PDU-Contents.asn
@@ -0,0 +1,257 @@
+-- ETSI TS 129 171 V11.1.0 (2012-03)
+--
+-- 7.5.4 PDU definitions
+-- **************************************************************
+--
+-- PDU definitions for LCS-AP.
+--
+-- **************************************************************
+
+LCS-AP-PDU-Contents {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+eps-Access (21) modules (3) lcs-AP (4) version1 (1) lcs-AP-PDU-Contents (1)}
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+-- **************************************************************
+--
+-- IE parameter types from other modules.
+--
+-- **************************************************************
+
+IMPORTS
+
+ APDU,
+ Accuracy-Fulfillment-Indicator,
+ Correlation-ID,
+ E-CGI,
+ Geographical-Area,
+ IMSI,
+ IMEI,
+ Include-Velocity,
+ LCS-Cause,
+ LCS-Client-Type,
+ LCS-Service-Type-ID,
+ LCS-Priority,
+ LCS-QoS,
+ Location-Type,
+ MultipleAPDUs,
+ Network-Element,
+ Payload-Type,
+ Positioning-Data,
+ Return-Error-Type,
+ Return-Error-Cause,
+ UE-Positioning-Capability,
+ Velocity-Estimate
+FROM LCS-AP-IEs
+
+ ProtocolExtensionContainer{},
+ ProtocolIE-Container{},
+ LCS-AP-PROTOCOL-EXTENSION,
+ LCS-AP-PROTOCOL-IES
+FROM LCS-AP-Containers
+
+ id-Accuracy-Fulfillment-Indicator,
+ id-APDU,
+ id-Correlation-ID,
+ id-Destination-ID,
+ id-E-UTRAN-Cell-Identifier,
+ id-Include-Velocity,
+ id-IMEI,
+ id-IMSI,
+ id-LCS-Client-Type,
+ id-LCS-Priority,
+ id-LCS-QOS,
+ id-LCS-Cause,
+ id-LCS-Service-Type-ID,
+ id-Location-Estimate,
+ id-Location-Type,
+ id-MultipleAPDUs,
+ id-Payload-Type,
+ id-Positioning-Data,
+ id-Return-Error-Request,
+ id-Return-Error-Cause,
+ id-Source-Identity,
+ id-UE-Positioning-Capability,
+ id-Velocity-Estimate
+FROM LCS-AP-Constants;
+
+
+-- **************************************************************
+--
+-- Location-Request
+--
+-- **************************************************************
+
+Location-Request ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { { Location-Request-IEs} },
+ protocolExtensions ProtocolExtensionContainer { { Location-Request-Extensions} } OPTIONAL,
+ ...
+}
+
+Location-Request-IEs LCS-AP-PROTOCOL-IES ::= {
+ { ID id-Correlation-ID CRITICALITY reject TYPE Correlation-ID PRESENCE mandatory } |
+ { ID id-Location-Type CRITICALITY reject TYPE Location-Type PRESENCE mandatory } |
+ { ID id-E-UTRAN-Cell-Identifier CRITICALITY ignore TYPE E-CGI PRESENCE mandatory } |
+ { ID id-LCS-Client-Type CRITICALITY reject TYPE LCS-Client-Type PRESENCE optional } |
+ { ID id-LCS-Priority CRITICALITY reject TYPE LCS-Priority PRESENCE optional } |
+ { ID id-LCS-QOS CRITICALITY reject TYPE LCS-QoS PRESENCE optional } |
+ { ID id-UE-Positioning-Capability CRITICALITY reject TYPE UE-Positioning-Capability PRESENCE optional } |
+ { ID id-Include-Velocity CRITICALITY reject TYPE Include-Velocity PRESENCE optional } |
+ { ID id-IMSI CRITICALITY ignore TYPE IMSI PRESENCE optional } |
+ { ID id-IMEI CRITICALITY ignore TYPE IMEI PRESENCE optional } |
+ { ID id-MultipleAPDUs CRITICALITY reject TYPE MultipleAPDUs PRESENCE optional } ,
+ ...
+}
+
+Location-Request-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ { ID id-LCS-Service-Type-ID CRITICALITY ignore EXTENSION LCS-Service-Type-ID PRESENCE optional },
+ ...
+}
+
+
+-- **************************************************************
+--
+-- Location-Response
+--
+-- **************************************************************
+
+Location-Response ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { {Location-Response-IEs} },
+ protocolExtensions ProtocolExtensionContainer { {Location-Response-Extensions} } OPTIONAL,
+ ...
+}
+
+Location-Response-IEs LCS-AP-PROTOCOL-IES ::= {
+ { ID id-Correlation-ID CRITICALITY reject TYPE Correlation-ID PRESENCE mandatory } |
+ { ID id-Location-Estimate CRITICALITY reject TYPE Geographical-Area PRESENCE optional } |
+ { ID id-Positioning-Data CRITICALITY reject TYPE Positioning-Data PRESENCE optional } |
+ { ID id-Velocity-Estimate CRITICALITY reject TYPE Velocity-Estimate PRESENCE optional } |
+ { ID id-Accuracy-Fulfillment-Indicator CRITICALITY reject TYPE Accuracy-Fulfillment-Indicator PRESENCE optional } |
+ { ID id-LCS-Cause CRITICALITY ignore TYPE LCS-Cause PRESENCE optional } ,
+...
+}
+
+
+Location-Response-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+-- **************************************************************
+--
+-- Location-Abort
+--
+-- **************************************************************
+
+Location-Abort-Request ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { {Location-Abort-Request-IEs} },
+ protocolExtensions ProtocolExtensionContainer { {Location-Abort-Request-Extensions} } OPTIONAL,
+ ...
+}
+
+Location-Abort-Request-IEs LCS-AP-PROTOCOL-IES ::= {
+ { ID id-Correlation-ID CRITICALITY reject TYPE Correlation-ID PRESENCE mandatory } |
+ { ID id-LCS-Cause CRITICALITY ignore TYPE LCS-Cause PRESENCE mandatory } ,
+ ...
+}
+
+Location-Abort-Request-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+-- **************************************************************
+--
+-- Connection-Oriented-Information
+--
+-- **************************************************************
+
+Connection-Oriented-Information ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { {Connection-Oriented-Information-IEs} },
+ protocolExtensions ProtocolExtensionContainer { {Connection-Oriented-Information-Extensions} } OPTIONAL,
+ ...
+}
+
+Connection-Oriented-Information-IEs LCS-AP-PROTOCOL-IES ::= {
+ { ID id-Correlation-ID CRITICALITY reject TYPE Correlation-ID PRESENCE optional } |
+ { ID id-Payload-Type CRITICALITY reject TYPE Payload-Type PRESENCE optional } |
+ { ID id-APDU CRITICALITY reject TYPE APDU PRESENCE optional } ,
+ ...
+}
+
+Connection-Oriented-Information-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+-- **************************************************************
+--
+-- Connectionless-Information
+--
+-- **************************************************************
+
+Connectionless-Information ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { {Connectionless-Information-IEs} },
+ protocolExtensions ProtocolExtensionContainer { {Connectionless-Information-Extensions} } OPTIONAL,
+ ...
+}
+
+Connectionless-Information-IEs LCS-AP-PROTOCOL-IES ::= {
+ { ID id-Source-Identity CRITICALITY reject TYPE Network-Element PRESENCE mandatory } |
+ { ID id-Destination-ID CRITICALITY reject TYPE Network-Element PRESENCE mandatory } |
+ { ID id-APDU CRITICALITY reject TYPE APDU PRESENCE mandatory } |
+ { ID id-Return-Error-Request CRITICALITY reject TYPE Return-Error-Type PRESENCE optional } |
+ { ID id-Return-Error-Cause CRITICALITY ignore TYPE Return-Error-Cause PRESENCE optional } ,
+ ...
+}
+
+
+Connectionless-Information-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+-- **************************************************************
+--
+-- Reset-Request
+--
+-- **************************************************************
+
+Reset-Request ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { {Reset-Request-IEs} },
+ protocolExtensions ProtocolExtensionContainer { {Reset-Request-Extensions} } OPTIONAL,
+ ...
+}
+
+Reset-Request-IEs LCS-AP-PROTOCOL-IES ::= {
+ { ID id-LCS-Cause CRITICALITY ignore TYPE LCS-Cause PRESENCE mandatory } ,
+ ...
+}
+
+
+Reset-Request-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+-- **************************************************************
+--
+-- Reset-Acknowledge
+--
+-- **************************************************************
+
+Reset-Acknowledge ::= SEQUENCE {
+ protocolIEs ProtocolIE-Container { { Reset-Acknowledge-IEs} },
+ protocolExtensions ProtocolExtensionContainer { { Reset-Acknowledge-Extensions} } OPTIONAL,
+ ...
+}
+
+Reset-Acknowledge-IEs LCS-AP-PROTOCOL-IES ::= {
+ ...
+}
+
+Reset-Acknowledge-Extensions LCS-AP-PROTOCOL-EXTENSION ::= {
+ ...
+}
+
+
+END
diff --git a/epan/dissectors/asn1/lcsap/LCS-AP-PDU-Descriptions.asn b/epan/dissectors/asn1/lcsap/LCS-AP-PDU-Descriptions.asn
new file mode 100644
index 0000000000..b4bb9dfdac
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/LCS-AP-PDU-Descriptions.asn
@@ -0,0 +1,167 @@
+-- ETSI TS 129 171 V11.1.0 (2012-03)
+--
+-- 7.5.3 Elementary procedure definitions
+-- **************************************************************
+--
+-- Elementary Procedure definitions
+--
+-- **************************************************************
+
+LCS-AP-PDU-Descriptions {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
+eps-Access (21) modules (3) lcs-AP (4) version1 (1) lcs-AP-PDU-Descriptions (0)}
+
+
+DEFINITIONS AUTOMATIC TAGS ::=
+
+BEGIN
+
+-- **************************************************************
+--
+-- IE parameter types from other modules.
+--
+-- **************************************************************
+
+IMPORTS
+ Criticality,
+ ProcedureCode
+FROM LCS-AP-CommonDataTypes
+
+ Location-Request,
+ Location-Response,
+ Location-Abort-Request,
+ Connection-Oriented-Information,
+ Connectionless-Information,
+ Reset-Request,
+ Reset-Acknowledge
+FROM LCS-AP-PDU-Contents
+
+ id-Location-Service-Request,
+ id-Connection-Oriented-Information-Transfer,
+ id-Connectionless-Information-Transfer,
+ id-Location-Abort,
+ id-Reset
+FROM LCS-AP-Constants;
+
+-- **************************************************************
+--
+-- Interface Elementary Procedure Class
+--
+-- **************************************************************
+
+LCS-AP-ELEMENTARY-PROCEDURE ::= CLASS {
+ &InitiatingMessage ,
+ &SuccessfulOutcome OPTIONAL,
+ &UnsuccessfulOutcome OPTIONAL,
+ &procedureCode ProcedureCode UNIQUE,
+ &criticality Criticality DEFAULT ignore
+}
+WITH SYNTAX {
+ INITIATING MESSAGE &InitiatingMessage
+ [SUCCESSFUL OUTCOME &SuccessfulOutcome]
+ [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
+ PROCEDURE CODE &procedureCode
+ [CRITICALITY &criticality]
+}
+
+-- **************************************************************
+--
+-- Interface PDU Definition
+--
+-- **************************************************************
+
+LCS-AP-PDU ::= CHOICE {
+ initiatingMessage InitiatingMessage,
+ successfulOutcome SuccessfulOutcome,
+ unsuccessfulOutcome UnsuccessfulOutcome,
+ ...
+}
+
+InitiatingMessage ::= SEQUENCE {
+ procedureCode LCS-AP-ELEMENTARY-PROCEDURE.&procedureCode ({LCS-AP-ELEMENTARY-PROCEDURES}),
+ criticality LCS-AP-ELEMENTARY-PROCEDURE.&criticality ({LCS-AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
+ value LCS-AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({LCS-AP-ELEMENTARY-PROCEDURES}{@procedureCode})
+}
+
+SuccessfulOutcome ::= SEQUENCE {
+ procedureCode LCS-AP-ELEMENTARY-PROCEDURE.&procedureCode ({LCS-AP-ELEMENTARY-PROCEDURES}),
+ criticality LCS-AP-ELEMENTARY-PROCEDURE.&criticality ({LCS-AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
+ value LCS-AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({LCS-AP-ELEMENTARY-PROCEDURES}{@procedureCode})
+}
+
+UnsuccessfulOutcome ::= SEQUENCE {
+ procedureCode LCS-AP-ELEMENTARY-PROCEDURE.&procedureCode ({LCS-AP-ELEMENTARY-PROCEDURES}),
+ criticality LCS-AP-ELEMENTARY-PROCEDURE.&criticality ({LCS-AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
+ value LCS-AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({LCS-AP-ELEMENTARY-PROCEDURES}{@procedureCode})
+}
+
+-- **************************************************************
+--
+-- Interface Elementary Procedure List
+--
+-- **************************************************************
+
+LCS-AP-ELEMENTARY-PROCEDURES LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ LCS-AP-ELEMENTARY-PROCEDURES-CLASS-1 |
+ LCS-AP-ELEMENTARY-PROCEDURES-CLASS-2 ,
+ ...
+}
+
+LCS-AP-ELEMENTARY-PROCEDURES-CLASS-1 LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ location-Service-Request |
+ connectionless-Information-Transfer |
+ location-Abort |
+ reset ,
+ ...
+}
+
+
+
+LCS-AP-ELEMENTARY-PROCEDURES-CLASS-2 LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ connection-Oriented-Information-Transfer ,
+ ...
+}
+
+-- **************************************************************
+--
+-- Interface Elementary Procedures
+--
+-- **************************************************************
+
+
+location-Service-Request LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ INITIATING MESSAGE Location-Request
+ SUCCESSFUL OUTCOME Location-Response
+ UNSUCCESSFUL OUTCOME Location-Response
+ PROCEDURE CODE id-Location-Service-Request
+ CRITICALITY reject
+}
+
+connection-Oriented-Information-Transfer LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ INITIATING MESSAGE Connection-Oriented-Information
+ PROCEDURE CODE id-Connection-Oriented-Information-Transfer
+ CRITICALITY reject
+}
+
+connectionless-Information-Transfer LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ INITIATING MESSAGE Connectionless-Information
+ UNSUCCESSFUL OUTCOME Connectionless-Information
+ PROCEDURE CODE id-Connectionless-Information-Transfer
+ CRITICALITY reject
+}
+
+location-Abort LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ INITIATING MESSAGE Location-Abort-Request
+ SUCCESSFUL OUTCOME Location-Response
+ PROCEDURE CODE id-Location-Abort
+ CRITICALITY reject
+}
+
+reset LCS-AP-ELEMENTARY-PROCEDURE ::= {
+ INITIATING MESSAGE Reset-Request
+ SUCCESSFUL OUTCOME Reset-Acknowledge
+ PROCEDURE CODE id-Reset
+ CRITICALITY reject
+}
+
+END
diff --git a/epan/dissectors/asn1/lcsap/Makefile.am b/epan/dissectors/asn1/lcsap/Makefile.am
new file mode 100644
index 0000000000..72d28e600b
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/Makefile.am
@@ -0,0 +1,23 @@
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+include ../Makefile.preinc
+include Makefile.common
+include ../Makefile.inc
+
diff --git a/epan/dissectors/asn1/lcsap/Makefile.common b/epan/dissectors/asn1/lcsap/Makefile.common
new file mode 100644
index 0000000000..cbe0507317
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/Makefile.common
@@ -0,0 +1,56 @@
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+PROTOCOL_NAME=lcsap
+
+#DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c
+
+EXPORT_FILES = $(PROTOCOL_NAME)-exp.cnf
+
+EXT_ASN_FILE_LIST =
+
+ASN_FILE_LIST = \
+ LCS-AP-CommonDataTypes.asn\
+ LCS-AP-Constants.asn\
+ LCS-AP-Containers.asn\
+ LCS-AP-IEs.asn\
+ LCS-AP-PDU-Contents.asn\
+ LCS-AP-PDU-Descriptions.asn
+
+# The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn
+# files do not exist for all protocols: Please add/remove as required.
+EXTRA_DIST = \
+ $(EXTRA_DIST_COMMON) \
+ $(ASN_FILE_LIST) \
+ packet-$(PROTOCOL_NAME)-template.c \
+ packet-$(PROTOCOL_NAME)-template.h \
+ $(PROTOCOL_NAME).cnf
+
+SRC_FILES = \
+ $(EXTRA_DIST) \
+ $(EXT_ASN_FILE_LIST)
+
+A2W_FLAGS=
+
+EXTRA_CNF= \
+ $(builddir)/../x509if/x509if-exp.cnf
+
+$(builddir)/../x509if/x509if-exp.cnf:
+ (cd ../x509if && $(MAKE_CNF_EXPORT))
+
diff --git a/epan/dissectors/asn1/lcsap/Makefile.nmake b/epan/dissectors/asn1/lcsap/Makefile.nmake
new file mode 100644
index 0000000000..d296638ddd
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/Makefile.nmake
@@ -0,0 +1,26 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+include ../../../../config.nmake
+include ../Makefile.preinc.nmake
+include Makefile.common
+include ../Makefile.inc.nmake
+
diff --git a/epan/dissectors/asn1/lcsap/lcsap.cnf b/epan/dissectors/asn1/lcsap/lcsap.cnf
new file mode 100644
index 0000000000..69514c3c5d
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/lcsap.cnf
@@ -0,0 +1,324 @@
+# lcsap.cnf
+# lcsap conformation file
+
+#.OPT
+PER
+ALIGNED
+#.END
+
+#.EXPORTS
+Correlation-ID_PDU
+
+#.PDU
+LCS-AP-PDU
+
+#.MAKE_ENUM
+ProcedureCode
+ProtocolIE-ID
+
+#.NO_EMIT
+TBCD-STRING
+
+#.OMIT_ASSIGNMENT
+# Get rid of unused code warnings
+Presence
+
+TriggeringMessage
+ProtocolIE-ContainerList
+Message-Identifier
+
+#.END
+
+
+#.TYPE_RENAME
+InitiatingMessage/value InitiatingMessage_value
+SuccessfulOutcome/value SuccessfulOutcome_value
+UnsuccessfulOutcome/value UnsuccessfulOutcome_value
+
+#.FIELD_RENAME
+InitiatingMessage/value initiatingMessagevalue
+UnsuccessfulOutcome/value unsuccessfulOutcome_value
+SuccessfulOutcome/value successfulOutcome_value
+
+ProtocolExtensionField/id ext_id
+
+#PrivateIE-Field/value private_value
+ProtocolIE-Field/value ie_field_value
+
+#.FN_PARS ProtocolIE-ID VAL_PTR=&ProtocolIE_ID
+#.FN_FTR ProtocolIE-ID
+ if (tree) {
+ proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str(ProtocolIE_ID, VALS(lcsap_ProtocolIE_ID_vals), "unknown (%d)"));
+ }
+#.END
+
+
+#.FN_PARS ProtocolIE-Field/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolIEFieldValue
+#.FN_PARS ProtocolExtensionID VAL_PTR=&ProtocolExtensionID
+#.FN_PARS ProtocolExtensionField/extensionValue FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolExtensionFieldExtensionValue
+
+#.FN_PARS Payload-Type VAL_PTR=&PayloadType
+
+# LCSAP connectionless-transfer
+# procedures, which according to 3GPP TS 29.171 LCS-AP, can only contain an LPPa
+# payload within the APDU IE of the procedure.
+
+#.FN_HDR Connectionless-Information
+
+ PayloadType = 1; /* LPPa */
+
+#.FN_BODY APDU VAL_PTR = &parameter_tvb
+
+ tvbuff_t *parameter_tvb=NULL;
+
+%(DEFAULT_BODY)s
+
+ if (parameter_tvb) {
+ switch (PayloadType) {
+ case 0:
+ /* LPP */
+ if (lpp_handle) {
+ call_dissector(lpp_handle, parameter_tvb, %(ACTX)s->pinfo, tree);
+ }
+ break;
+ case 1:
+ /* LPPa */
+ if (lppa_handle) {
+ call_dissector(lppa_handle, parameter_tvb, %(ACTX)s->pinfo, tree);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ PayloadType = -1;
+
+#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode
+#.FN_FTR ProcedureCode
+
+ {
+ guint8 tmp = tvb_get_guint8(tvb, 0);
+
+ if (tmp == 0)
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sReq",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
+ else if (tmp == 32)
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sResp",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
+ else
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
+ }
+
+#.END
+
+#.FN_PARS InitiatingMessage/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_InitiatingMessageValue
+
+#.FN_PARS SuccessfulOutcome/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_SuccessfulOutcomeValue
+
+#.FN_PARS UnsuccessfulOutcome/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_UnsuccessfulOutcomeValue
+
+#--- Parameterization is not supported in asn2wrs ---
+
+#ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, LCS-AP-PROTOCOL-IES : IEsSetParam} ::=
+# SEQUENCE (SIZE (lowerBound..upperBound)) OF
+# ProtocolIE-Container {{IEsSetParam}}
+
+
+#.END
+
+
+# Currently not used
+# FN_PARS ProtocolIE-ContainerPairList
+#MIN_VAL = asn1_param_get_integer(%(ACTX)s,"lowerBound")
+#MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
+# FN_HDR ProtocolIE-ContainerPairList
+# static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = {
+# { "lowerBound", ASN1_PAR_INTEGER },
+# { "upperBound", ASN1_PAR_INTEGER },
+# { NULL, 0 }
+# };
+# asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars);
+# END
+
+# following construction is not supported by asn2wrs
+# PLMN-ID ::= TBCD-STRING (SIZE (3))
+# TBCD-STRING ::= OCTET STRING
+# 3GPP TS 29.171 version 10.3.0 Release 10
+# 7.4.27 PLMN Identity
+#.FN_BODY PLMN-ID VAL_PTR = parameter_tvb
+ tvbuff_t *parameter_tvb=NULL;
+ proto_tree *subtree;
+ offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
+ 3, 3, FALSE, &parameter_tvb);
+ if(tvb_reported_length(tvb)==0)
+ return offset;
+
+ if (!parameter_tvb)
+ return offset;
+ subtree = proto_item_add_subtree(actx->created_item, ett_lcsap_plmnd_id);
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE);
+#.END
+
+#.FN_BODY Positioning-Method-And-Usage VAL_PTR = &parameter_tvb
+ tvbuff_t *parameter_tvb=NULL;
+
+%(DEFAULT_BODY)s
+
+ if (!parameter_tvb)
+ return offset;
+
+ proto_tree_add_item(tree, hf_lcsap_pos_method, parameter_tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_lcsap_pos_usage, parameter_tvb, 0, 1, ENC_BIG_ENDIAN);
+
+
+#.FN_BODY GNSS-Positioning-Method-And-Usage VAL_PTR = &parameter_tvb
+ tvbuff_t *parameter_tvb=NULL;
+
+%(DEFAULT_BODY)s
+
+ if (!parameter_tvb)
+ return offset;
+
+ proto_tree_add_item(tree, hf_lcsap_gnss_pos_method, parameter_tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_lcsap_gnss_id, parameter_tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_lcsap_gnss_pos_usage, parameter_tvb, 0, 1, ENC_BIG_ENDIAN);
+
+#
+# Code copied from packet-gsm_a_common.c
+#.FN_BODY Uncertainty-Code VAL_PTR = &uncertainty_code
+ guint32 uncertainty_code;
+
+ offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
+ 0U, 127U, &uncertainty_code, FALSE);
+
+ proto_item_append_text(actx->created_item, " (%.1f m)", 10 * (pow(1.1, (double)uncertainty_code) - 1));
+
+#.FN_BODY DegreesLatitude VAL_PTR = &degrees
+ gint32 degrees;
+
+ offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
+ 0U, 8388607U, &degrees, FALSE);
+
+ proto_item_append_text(actx->created_item, " (%.5f degrees)", (((double)degrees/8388607) * 90));
+
+#.FN_BODY DegreesLongitude VAL_PTR = &degrees
+ gint32 degrees;
+
+ offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
+ -8388608, 8388607U, &degrees, FALSE);
+
+ proto_item_append_text(actx->created_item, " (%.5f degrees)", (((double)degrees/16777215) * 360));
+
+#.FN_BODY IMSI VAL_PTR=&imsi_tvb
+ tvbuff_t *imsi_tvb;
+%(DEFAULT_BODY)s
+ if (imsi_tvb) {
+ proto_tree *subtree;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_lcsap_imsi);
+ dissect_e212_imsi(imsi_tvb, actx->pinfo, subtree, 0, tvb_reported_length(imsi_tvb), FALSE);
+ }
+
+#.FN_BODY Horizontal-Accuracy VAL_PTR=&uncertainty_code
+ guint32 uncertainty_code;
+%(DEFAULT_BODY)s
+
+#.FN_FTR Horizontal-Accuracy
+ proto_item_append_text(actx->created_item, " (%.1f m)", 10 * (pow(1.1, (double)uncertainty_code) - 1));
+
+#.FN_BODY Vertical-Accuracy VAL_PTR=&vertical_uncertainty
+ guint32 vertical_uncertainty;
+%(DEFAULT_BODY)s
+
+#.FN_FTR Vertical-Accuracy
+ proto_item_append_text(actx->created_item, " (%.1f m)", 45 * (pow(1.025, (double)vertical_uncertainty) - 1));
+
+#.TYPE_ATTR
+ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(lcsap_ProtocolIE_ID_vals)
+#.ASSIGN_VALUE_TO_TYPE # LCSAP does not have constants assigned to types, they are pure INTEGER
+# ProcedureCode
+id-Location-Service-Request ProcedureCode
+id-Connection-Oriented-Information-Transfer ProcedureCode
+id-Connectionless-Information-Transfer ProcedureCode
+id-Location-Abort ProcedureCode
+id-Reset ProcedureCode
+
+# ProtocolIE-ID
+id-Correlation-ID ProtocolIE-ID
+id-Location-Type ProtocolIE-ID
+id-E-UTRAN-Cell-Identifier ProtocolIE-ID
+id-LCS-Client-Type ProtocolIE-ID
+id-LCS-Priority ProtocolIE-ID
+id-LCS-QOS ProtocolIE-ID
+id-UE-Positioning-Capability ProtocolIE-ID
+id-Include-Velocity ProtocolIE-ID
+id-IMSI ProtocolIE-ID
+id-IMEI ProtocolIE-ID
+id-MultipleAPDUs ProtocolIE-ID
+id-Positioning-Data ProtocolIE-ID
+id-Velocity-Estimate ProtocolIE-ID
+id-Accuracy-Fulfillment-Indicator ProtocolIE-ID
+id-LCS-Cause ProtocolIE-ID
+id-Payload-Type ProtocolIE-ID
+id-Return-Error-Cause ProtocolIE-ID
+id-APDU ProtocolIE-ID
+id-Return-Error-Request ProtocolIE-ID
+id-Location-Estimate ProtocolIE-ID
+id-Source-Identity ProtocolIE-ID
+id-Destination-ID ProtocolIE-ID
+id-LCS-Service-Type-ID ProtocolIE-ID
+
+
+#.REGISTER
+
+#LCS-AP-PROTOCOL-IES
+Accuracy-Fulfillment-Indicator N lcsap.ies id-Accuracy-Fulfillment-Indicator
+APDU N lcsap.ies id-APDU
+Correlation-ID N lcsap.ies id-Correlation-ID
+Network-Element N lcsap.ies id-Destination-ID
+E-CGI N lcsap.ies id-E-UTRAN-Cell-Identifier
+Include-Velocity N lcsap.ies id-Include-Velocity
+IMEI N lcsap.ies id-IMEI
+IMSI N lcsap.ies id-IMSI
+LCS-Client-Type N lcsap.ies id-LCS-Client-Type
+LCS-Priority N lcsap.ies id-LCS-Priority
+LCS-QoS N lcsap.ies id-LCS-QOS
+LCS-Cause N lcsap.ies id-LCS-Cause
+Geographical-Area N lcsap.ies id-Location-Estimate
+Location-Type N lcsap.ies id-Location-Type
+MultipleAPDUs N lcsap.ies id-MultipleAPDUs
+Payload-Type N lcsap.ies id-Payload-Type
+Positioning-Data N lcsap.ies id-Positioning-Data
+Return-Error-Type N lcsap.ies id-Return-Error-Request
+Return-Error-Cause N lcsap.ies id-Return-Error-Cause
+Network-Element N lcsap.ies id-Source-Identity
+UE-Positioning-Capability N lcsap.ies id-UE-Positioning-Capability
+Velocity-Estimate N lcsap.ies id-Velocity-Estimate
+
+#LCS-AP-PROTOCOL-EXTENSION
+LCS-Service-Type-ID N lcsap.extension id-LCS-Service-Type-ID
+
+
+
+
+Location-Request N lcsap.proc.imsg id-Location-Service-Request
+Location-Response N lcsap.proc.sout id-Location-Service-Request
+Location-Response N lcsap.proc.uout id-Location-Service-Request
+
+Connection-Oriented-Information N lcsap.proc.imsg id-Connection-Oriented-Information-Transfer
+
+Connectionless-Information N lcsap.proc.imsg id-Connectionless-Information-Transfer
+Connectionless-Information N lcsap.proc.uout id-Connectionless-Information-Transfer
+
+Location-Abort-Request N lcsap.proc.imsg id-Location-Abort
+Location-Response N lcsap.proc.sout id-Location-Abort
+
+Reset-Request N lcsap.proc.imsg id-Reset
+Reset-Acknowledge N lcsap.proc.sout id-Reset
+
+
+
+#.TYPE_ATTR
+BitRate TYPE = FT_UINT64 DISPLAY = BASE_DEC STRINGS = NULL
+#.END
diff --git a/epan/dissectors/asn1/lcsap/packet-lcsap-template.c b/epan/dissectors/asn1/lcsap/packet-lcsap-template.c
new file mode 100644
index 0000000000..9206c92fa0
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/packet-lcsap-template.c
@@ -0,0 +1,347 @@
+/* packet-lcsap.c
+ * Routines for LCS-AP packet dissembly.
+ *
+ * Copyright (c) 2011 by Spenser Sheng <spenser.sheng@ericsson.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * References:
+ * ETSI TS 129 171 V9.2.0 (2010-10)
+ */
+
+#include "config.h"
+
+#include <math.h>
+
+#include <epan/packet.h>
+#include <epan/strutil.h>
+#include <epan/asn1.h>
+#include <epan/prefs.h>
+#include <epan/sctpppids.h>
+
+#include "packet-ber.h"
+#include "packet-per.h"
+#include "packet-e212.h"
+#include "packet-sccp.h"
+#include "packet-lcsap.h"
+
+#ifdef _MSC_VER
+/* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */
+#pragma warning(disable:4146)
+#endif
+
+#define PNAME "LCS Application Protocol"
+#define PSNAME "LCSAP"
+#define PFNAME "lcsap"
+
+void proto_register_lcsap(void);
+void proto_reg_handoff_lcsap(void);
+
+static dissector_handle_t lpp_handle;
+static dissector_handle_t lppa_handle;
+
+#define SCTP_PORT_LCSAP 9082
+#include "packet-lcsap-val.h"
+
+/* Initialize the protocol and registered fields */
+static int proto_lcsap = -1;
+
+static int hf_lcsap_pos_method = -1;
+static int hf_lcsap_pos_usage = -1;
+static int hf_lcsap_gnss_pos_method = -1;
+static int hf_lcsap_gnss_id = -1;
+static int hf_lcsap_gnss_pos_usage = -1;
+#include "packet-lcsap-hf.c"
+
+/* Initialize the subtree pointers */
+static int ett_lcsap = -1;
+static int ett_lcsap_plmnd_id = -1;
+static int ett_lcsap_imsi = -1;
+
+#include "packet-lcsap-ett.c"
+
+/* Global variables */
+static guint32 ProcedureCode;
+static guint32 ProtocolIE_ID;
+static guint32 ProtocolExtensionID;
+static guint32 PayloadType = -1;
+static guint gbl_lcsapSctpPort=SCTP_PORT_LCSAP;
+
+/* Dissector tables */
+static dissector_table_t lcsap_ies_dissector_table;
+
+static dissector_table_t lcsap_extension_dissector_table;
+static dissector_table_t lcsap_proc_imsg_dissector_table;
+static dissector_table_t lcsap_proc_sout_dissector_table;
+static dissector_table_t lcsap_proc_uout_dissector_table;
+
+static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
+
+static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
+static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
+static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
+static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *);
+
+
+/* 7.4.13 Positioning Data
+ * Coding of positioning method (bits 8-4)
+ */
+static const value_string lcsap_pos_method_vals[] = {
+ { 0x00, "Cell ID" },
+ { 0x01, "Reserved" },
+ { 0x02, "E-CID" },
+ { 0x03, "Reserved" },
+ { 0x04, "OTDOA" },
+ { 0x05, "Reserved" },
+ { 0x06, "Reserved" },
+ { 0x07, "Reserved" },
+ { 0x08, "U-TDOA" },
+ { 0x09, "Reserved" },
+ { 0x0a, "Reserved" },
+ { 0x0b, "Reserved" },
+ { 0x0c, "Reserved for other location technologies" },
+ { 0x0d, "Reserved for other location technologies" },
+ { 0x0e, "Reserved for other location technologies" },
+ { 0x0f, "Reserved for other location technologies" },
+ { 0x10, "Reserved for network specific positioning methods" },
+ { 0x11, "Reserved for network specific positioning methods" },
+ { 0x12, "Reserved for network specific positioning methods" },
+ { 0x13, "Reserved for network specific positioning methods" },
+ { 0x14, "Reserved for network specific positioning methods" },
+ { 0x15, "Reserved for network specific positioning methods" },
+ { 0x16, "Reserved for network specific positioning methods" },
+ { 0x17, "Reserved for network specific positioning methods" },
+ { 0x18, "Reserved for network specific positioning methods" },
+ { 0x19, "Reserved for network specific positioning methods" },
+ { 0x1a, "Reserved for network specific positioning methods" },
+ { 0x1b, "Reserved for network specific positioning methods" },
+ { 0x1c, "RReserved for network specific positioning methods" },
+ { 0x1d, "Reserved for network specific positioning methods" },
+ { 0x1e, "Reserved for network specific positioning methods" },
+ { 0x0f, "Reserved for network specific positioning methods" },
+ { 0, NULL }
+};
+
+/* Coding of usage (bits 3-1)*/
+static const value_string lcsap_pos_usage_vals[] = {
+ { 0x00, "Attempted unsuccessfully due to failure or interruption - not used" },
+ { 0x01, "Attempted successfully: results not used to generate location - not used." },
+ { 0x02, "Attempted successfully: results used to verify but not generate location - not used." },
+ { 0x03, "Attempted successfully: results used to generate location" },
+ { 0x04, "Attempted successfully: case where UE supports multiple mobile based positioning methods and the actual method or methods used by the UE cannot be determined." },
+ { 0x05, "Reserved" },
+ { 0x06, "Reserved" },
+ { 0x07, "Reserved" },
+ { 0, NULL }
+};
+
+/* Coding of Method (Bits 8-7) */
+static const value_string lcsap_gnss_pos_method_vals[] = {
+ { 0x00, "UE-Based" },
+ { 0x01, "UE-Assisted" },
+ { 0x02, "Conventional" },
+ { 0x03, "Reserved" },
+ { 0, NULL }
+};
+
+/* Coding of GNSS ID (Bits 6-4) */
+static const value_string lcsap_gnss_id_vals[] = {
+ { 0x00, "GPS" },
+ { 0x01, "Galileo" },
+ { 0x02, "SBAS" },
+ { 0x03, "Modernized GPS" },
+ { 0x04, "QZSS" },
+ { 0x05, "GLONASS" },
+ { 0x06, "Reserved" },
+ { 0x07, "Reserved" },
+ { 0, NULL }
+};
+
+/* Coding of usage (bits 3- 1) */
+static const value_string lcsap_gnss_pos_usage_vals[] = {
+ { 0x00, "Attempted unsuccessfully due to failure or interruption" },
+ { 0x01, "Attempted successfully: results not used to generate location" },
+ { 0x02, "Attempted successfully: results used to verify but not generate location" },
+ { 0x03, "Attempted successfully: results used to generate location" },
+ { 0x04, "Attempted successfully: case where UE supports multiple mobile based positioning methods and the actual method or methods used by the UE cannot be determined." },
+ { 0x05, "Reserved" },
+ { 0x06, "Reserved" },
+ { 0x07, "Reserved" },
+ { 0, NULL }
+};
+
+
+#include "packet-lcsap-fn.c"
+
+static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ return (dissector_try_uint(lcsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+}
+
+
+static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ return (dissector_try_uint(lcsap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+}
+
+static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ return (dissector_try_uint(lcsap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+}
+
+static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ return (dissector_try_uint(lcsap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+}
+
+static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ return (dissector_try_uint(lcsap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
+}
+
+
+static int
+dissect_lcsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ proto_item *lcsap_item = NULL;
+ proto_tree *lcsap_tree = NULL;
+
+ /* make entry in the Protocol column on summary display */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LCSAP");
+
+ /* create the lcsap protocol tree */
+ lcsap_item = proto_tree_add_item(tree, proto_lcsap, tvb, 0, -1, ENC_NA);
+ lcsap_tree = proto_item_add_subtree(lcsap_item, ett_lcsap);
+
+ dissect_LCS_AP_PDU_PDU(tvb, pinfo, lcsap_tree, NULL);
+ return tvb_captured_length(tvb);
+}
+
+/*--- proto_reg_handoff_lcsap ---------------------------------------*/
+void
+proto_reg_handoff_lcsap(void)
+{
+ static gboolean Initialized=FALSE;
+ static dissector_handle_t lcsap_handle;
+ static guint SctpPort;
+
+ if (!Initialized) {
+ lcsap_handle = find_dissector("lcsap");
+ lpp_handle = find_dissector("lpp");
+ lppa_handle = find_dissector("lppa");
+ dissector_add_for_decode_as("sctp.port", lcsap_handle); /* for "decode-as" */
+ dissector_add_uint("sctp.ppi", LCS_AP_PAYLOAD_PROTOCOL_ID, lcsap_handle);
+ Initialized=TRUE;
+#include "packet-lcsap-dis-tab.c"
+ } else {
+ if (SctpPort != 0) {
+ dissector_delete_uint("sctp.port", SctpPort, lcsap_handle);
+ }
+ }
+
+ SctpPort=gbl_lcsapSctpPort;
+ if (SctpPort != 0) {
+ dissector_add_uint("sctp.port", SctpPort, lcsap_handle);
+ }
+}
+
+/*--- proto_register_lcsap -------------------------------------------*/
+void proto_register_lcsap(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+ /* 7.4.13 Positioning Data */
+ { &hf_lcsap_pos_method,
+ { "Positioning Method", "lcsap.pos_method",
+ FT_UINT8, BASE_DEC, VALS(lcsap_pos_method_vals), 0xf8,
+ NULL, HFILL }
+ },
+ { &hf_lcsap_pos_usage,
+ { "Positioning usage", "lcsap.pos_usage",
+ FT_UINT8, BASE_DEC, VALS(lcsap_pos_usage_vals), 0x07,
+ NULL, HFILL }
+ },
+ { &hf_lcsap_gnss_pos_method,
+ { "GNSS Positioning Method", "lcsap.gnss_pos_method",
+ FT_UINT8, BASE_DEC, VALS(lcsap_gnss_pos_method_vals), 0xc0,
+ NULL, HFILL }
+ },
+ { &hf_lcsap_gnss_id,
+ { "GNSS ID", "lcsap.gnss_id",
+ FT_UINT8, BASE_DEC, VALS(lcsap_gnss_id_vals), 0x38,
+ NULL, HFILL }
+ },
+ { &hf_lcsap_gnss_pos_usage,
+ { "GNSS Positioning usage", "lcsap.gnss_pos_usage",
+ FT_UINT8, BASE_DEC, VALS(lcsap_gnss_pos_usage_vals), 0x07,
+ NULL, HFILL }
+ },
+
+#include "packet-lcsap-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+ &ett_lcsap,
+ &ett_lcsap_plmnd_id,
+ &ett_lcsap_imsi,
+#include "packet-lcsap-ettarr.c"
+ };
+
+ module_t *lcsap_module;
+
+ /* Register protocol */
+ proto_lcsap = proto_register_protocol(PNAME, PSNAME, PFNAME);
+
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_lcsap, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ register_dissector("lcsap", dissect_lcsap, proto_lcsap);
+
+ /* Register dissector tables */
+ lcsap_ies_dissector_table = register_dissector_table("lcsap.ies", "LCS-AP-PROTOCOL-IES", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
+
+
+ lcsap_extension_dissector_table = register_dissector_table("lcsap.extension", "LCS-AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
+ lcsap_proc_imsg_dissector_table = register_dissector_table("lcsap.proc.imsg", "LCS-AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
+ lcsap_proc_sout_dissector_table = register_dissector_table("lcsap.proc.sout", "LCS-AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
+ lcsap_proc_uout_dissector_table = register_dissector_table("lcsap.proc.uout", "LCS-AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE);
+
+ /* Register configuration options for ports */
+ lcsap_module = prefs_register_protocol(proto_lcsap, proto_reg_handoff_lcsap);
+
+ prefs_register_uint_preference(lcsap_module, "sctp.port",
+ "LCSAP SCTP Port",
+ "Set the SCTP port for LCSAP messages",
+ 10,
+ &gbl_lcsapSctpPort);
+
+}
+
+/*
+ * 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:
+ */
diff --git a/epan/dissectors/asn1/lcsap/packet-lcsap-template.h b/epan/dissectors/asn1/lcsap/packet-lcsap-template.h
new file mode 100644
index 0000000000..374dbc0754
--- /dev/null
+++ b/epan/dissectors/asn1/lcsap/packet-lcsap-template.h
@@ -0,0 +1,32 @@
+/* packet-lcsap.c
+ * Routines for LCS-AP packet dissembly.
+ *
+ * Copyright (c) 2011 by Spenser Sheng <spenser.sheng@ericsson.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * References:
+ * ETSI TS 129 171 V9.2.0 (2010-10)
+ */
+
+#ifndef PACKET_LCSAP_H
+#define PACKET_LCSAP_H
+
+#include "packet-lcsap-exp.h"
+
+#endif /* PACKET_LCSAP_H */