From e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:34:10 +0200 Subject: Adding upstream version 4.2.2. Signed-off-by: Daniel Baumann --- epan/dissectors/asn1/ilp/CMakeLists.txt | 35 + epan/dissectors/asn1/ilp/ILP-Components.asn | 852 +++++++++++++++++++++++++ epan/dissectors/asn1/ilp/ILP.asn | 419 ++++++++++++ epan/dissectors/asn1/ilp/ilp.cnf | 115 ++++ epan/dissectors/asn1/ilp/packet-ilp-template.c | 137 ++++ 5 files changed, 1558 insertions(+) create mode 100644 epan/dissectors/asn1/ilp/CMakeLists.txt create mode 100644 epan/dissectors/asn1/ilp/ILP-Components.asn create mode 100644 epan/dissectors/asn1/ilp/ILP.asn create mode 100644 epan/dissectors/asn1/ilp/ilp.cnf create mode 100644 epan/dissectors/asn1/ilp/packet-ilp-template.c (limited to 'epan/dissectors/asn1/ilp') diff --git a/epan/dissectors/asn1/ilp/CMakeLists.txt b/epan/dissectors/asn1/ilp/CMakeLists.txt new file mode 100644 index 00000000..955fc100 --- /dev/null +++ b/epan/dissectors/asn1/ilp/CMakeLists.txt @@ -0,0 +1,35 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +set( PROTOCOL_NAME ilp ) + +set( PROTO_OPT ) + +set( EXT_ASN_FILE_LIST +) + +set( ASN_FILE_LIST + ILP.asn + ILP-Components.asn +) + +set( EXTRA_DIST + ${ASN_FILE_LIST} + packet-${PROTOCOL_NAME}-template.c + ${PROTOCOL_NAME}.cnf +) + +set( SRC_FILES + ${EXTRA_DIST} + ${EXT_ASN_FILE_LIST} +) + +set( A2W_FLAGS ) + +ASN2WRS() diff --git a/epan/dissectors/asn1/ilp/ILP-Components.asn b/epan/dissectors/asn1/ilp/ILP-Components.asn new file mode 100644 index 00000000..5fab2d0f --- /dev/null +++ b/epan/dissectors/asn1/ilp/ILP-Components.asn @@ -0,0 +1,852 @@ +-- ILP.asn +-- +-- Taken from OMA Internal Location Protocol +-- http://member.openmobilealliance.org/ftp/Public_documents/LOC/Permanent_documents/OMA-TS-ILP-V2_0_4-20181213-A.zip +-- +-- 13.3 Common Elements +-- +ILP-Components DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS + Version, SessionID2, LocationId, PosTechnology, Position, StatusCode, + QoP, PosMethod, Velocity, PosPayLoad, SETCapabilities, SPCStatusCode, SPCSETKey, SPCTID, SPCSETKeylifetime, maxPosSize, UTRAN-GPSReferenceTimeResult, UTRAN-GANSSReferenceTimeResult, GNSSPosTechnology, UTRAN-GPSReferenceTimeAssistance, UTRAN-GANSSReferenceTimeAssistance, MultipleLocationIds, GANSSSignals; + +-- protocol version expressed as x.y.z (e.g., 5.1.0) +Version ::= SEQUENCE { + maj INTEGER(0..255), + min INTEGER(0..255), + servind INTEGER(0..255)} + +SessionID2 ::= SEQUENCE { + slcSessionID SlcSessionID, + setSessionID SetSessionID OPTIONAL, + spcSessionID SpcSessionID OPTIONAL + -- the semantics of OPTIONAL applies to the encoding only. + -- The parameter itself is MANDATORY. Since the spcSessionID is allocated by the SPC, + -- there is no spcSessionID to be transmitted in the ILP PREQ message. +} + +SetSessionID ::= SEQUENCE { + sessionId INTEGER(0..65535), + setId SETId +} + +SETId ::= CHOICE { + msisdn OCTET STRING(SIZE (8)), + mdn OCTET STRING(SIZE (8)), + min BIT STRING(SIZE (34)), -- coded according to TIA-553 + imsi OCTET STRING(SIZE (8)), + nai IA5String(SIZE (1..1000)), + iPAddress IPAddress, +..., + imei OCTET STRING(SIZE (8))} +-- msisdn, mnd, imsi and imei are a BCD (Binary Coded Decimal) string +-- represent digits from 0 through 9, +-- two digits per octet, each digit encoded 0000 to 1001 (0 to 9) +-- bits 8765 of octet n encoding digit 2n +-- bits 4321 of octet n encoding digit 2(n-1) +1 +-- not used digits in the string shall be filled with 1111 +-- imei SHALL NOT be used unless the SLP indicates support for SUPL ver 2.0.3 +-- or greater + +SlcSessionID ::= SEQUENCE { + sessionID OCTET STRING(SIZE (4)), + slcId NodeAddress +} + +SpcSessionID ::= SEQUENCE { + sessionID OCTET STRING(SIZE (4)), + spcId NodeAddress +} + +IPAddress ::= CHOICE { + ipv4Address OCTET STRING(SIZE (4)), + ipv6Address OCTET STRING(SIZE (16)) +} + +NodeAddress ::= CHOICE { + iPAddress IPAddress, + fqdn FQDN, +...} + +FQDN ::= VisibleString(FROM ("a".."z" | "A".."Z" | "0".."9" |".-"))(SIZE (1..255)) + +LocationId ::= SEQUENCE { + cellInfo CellInfo, + status Status, +...} + +Status ::= ENUMERATED {stale(0), current(1), unknown(2), ...} + +MultipleLocationIds ::= SEQUENCE SIZE (1..maxLidSize) OF LocationIdData + +LocationIdData ::= SEQUENCE { + locationId LocationId, + relativetimestamp RelativeTime OPTIONAL, -- if relativetimestamp is present, then data represents historical measurement, if absent, data represents current measurements + servingFlag BOOLEAN, -- if "true" measurements represent serving cell +...} +-- status in locationId indicates whether cellInfo is current or stale relative to timestamp + +RelativeTime ::= INTEGER (0..65535) -- relative time to "current" Location Id in multiples of 0.01sec + +maxLidSize INTEGER ::= 64 + + +SETCapabilities ::= SEQUENCE { + posTechnology PosTechnology, + prefMethod PrefMethod, + posProtocol PosProtocol, + supportedBearers SupportedBearers OPTIONAL, +...} + +PosTechnology ::= SEQUENCE { + agpsSETassisted BOOLEAN, + agpsSETBased BOOLEAN, + autonomousGPS BOOLEAN, + aflt BOOLEAN, + ecid BOOLEAN, + eotd BOOLEAN, + otdoa BOOLEAN, + gANSSPositionMethods GANSSPositionMethods OPTIONAL, +..., + additionalPositioningMethods AdditionalPositioningMethods OPTIONAL} + +GANSSPositionMethods ::= SEQUENCE (SIZE(1..16)) OF GANSSPositionMethod + +GANSSPositionMethod ::= SEQUENCE { + ganssId INTEGER(0..15), -- coding according to parameter definition in Section 12.14 + ganssSBASid BIT STRING(SIZE(3)) OPTIONAL, --coding according to parameter definition in section 12.14 + gANSSPositioningMethodTypes GANSSPositioningMethodTypes, + gANSSSignals GANSSSignals, +...} + +GANSSPositioningMethodTypes ::= SEQUENCE { + setAssisted BOOLEAN, + setBased BOOLEAN, + autonomous BOOLEAN, +...} + +-- indicates MS support for particular GANSS signals and frequencies +-- coding according to parameter definition in Section 12.14 +GANSSSignals ::= BIT STRING { + signal1 (0), + signal2 (1), + signal3 (2), + signal4 (3), + signal5 (4), + signal6 (5), + signal7 (6), + signal8 (7)} (SIZE (1..8)) + +AdditionalPositioningMethods ::= SEQUENCE (SIZE(1..8)) OF AddPosSupport-Element + +AddPosSupport-Element ::= SEQUENCE { + addPosID ENUMERATED { + mBS, + ... + }, + addPosMode BIT STRING { + standalone (0), + setBased (1), + setAssisted (2)} (SIZE (1..8)) OPTIONAL, +...} + +PrefMethod ::= ENUMERATED { + agnssSETAssistedPreferred, agnssSETBasedPreferred, noPreference, +...} +-- Note: In ULP V2.0, the names of the enumerations are +-- kept the same as in ULP V1.0. ie. Agps in the TS ULP actually shall be +-- interpreted as agnss. This means that agpsSETassistedPreferred and +-- agpsSETBasedPreferred in ULP V2.0 map to agnssSETAssistedPreferred and +-- agnssSETBasedPreferred in ILP. + +PosProtocol ::= SEQUENCE { + tia801 BOOLEAN, + rrlp BOOLEAN, + rrc BOOLEAN, + lpp BOOLEAN, + posProtocolVersionRRLP PosProtocolVersion3GPP OPTIONAL, + posProtocolVersionRRC PosProtocolVersion3GPP OPTIONAL, + posProtocolVersionTIA801 PosProtocolVersion3GPP2 OPTIONAL, + posProtocolVersionLPP PosProtocolVersion3GPP OPTIONAL, + ..., + lppe BOOLEAN OPTIONAL, + posProtocolVersionLPPe PosProtocolVersionOMA OPTIONAL} + +PosProtocolVersion3GPP ::= SEQUENCE { + majorVersionField INTEGER(0..255), + technicalVersionField INTEGER(0..255), + editorialVersionField INTEGER(0..255), +...} + +PosProtocolVersion3GPP2 ::= SEQUENCE (SIZE(1..8)) OF Supported3GPP2PosProtocolVersion + +Supported3GPP2PosProtocolVersion ::= SEQUENCE { + revisionNumber BIT STRING(SIZE (6)), -- the location standard revision number the SET supports coded according to 3GPP2 C.S0022 + pointReleaseNumber INTEGER(0..255), + internalEditLevel INTEGER(0..255), +...} + +PosProtocolVersionOMA ::= SEQUENCE { + majorVersionField INTEGER(0..255), + minorVersionField INTEGER(0..255), +...} + +SupportedBearers ::= SEQUENCE { + gsm BOOLEAN, + wcdma BOOLEAN, + lte BOOLEAN, + cdma BOOLEAN, + hprd BOOLEAN, + umb BOOLEAN, + wlan BOOLEAN, + wiMAX BOOLEAN, +..., + nr BOOLEAN } + +CellInfo ::= CHOICE { + gsmCell GsmCellInformation, + wcdmaCell WcdmaCellInformation, --WCDMA Cell Information/TD-SCDMA Cell Information + cdmaCell CdmaCellInformation, + hrpdCell HrpdCellInformation, + umbCell UmbCellInformation, + lteCell LteCellInformation, + wlanAP WlanAPInformation, + wimaxBS WimaxBSInformation, +..., + nrCell NRCellInformation +} + +UTRAN-GPSReferenceTimeResult ::= SEQUENCE { +-- For ue-GPSTimingOfCell values above 37158911999999 are not +-- used in this version of the specification +-- Actual value utran-GPSTimingOfCell = (ms-part * 4294967296) + ls-part +-- used on the uplink i.e. reported by the SET to the SLP + set-GPSTimingOfCell SEQUENCE { + ms-part INTEGER (0.. 16383), + ls-part INTEGER (0..4294967295)}, + modeSpecificInfo CHOICE { + fdd SEQUENCE { + referenceIdentity PrimaryCPICH-Info}, + tdd SEQUENCE { + referenceIdentity CellParametersID} + }, + sfn INTEGER (0..4095), + gpsReferenceTimeUncertainty INTEGER (0..127) OPTIONAL, +...} + +UTRAN-GANSSReferenceTimeResult ::= SEQUENCE { + ganssTimeID INTEGER (0..15), + set-GANSSReferenceTime SET-GANSSReferenceTime, +...} + +SET-GANSSReferenceTime ::= SEQUENCE { + +-- Actual value [ns] = (ms-Part * 4294967296 + ls-Part) * 250 +-- Actual values [ns] > 86399999999750 are reserved and are considered a +-- protocol error + set-GANSSTimingOfCell SEQUENCE { + ms-part INTEGER (0..80), + ls-part INTEGER (0..4294967295)} OPTIONAL, + modeSpecificInfo CHOICE { + fdd SEQUENCE { + referenceIdentity PrimaryCPICH-Info}, + tdd SEQUENCE { + referenceIdentity CellParametersID}} OPTIONAL, + sfn INTEGER (0..4095), + ganss-TODUncertainty INTEGER (0..127) OPTIONAL, +...} + +GNSSPosTechnology ::= SEQUENCE { + gps BOOLEAN, + galileo BOOLEAN, + sbas BOOLEAN, + modernized-gps BOOLEAN, + qzss BOOLEAN, + glonass BOOLEAN, +..., + bds BOOLEAN OPTIONAL} + +Position ::= SEQUENCE { + timestamp UTCTime, -- shall include seconds and shall use UTC time. + positionEstimate PositionEstimate, + velocity Velocity OPTIONAL, +...} + +PositionEstimate ::= SEQUENCE { + latitudeSign ENUMERATED {north, south}, + latitude INTEGER(0..8388607), + longitude INTEGER(-8388608..8388607), + uncertainty + SEQUENCE {uncertaintySemiMajor INTEGER(0..127), + uncertaintySemiMinor INTEGER(0..127), + orientationMajorAxis INTEGER(0..180)} OPTIONAL, -- angle in degree between major axis and North + confidence INTEGER(0..100) OPTIONAL, + altitudeInfo AltitudeInfo OPTIONAL, +...} -- Coding as in [3GPP GAD] + +AltitudeInfo ::= SEQUENCE { + altitudeDirection ENUMERATED {height, depth}, + altitude INTEGER(0..32767), + altUncertainty INTEGER(0..127), +...} -- based on 3GPP TS 23.032 + +CdmaCellInformation ::= SEQUENCE { + refNID INTEGER(0..65535), -- Network Id + refSID INTEGER(0..32767), -- System Id + refBASEID INTEGER(0..65535), -- Base Station Id + refBASELAT INTEGER(0..4194303), -- Base Station Latitude + reBASELONG INTEGER(0..8388607), -- Base Station Longitude + refREFPN INTEGER(0..511), -- Base Station PN Code + refWeekNumber INTEGER(0..65535), -- GPS Week Number + refSeconds INTEGER(0..4194303), -- GPS Seconds +...} + +GsmCellInformation ::= SEQUENCE { + refMCC INTEGER(0..999), -- Mobile Country Code + refMNC INTEGER(0..999), -- Mobile Network Code + refLAC INTEGER(0..65535), -- Location area code + refCI INTEGER(0..65535), -- Cell identity + nmr NMR OPTIONAL, + ta INTEGER(0..255) OPTIONAL, --Timing Advance +...} + +WcdmaCellInformation ::= SEQUENCE { + refMCC INTEGER(0..999), -- Mobile Country Code + refMNC INTEGER(0..999), -- Mobile Network Code + refUC INTEGER(0..268435455), -- Cell identity + frequencyInfo FrequencyInfo OPTIONAL, + primaryScramblingCode INTEGER(0..511) OPTIONAL, -- Not applicable for TDD + measuredResultsList MeasuredResultsList OPTIONAL, + cellParametersId INTEGER(0..127) OPTIONAL, -- Not applicable for FDD + timingAdvance TimingAdvance OPTIONAL, -- Not applicable for FDD +...} + +TimingAdvance ::= SEQUENCE { + ta INTEGER (0..8191), + tAResolution TAResolution OPTIONAL, --If missing, resolution is 0.125 chips + chipRate ChipRate OPTIONAL, --If missing, chip rate is 1.28 Mchip/s +...} + +TAResolution ::= ENUMERATED {res10chip(0),res05chip(1),res0125chip(2), ...} -- Corresponding to 1.0-chip, 0.5-chip and 0.125-chip resolutions, respectively + +ChipRate ::= ENUMERATED {tdd128(0),tdd384(1), tdd768(2), ...} -- Corresponding to 1.28-Mchips/s, 3.84-Mchips/s and 7.68-Mchips/s chip rates, respectively + +HrpdCellInformation ::= SEQUENCE { + refSECTORID BIT STRING(SIZE (128)) OPTIONAL, -- HRPD Sector Id + refBASELAT INTEGER(0..4194303), -- Base Station Latitude + reBASELONG INTEGER(0..8388607), -- Base Station Longitude + refWeekNumber INTEGER(0..65535), -- GPS Week Number + refSeconds INTEGER(0..4194303), -- GPS Seconds + ...} + +UmbCellInformation ::= SEQUENCE { + refSECTORID BIT STRING(SIZE (128)), -- UMB Sector Id + refMCC INTEGER(0..999), -- Mobile Country Code + refMNC INTEGER(0..999), -- Mobile Network Code + refBASELAT INTEGER(0..4194303), -- Base Station Latitude + reBASELONG INTEGER(0..8388607), -- Base Station Longitude + refWeekNumber INTEGER(0..65535), -- GPS Week Number + refSeconds INTEGER(0..4194303), -- GPS Seconds + ...} + +-- LTE Cell info per 3GPP TS 36.331. +-- If not otherwise stated info is related to serving cell + +LteCellInformation ::= SEQUENCE { + cellGlobalIdEUTRA CellGlobalIdEUTRA, + physCellId PhysCellId, + trackingAreaCode TrackingAreaCode, + rsrpResult RSRP-Range OPTIONAL, + rsrqResult RSRQ-Range OPTIONAL, + ta INTEGER(0..1282) OPTIONAL, -- Currently used Timing Advance value (N_TA/16 as per [3GPP 36.213]) + measResultListEUTRA MeasResultListEUTRA OPTIONAL, -- Neighbour measurements + ..., + earfcn INTEGER(0..65535) OPTIONAL, -- see Table 24 + earfcn-ext INTEGER (65536..262143) OPTIONAL, -- see Table 24 + rsrpResult-ext RSRP-Range-Ext OPTIONAL, + rsrqResult-ext RSRQ-Range-Ext OPTIONAL, + rs-sinrResult RS-SINR-Range OPTIONAL, + servingInformation5G ServingInformation5G OPTIONAL +} +-- If rsrpResult-ext is included, rsrpResult shall be excluded or set to 0 +-- If rsrqResult-ext is included and in the range 0 to 34, rsrqResult shall +-- be included and set equal to rsrqResult-ext +-- If rsrqResult-ext is included and outside the range 0 to 34, rsrqResult shall +-- be excluded or set to 0 when rsrqResult-ext is negative or to 34 when +-- rsrqResult-ext is positive +-- servingInformation5G shall be included for a serving cell connected to 5GCN + +-- Measured results of neighbours cells per 3GPP TS 36.331 + +MeasResultListEUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultEUTRA + +MeasResultEUTRA ::= SEQUENCE { + physCellId PhysCellId, + cgi-Info SEQUENCE { + cellGlobalId CellGlobalIdEUTRA, + trackingAreaCode TrackingAreaCode + } OPTIONAL, + measResult SEQUENCE { + rsrpResult RSRP-Range OPTIONAL, -- Mapping to measured values + rsrqResult RSRQ-Range OPTIONAL, -- in 3GPP TS 36.133 + ..., + earfcn INTEGER(0..65535) OPTIONAL, -- see Table 24 + earfcn-ext INTEGER (65536..262143) OPTIONAL, -- see Table 24 +rsrpResult-ext RSRP-Range-Ext OPTIONAL, +rsrqResult-ext RSRQ-Range-Ext OPTIONAL, +rs-sinrResult RS-SINR-Range OPTIONAL, +neighbourInformation5G NeighbourInformation5G OPTIONAL + } +} +-- If rsrpResult-ext is included, rsrpResult shall be excluded or set to 0 +-- If rsrqResult-ext is included and in the range 0 to 34, rsrqResult shall +-- be included and set equal to rsrqResult-ext +-- If rsrqResult-ext is included and outside the range 0 to 34, rsrqResult shall +-- be excluded or set to 0 when rsrqResult-ext is negative or to 34 when +-- rsrqResult-ext is positive +-- neighbourInformation5G may only be included for a cell connected to 5GCN + +PhysCellId ::= INTEGER (0..503) + +TrackingAreaCode ::= BIT STRING (SIZE (16)) + +CellGlobalIdEUTRA ::= SEQUENCE { + plmn-Identity PLMN-Identity, + cellIdentity CellIdentity, + ... +} + +PLMN-Identity ::= SEQUENCE { + mcc MCC OPTIONAL, + mnc MNC +} + +CellIdentity ::= BIT STRING (SIZE (28)) + +MCC ::= SEQUENCE (SIZE (3)) OF +MCC-MNC-Digit + +MNC ::= SEQUENCE (SIZE (2..3)) OF + MCC-MNC-Digit + +MCC-MNC-Digit ::= INTEGER (0..9) + +RSRP-Range ::= INTEGER(0..97) +RSRQ-Range ::= INTEGER(0..34) +RSRP-Range-Ext ::= INTEGER(-17..-1) +RSRQ-Range-Ext ::= INTEGER(-30..46) +RS-SINR-Range ::= INTEGER(0..127) + +ServingInformation5G ::= SEQUENCE { + trackingAreaCode TrackingAreaCodeNR, + ... +} + +NeighbourInformation5G ::= SEQUENCE { + trackingAreaCode TrackingAreaCodeNR OPTIONAL, + ... +} +maxCellReport INTEGER ::= 8 + +WlanAPInformation ::= SEQUENCE { -- as per [IEEE 802.11] + apMACAddress BIT STRING(SIZE (48)), -- AP MAC Address + apTransmitPower INTEGER(-127..128) OPTIONAL, -- AP transmit power in dbm + apAntennaGain INTEGER(-127..128) OPTIONAL, -- AP antenna gain in dBi + apSignaltoNoise INTEGER(-127..128) OPTIONAL, -- AP S/N received at SET + apDeviceType ENUMERATED {wlan802-11a(0), wlan802-11b(1), wlan802-11g(2), ..., wlan802-11n(3), wlan802-11ac(4), wlan802-11ad(5)} OPTIONAL, + apSignalStrength INTEGER(-127..128) OPTIONAL, -- AP signal strength at SET + apChannelFrequency INTEGER(0..256) OPTIONAL, -- AP channel/frequency of Tx/Rx + apRoundTripDelay RTD OPTIONAL, -- Round Trip Delay between SET and AP + setTransmitPower INTEGER(-127..128) OPTIONAL, -- SET transmit power in dBm + setAntennaGain INTEGER (-127..128) OPTIONAL, -- SET antenna gain in dBi + setSignaltoNoise INTEGER (-127..128) OPTIONAL, -- SET S/N received at AP + setSignalStrength INTEGER(-127..128) OPTIONAL, -- SET signal strength at AP + apReportedLocation ReportedLocation OPTIONAL, -- AP Location reported by AP (legacy encoding) + ..., + apRepLocation RepLocation OPTIONAL, -- AP Location reported by AP + apSignalStrengthDelta INTEGER (0..1) OPTIONAL, -- see Table 28 + apSignaltoNoiseDelta INTEGER (0..1) OPTIONAL, -- see Table 28 + setSignalStrengthDelta INTEGER (0..1) OPTIONAL, -- see Table 28 + setSignaltoNoiseDelta INTEGER (0..1) OPTIONAL, -- see Table 28 + operatingClass INTEGER (0..255) OPTIONAL, + apSSID OCTET STRING (SIZE (1..32)) OPTIONAL, + apPHYType ENUMERATED {unknown(0), any(1), fhss(2), dsss(3), irbaseband(4), ofdm(5), hrdsss(6), erp(7), ht(8), ihv(9), ...} OPTIONAL, + setMACAddress BIT STRING(SIZE (48)) OPTIONAL -- MAC Address used by SET to connect to AP +} + +RTD ::= SEQUENCE { -- as per [IEEE 802.11] + rTDValue INTEGER(0..16777216), -- measured RTD value corresponding to about 500km in units of 1/10 of nanoseconds + rTDUnits RTDUnits, -- units of RTD + rTDAccuracy INTEGER(0..255) OPTIONAL, -- RTD accuracy + ...} + +RTDUnits ::= ENUMERATED { + microseconds(0), hundredsofnanoseconds(1), tensofnanoseconds(2), nanoseconds(3), tenthsofnanoseconds(4), ...} + +ReportedLocation ::= SEQUENCE { -- as per 802.11v + locationEncodingDescriptor LocationEncodingDescriptor, + locationData LocationData, -- location data field + ...} + +LocationEncodingDescriptor ::= ENUMERATED { + lci(0),asn1(1), ...} + +LocationData ::= SEQUENCE { + locationAccuracy INTEGER(0..4294967295) OPTIONAL, + locationValue OCTET STRING (SIZE(1..128)), + ...} + +RepLocation ::= CHOICE { + lciLocData LciLocData, -- location data field as per [IEEE 802.11] and [RFC 3825] + ... -- future formats may be added here +} + +LciLocData ::= SEQUENCE { + locationDataLCI LocationDataLCI OPTIONAL, +...} + +LocationDataLCI ::= SEQUENCE { + latitudeResolution BIT STRING (SIZE (6)), + latitude BIT STRING (SIZE (34)), + longitudeResolution BIT STRING (SIZE (6)), + longitude BIT STRING (SIZE (34)), + altitudeType BIT STRING (SIZE (4)), + altitudeResolution BIT STRING (SIZE (6)), + altitude BIT STRING (SIZE (30)), + datum BIT STRING (SIZE (8)), +...} + +WimaxBSInformation ::= SEQUENCE { + wimaxBsID WimaxBsID, -- WiMax serving base station ID + wimaxRTD WimaxRTD OPTIONAL, -- Round Trip Delay measurements + wimaxNMRList WimaxNMRList OPTIONAL, -- Network measurements + ...} + +WimaxBsID ::= SEQUENCE { + bsID-MSB BIT STRING (SIZE(24)) OPTIONAL, + bsID-LSB BIT STRING (SIZE(24)), +...} +-- if only LSB is present, MSB is assumed to be identical to the current serving BS or clamped on network value + +WimaxRTD ::= SEQUENCE { + rtd INTEGER (0..65535), -- Round trip delay of serving BS in units of 10 ns + rTDstd INTEGER (0..1023) OPTIONAL, -- Standard deviation of round trip delay in units of 10 ns +...} + +WimaxNMRList ::= SEQUENCE (SIZE (1..maxWimaxBSMeas)) OF WimaxNMR + +WimaxNMR ::= SEQUENCE { + wimaxBsID WimaxBsID, -- WiMax BS ID for the measurement + relDelay INTEGER (-32768..32767) OPTIONAL, -- Relative delay for this neighbouring BSs to the serving cell in units of 10 ns + relDelaystd INTEGER (0..1023) OPTIONAL, -- Standard deviation of Relative delay in units of 10 ns + rssi INTEGER (0..255) OPTIONAL, -- RSSI in 0.25 dBm steps, starting from -103.75 dBm + rSSIstd INTEGER (0..63) OPTIONAL, -- Standard deviation of RSSI in dB + bSTxPower INTEGER (0..255) OPTIONAL, -- BS transmit power in 0.25 dBm steps, starting from -103.75 dBm + cinr INTEGER (0..255) OPTIONAL, -- in dB + cINRstd INTEGER (0..63) OPTIONAL, -- Standard deviation of CINR in dB + bSLocation ReportedLocation OPTIONAL, -- Reported location of the BS +...} + +maxWimaxBSMeas INTEGER ::= 32 + +NRCellInformation ::= SEQUENCE { + servingCellInformation ServingCellInformationNR, --Serving cell information + measuredResultsListNR MeasResultListNR OPTIONAL, --Neighbour measurements + ... +} + +-- Information for serving cells per 3GPP TS 38.331 + +ServingCellInformationNR ::= SEQUENCE (SIZE (1..maxNRServingCell)) OF ServCellNR +-- The first listed serving cell shall be the primary cell + +ServCellNR ::= SEQUENCE { + physCellId PhysCellIdNR, + arfcn-NR ARFCN-NR, + cellGlobalId CellGlobalIdNR, + trackingAreaCode TrackingAreaCodeNR, + ssb-Measurements NR-Measurements OPTIONAL, + csi-rs-Measurements NR-Measurements OPTIONAL, + ta INTEGER(0..3846) OPTIONAL, --Timing Advance value + ... +} + +-- Measured results of neighbours cells per 3GPP TS 38.331 + +MeasResultListNR ::= SEQUENCE (SIZE (1..maxCellReportNR)) OF MeasResultNR + +MeasResultNR ::= SEQUENCE { + physCellId PhysCellIdNR, + arfcn-NR ARFCN-NR, + cellGlobalId CellGlobalIdNR OPTIONAL, + trackingAreaCode TrackingAreaCodeNR OPTIONAL, + ssb-Measurements NR-Measurements OPTIONAL, + csi-rs-Measurements NR-Measurements OPTIONAL, + ... +} + +PhysCellIdNR ::= INTEGER (0..1007) + +ARFCN-NR ::= INTEGER (0.. 3279165) + +TrackingAreaCodeNR ::= BIT STRING (SIZE (24)) + +CellGlobalIdNR ::= SEQUENCE { + plmn-Identity PLMN-Identity, + cellIdentityNR CellIdentityNR, + ... +} + +CellIdentityNR ::= BIT STRING (SIZE (36)) + +NR-Measurements ::= SEQUENCE { + rsrp-Range INTEGER (0..127) OPTIONAL, + rsrq-Range INTEGER (0..127) OPTIONAL, + sinr-Range INTEGER (0..127) OPTIONAL, + ... +} + +maxNRServingCell INTEGER ::= 32 +maxCellReportNR INTEGER ::= 32 + +FrequencyInfo ::= SEQUENCE { + modeSpecificInfo CHOICE {fdd FrequencyInfoFDD, + tdd FrequencyInfoTDD, + ...}, + ...} + +FrequencyInfoFDD ::= SEQUENCE { + uarfcn-UL UARFCN OPTIONAL, + uarfcn-DL UARFCN, + ...} + +FrequencyInfoTDD ::= SEQUENCE {uarfcn-Nt UARFCN, + ...} + +UARFCN ::= INTEGER(0..16383) + +NMR ::= SEQUENCE (SIZE (1..15)) OF NMRelement + +NMRelement ::= SEQUENCE { + arfcn INTEGER(0..1023), + bsic INTEGER(0..63), + rxLev INTEGER(0..63), +...} + +MeasuredResultsList ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasuredResults + +MeasuredResults ::= SEQUENCE { + frequencyInfo FrequencyInfo OPTIONAL, + utra-CarrierRSSI UTRA-CarrierRSSI OPTIONAL, + cellMeasuredResultsList CellMeasuredResultsList OPTIONAL} + +CellMeasuredResultsList ::= + SEQUENCE (SIZE (1..maxCellMeas)) OF CellMeasuredResults + +-- SPARE: UTRA-CarrierRSSI, Max = 76 +-- Values above Max are spare +UTRA-CarrierRSSI ::= INTEGER(0..127) + +CellMeasuredResults ::= SEQUENCE { + cellIdentity INTEGER(0..268435455) OPTIONAL, + modeSpecificInfo + CHOICE {fdd + SEQUENCE {primaryCPICH-Info PrimaryCPICH-Info, + cpich-Ec-N0 CPICH-Ec-N0 OPTIONAL, + cpich-RSCP CPICH-RSCP OPTIONAL, + pathloss Pathloss OPTIONAL}, + tdd + SEQUENCE {cellParametersID CellParametersID, + proposedTGSN TGSN OPTIONAL, + primaryCCPCH-RSCP PrimaryCCPCH-RSCP OPTIONAL, + pathloss Pathloss OPTIONAL, + timeslotISCP-List TimeslotISCP-List OPTIONAL + -- NOTE: TimeSlotISCP measurement list cannot be interpreted without the knowledge of Cell Info as defined in [3GPP RRC]. +}}} + +CellParametersID ::= INTEGER(0..127) + +TGSN ::= INTEGER(0..14) + +PrimaryCCPCH-RSCP ::= INTEGER(0..127) + +-- SPARE: TimeslotISCP, Max = 91 +-- Values above Max are spare +TimeslotISCP ::= INTEGER(0..127) + +TimeslotISCP-List ::= SEQUENCE (SIZE (1..maxTS)) OF TimeslotISCP + +PrimaryCPICH-Info ::= SEQUENCE {primaryScramblingCode INTEGER(0..511)} + +-- SPARE: CPICH-Ec-No, Max = 49 +-- Values above Max are spare +CPICH-Ec-N0 ::= INTEGER(0..63) + +-- SPARE: CPICH- RSCP, data range from 0 to 91 and from 123 to 127. +-- Values from 92 to 122 are spare +-- the encoding of cpich-RSCP is (as per 25.331 V5.11.0) +-- cpich-RSCP = 123 CPICH RSCP <-120 dBm +-- cpich-RSCP = 124 -120 ? CPICH RSCP < -119 dBm +-- cpich-RSCP = 125 -119 ? CPICH RSCP < -118 dBm +-- cpich-RSCP = 126 -118 ? CPICH RSCP < -117 dBm +-- cpich-RSCP = 127 -117 ? CPICH RSCP < -116 dBm +-- cpich-RSCP = 0 -116 ? CPICH RSCP < -115 dBm +-- cpich-RSCP = 1 -115 ? CPICH RSCP < -114 dBm +-- ... ... ... +-- cpich-RSCP = 89 -27 ? CPICH RSCP < -26 dBm +-- cpich-RSCP = 90 -26 ? CPICH RSCP < -25 dBm +-- cpich-RSCP = 91 -25 ? CPICH RSCP dBm + +CPICH-RSCP ::= INTEGER(0..127) + +-- SPARE: Pathloss, Max = 158 +-- Values above Max are spare +Pathloss ::= INTEGER(46..173) + +maxCellMeas INTEGER ::= 32 + +maxFreq INTEGER ::= 8 + +maxTS INTEGER ::= 14 + +UTRAN-GPSReferenceTimeAssistance ::= SEQUENCE { + utran-GPSReferenceTime UTRAN-GPSReferenceTime, + gpsReferenceTimeUncertainty INTEGER (0..127) OPTIONAL, + utranGPSDriftRate UTRANGPSDriftRate OPTIONAL} + +UTRAN-GPSReferenceTime ::= SEQUENCE { + -- For utran-GPSTimingOfCell values above 2322431999999 are not + -- used in this version of the specification + -- Actual value utran-GPSTimingOfCell = (ms-part * 4294967296) + ls-part + -- used on the downlink i.e. sent from the SLP to the SET + utran-GPSTimingOfCell SEQUENCE { + ms-part INTEGER (0..1023), + ls-part INTEGER (0..4294967295) + }, + modeSpecificInfo CHOICE { + fdd SEQUENCE { + referenceIdentity PrimaryCPICH-Info}, + tdd SEQUENCE { + referenceIdentity CellParametersID}} OPTIONAL, + sfn INTEGER (0..4095) +} + +UTRANGPSDriftRate ::= ENUMERATED { + utran-GPSDrift0, utran-GPSDrift1, utran-GPSDrift2, + utran-GPSDrift5, utran-GPSDrift10, utran-GPSDrift15, + utran-GPSDrift25, utran-GPSDrift50, utran-GPSDrift-1, + utran-GPSDrift-2, utran-GPSDrift-5, utran-GPSDrift-10, + utran-GPSDrift-15, utran-GPSDrift-25, utran-GPSDrift-50 +} + +UTRAN-GANSSReferenceTimeAssistance ::= SEQUENCE { + ganssTimeID INTEGER (0..15), + utran-GANSSReferenceTime UTRAN-GANSSReferenceTime, + ganssDay INTEGER (0..8191) OPTIONAL, + utranGANSSDriftRate UTRANGANSSDriftRate OPTIONAL +} + +UTRAN-GANSSReferenceTime ::= SEQUENCE { + ganssTOD INTEGER (0..86399), + utran-GANSSTimingOfCell INTEGER (0..3999999) OPTIONAL, + modeSpecificInfo CHOICE { + fdd SEQUENCE { + referenceIdentity PrimaryCPICH-Info}, + tdd SEQUENCE { + referenceIdentity CellParametersID}} OPTIONAL, + sfn INTEGER (0..4095), + ganss-TODUncertainty INTEGER (0..127) OPTIONAL, +...} + +UTRANGANSSDriftRate ::= ENUMERATED { + utran-GANSSDrift0, utran-GANSSDrift1, utran-GANSSDrift2, + utran-GANSSDrift5, utran-GANSSDrift10, utran-GANSSDrift15, + utran-GANSSDrift25, utran-GANSSDrift50, utran-GANSSDrift-1, + utran-GANSSDrift-2, utran-GANSSDrift-5, utran-GANSSDrift-10, + utran-GANSSDrift-15, utran-GANSSDrift-25, utran-GANSSDrift-50} + +StatusCode ::= ENUMERATED { + unspecified(0), systemFailure(1), unexpectedMessage(2), protocolError(3), + dataMissing(4), unexpectedDataValue(5), posMethodFailure(6), + posMethodMismatch(7), posProtocolMismatch(8), targetSETnotReachable(9), + versionNotSupported(10), resourceShortage(11), invalidSessionId(12), + nonProxyModeNotSupported(13), proxyModeNotSupported(14), + positioningNotPermitted(15), iLPTimeout(16), + ...} + +QoP ::= SEQUENCE { + horacc INTEGER(0..127), + veracc INTEGER(0..127) OPTIONAL, -- as defined in 3GPP TS 23.032 "uncertainty altitude" + maxLocAge INTEGER(0..65535) OPTIONAL, + delay INTEGER(0..7) OPTIONAL, -- as defined in 3GPP TS 44.031 +..., + ver2-responseTime INTEGER (1..128) OPTIONAL} + +Velocity ::= CHOICE { -- velocity definition as per 23.032 + horvel Horvel, + horandvervel Horandvervel, + horveluncert Horveluncert, + horandveruncert Horandveruncert, +...} + +Horvel ::= SEQUENCE { + bearing BIT STRING(SIZE (9)), + horspeed BIT STRING(SIZE (16)), +...} + +Horandvervel ::= SEQUENCE { + verdirect BIT STRING(SIZE (1)), + bearing BIT STRING(SIZE (9)), + horspeed BIT STRING(SIZE (16)), + verspeed BIT STRING(SIZE (8)), +...} + +Horveluncert ::= SEQUENCE { + bearing BIT STRING(SIZE (9)), + horspeed BIT STRING(SIZE (16)), + uncertspeed BIT STRING(SIZE (8)), +...} + +Horandveruncert ::= SEQUENCE { + verdirect BIT STRING(SIZE (1)), + bearing BIT STRING(SIZE (9)), + horspeed BIT STRING(SIZE (16)), + verspeed BIT STRING(SIZE (8)), + horuncertspeed BIT STRING(SIZE (8)), + veruncertspeed BIT STRING(SIZE (8)), +...} + +PosMethod ::= ENUMERATED { + agpsSETassisted(0), agpsSETbased(1), agpsSETassistedpref(2), + agpsSETbasedpref(3), autonomousGPS(4), aflt(5), ecid(6), eotd(7), otdoa(8), agnssSETassisted(9), agnssSETbased(10), agnssSETassistedpref(11), agnssSETbasedpref(12), autonomousGNSS(13), +..., ver2-mbs(14)} + +SPCSETKey ::= BIT STRING(SIZE (128)) + +SPCTID ::= SEQUENCE { + rand BIT STRING(SIZE (128)), + slpFQDN FQDN, +...} + +SPCSETKeylifetime ::= INTEGER (1..24) -- units in hours + + +PosPayLoad ::= CHOICE { + rrcPayload OCTET STRING(SIZE (1..8192)), + rrlpPayload OCTET STRING(SIZE (1..8192)), + multiPosPayload MultiPosPayLoad, +...} + +MultiPosPayLoad ::= SEQUENCE { + lPPPayload SEQUENCE (SIZE (1..3)) OF OCTET STRING(SIZE (1..60000)) OPTIONAL, + tia801Payload SEQUENCE (SIZE (1..3)) OF OCTET STRING(SIZE (1..60000)) OPTIONAL, +...} + +SPCStatusCode ::= ENUMERATED {operational(0), notOperational(1), reducedAvailability(2), + ...} + +maxPosSize INTEGER ::= 1024 + +END diff --git a/epan/dissectors/asn1/ilp/ILP.asn b/epan/dissectors/asn1/ilp/ILP.asn new file mode 100644 index 00000000..11dfd4f2 --- /dev/null +++ b/epan/dissectors/asn1/ilp/ILP.asn @@ -0,0 +1,419 @@ +-- ILP.asn +-- +-- Taken from OMA Internal Location Protocol +-- http://member.openmobilealliance.org/ftp/Public_documents/LOC/Permanent_documents/OMA-TS-ILP-V2_0_4-20181213-A.zip +-- +-- 13.1 Common Part +-- +ILP DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + Version, SessionID2 + FROM ILP-Components + PREQ + FROM ILP-PREQ + PRES + FROM ILP-PRES + PRPT + FROM ILP-PRPT + PLREQ + FROM ILP-PLREQ + PLRES + FROM ILP-PLRES + PINIT + FROM ILP-PINIT + PAUTH + FROM ILP-PAUTH + PALIVE + FROM ILP-PALIVE + PEND + FROM ILP-PEND + PMESS + FROM ILP-PMESS; + +-- general ILP PDU layout; +ILP-PDU ::= SEQUENCE { + length INTEGER(0..65535), + version Version, + sessionID2 SessionID2, + message IlpMessage +} + +IlpMessage ::= CHOICE { + msPREQ PREQ, + msPRES PRES, + msPRPT PRPT, + msPLREQ PLREQ, + msPLRES PLRES, + msPINIT PINIT, + msPAUTH PAUTH, + msPALIVE PALIVE, + msPEND PEND, + msPMESS PMESS, +...} + +END + +-- +-- 13.2.1 PREQ +-- +ILP-PREQ DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PREQ; + +IMPORTS LocationId, Position, QoP, SPCSETKey, SPCTID, SPCSETKeylifetime, MultipleLocationIds, PosTechnology, SETCapabilities + FROM ILP-Components; + +PREQ ::= SEQUENCE { + sLPMode SLPMode, + approvedPosMethods PosTechnology OPTIONAL, + locationId LocationId OPTIONAL, + multipleLocationIds MultipleLocationIds OPTIONAL, + position Position OPTIONAL, + triggerParams TriggerParams OPTIONAL, + sPCSETKey SPCSETKey OPTIONAL, + spctid SPCTID OPTIONAL, + sPCSETKeylifetime SPCSETKeylifetime OPTIONAL, + qoP QoP OPTIONAL, + sETCapabilities SETCapabilities OPTIONAL, + notificationMode NotificationMode OPTIONAL, +...} + +SLPMode ::= ENUMERATED {proxy(0), nonProxy(1)} + +TriggerParams ::= SEQUENCE { + triggerType TriggerType, + periodicTriggerParams PeriodicTriggerParams OPTIONAL, +...} + +TriggerType ::= ENUMERATED { + periodic(0), areaEvent(1), +...} + +PeriodicTriggerParams ::= SEQUENCE{ + numberOfFixes INTEGER(1..8639999), + intervalBetweenFixes INTEGER(1..8639999), + startTime INTEGER(0..2678400) OPTIONAL, +...} +-- intervalBetweenFixes and startTime are in seconds. +-- numberOfFixes * intervalBetweenFixes shall not exceed 8639999 +-- (100 days in seconds) for compatibility with OMA MLP and RLP +-- startTime is in relative time in units of seconds measured from "now" +-- a value of 0 signifies "now", a value of "startTime" signifies startTime +-- seconds from "now" + +NotificationMode ::= ENUMERATED {normal(0), basedOnLocation(1), ...} + +END + +-- +-- 13.2.2 PRES +-- +ILP-PRES DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PRES; + +IMPORTS Position, SPCStatusCode, PosTechnology, PosMethod, GNSSPosTechnology + FROM ILP-Components; + +PRES ::= SEQUENCE { + preferredPosMethod PosMethod OPTIONAL, + gnssPosTechnology GNSSPosTechnology OPTIONAL, + supportedPosMethods PosTechnology OPTIONAL, + position Position OPTIONAL, + sPCstatusCode SPCStatusCode OPTIONAL, +...} + +END + +-- +-- 13.2.3 PRPT +-- +ILP-PRPT DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PRPT; + +IMPORTS Position, StatusCode + FROM ILP-Components; + +PRPT ::= SEQUENCE { + position Position, + fixNumber INTEGER(1.. 8639999) OPTIONAL, + statusCode StatusCode OPTIONAL, +...} + +END + +-- +-- 13.2.4 PLREQ +-- +ILP-PLREQ DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PLREQ; + +IMPORTS LocationId, MultipleLocationIds + FROM ILP-Components; + +PLREQ ::= SEQUENCE { + locationId LocationId, + multipleLocationIds MultipleLocationIds OPTIONAL, +...} + +END + +-- +-- 13.2.5 PLRES +-- +ILP-PLRES DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PLRES; + +IMPORTS Position, StatusCode, maxPosSize + FROM ILP-Components; + +PLRES ::= SEQUENCE { + positionResults PositionResults, +...} + +PositionResults ::= SEQUENCE SIZE (1..maxPosSize) OF PositionResult + +PositionResult ::= CHOICE { + position Position, + statusCode StatusCode, +...} + +END + +-- +-- 13.2.6 PINIT +-- +ILP-PINIT DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PINIT; + +IMPORTS + LocationId, Position, PosMethod, MultipleLocationIds, PosPayLoad, SETCapabilities, UTRAN-GPSReferenceTimeResult, UTRAN-GANSSReferenceTimeResult, GNSSPosTechnology, GANSSSignals + FROM ILP-Components; + +PINIT ::= SEQUENCE { + sETCapabilities SETCapabilities, + locationId LocationId, + posMethod PosMethod OPTIONAL, + requestedAssistData RequestedAssistData OPTIONAL, + position Position OPTIONAL, + posPayLoad PosPayLoad OPTIONAL, + multipleLocationIds MultipleLocationIds OPTIONAL, + utran-GPSReferenceTimeResult UTRAN-GPSReferenceTimeResult OPTIONAL, + utran-GANSSReferenceTimeResult UTRAN-GANSSReferenceTimeResult OPTIONAL, + gnssPosTechnology GNSSPosTechnology OPTIONAL, +...} + +RequestedAssistData ::= SEQUENCE { + almanacRequested BOOLEAN, + utcModelRequested BOOLEAN, + ionosphericModelRequested BOOLEAN, + dgpsCorrectionsRequested BOOLEAN, + referenceLocationRequested BOOLEAN, -- Note: Used also for GANSS + referenceTimeRequested BOOLEAN, + acquisitionAssistanceRequested BOOLEAN, + realTimeIntegrityRequested BOOLEAN, + navigationModelRequested BOOLEAN, + navigationModelData NavigationModel OPTIONAL, + ganssRequestedCommonAssistanceDataList GanssRequestedCommonAssistanceDataList OPTIONAL, + ganssRequestedGenericAssistanceDataList GanssRequestedGenericAssistanceDataList OPTIONAL, + extendedEphemeris ExtendedEphemeris OPTIONAL, + extendedEphemerisCheck ExtendedEphCheck OPTIONAL, +...} + +ExtendedEphemeris ::= SEQUENCE { + validity INTEGER (1..256), -- Requested validity in 4 hour steps +...} + +ExtendedEphCheck ::= SEQUENCE { + beginTime GPSTime, -- Begin time of ephemeris extension held by SET + endTime GPSTime, -- End time of ephemeris extension held by SET +...} + +GPSTime ::= SEQUENCE { + gPSWeek INTEGER (0..1023), + gPSTOWhour INTEGER (0..167), +...} + +GanssRequestedCommonAssistanceDataList ::= SEQUENCE { + ganssReferenceTime BOOLEAN, + ganssIonosphericModel BOOLEAN, + ganssAdditionalIonosphericModelForDataID00 BOOLEAN, + ganssAdditionalIonosphericModelForDataID11 BOOLEAN, + ganssEarthOrientationParameters BOOLEAN, +..., + ganssAdditionalIonosphericModelForDataID01 BOOLEAN OPTIONAL} + +GanssRequestedGenericAssistanceDataList ::= SEQUENCE(SIZE(1..maxGANSS)) OF GanssReqGenericData + +GanssReqGenericData ::= SEQUENCE { + ganssId INTEGER(0..15), -- coding according to parameter definition in Section 12.14 + ganssSBASid BIT STRING(SIZE(3)) OPTIONAL, --coding according to parameter definition in section 12.14 + ganssRealTimeIntegrity BOOLEAN OPTIONAL, + ganssDifferentialCorrection DGANSS-Sig-Id-Req OPTIONAL, + ganssAlmanac BOOLEAN, + ganssNavigationModelData GanssNavigationModelData OPTIONAL, + ganssTimeModels BIT STRING(SIZE(16)) OPTIONAL, + ganssReferenceMeasurementInfo BOOLEAN, + ganssDataBits GanssDataBits OPTIONAL, + ganssUTCModel BOOLEAN, + ganssAdditionalDataChoices GanssAdditionalDataChoices OPTIONAL, + ganssAuxiliaryInformation BOOLEAN, + ganssExtendedEphemeris ExtendedEphemeris OPTIONAL, + ganssExtendedEphemerisCheck GanssExtendedEphCheck OPTIONAL, +..., + bds-DifferentialCorrection BDS-Sig-Id-Req OPTIONAL, + bds-GridModelReq BOOLEAN OPTIONAL} + +DGANSS-Sig-Id-Req ::= BIT STRING (SIZE(8)) -- coding according to parameter definition in Section 12.15 + +BDS-Sig-Id-Req ::= BIT STRING (SIZE(8)) -- coding according to parameter definition in section 12.15 + +GanssNavigationModelData ::= SEQUENCE { + ganssWeek INTEGER(0..4095), + ganssToe INTEGER(0..167), + t-toeLimit INTEGER(0..10), + satellitesListRelatedDataList SatellitesListRelatedDataList OPTIONAL, +...} + +SatellitesListRelatedDataList ::= SEQUENCE(SIZE(0..maxGANSSSat)) OF SatellitesListRelatedData + +SatellitesListRelatedData ::= SEQUENCE { + satId INTEGER(0..63), + iod INTEGER(0..1023), +...} + +maxGANSS INTEGER ::= 16 +maxGANSSSat INTEGER ::= 32 + +GanssDataBits ::= SEQUENCE { + ganssTODmin INTEGER (0..59), + reqDataBitAssistanceList ReqDataBitAssistanceList, +...} + +ReqDataBitAssistanceList ::= SEQUENCE { + gnssSignals GANSSSignals, + ganssDataBitInterval INTEGER (0..15), + ganssDataBitSatList SEQUENCE (SIZE(1..maxGANSSSat)) OF INTEGER (0..63) OPTIONAL, +...} + +GanssAdditionalDataChoices ::= SEQUENCE { + orbitModelID INTEGER(0..7) OPTIONAL, + clockModelID INTEGER(0..7) OPTIONAL, + utcModelID INTEGER(0..7) OPTIONAL, + almanacModelID INTEGER(0..7) OPTIONAL, +...} + +GanssExtendedEphCheck ::= SEQUENCE { + beginTime GANSSextEphTime, -- Begin time of ephemeris extension held by SET + endTime GANSSextEphTime, -- End time of ephemeris extension held by SET +...} + +GANSSextEphTime ::= SEQUENCE { + gANSSday INTEGER (0..8191), + gANSSTODhour INTEGER (0..23), +...} + +NavigationModel ::= SEQUENCE { + gpsWeek INTEGER(0..1023), + gpsToe INTEGER(0..167), + nsat INTEGER(0..31), + toeLimit INTEGER(0..10), + satInfo SatelliteInfo OPTIONAL, +...} + +SatelliteInfo ::= SEQUENCE (SIZE (1..31)) OF SatelliteInfoElement + +SatelliteInfoElement ::= SEQUENCE { + satId INTEGER(0..63), + iode INTEGER(0..255), +...} + +END + +-- +-- 13.2.7 PAUTH +-- +ILP-PAUTH DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PAUTH; + +IMPORTS SPCSETKey, SPCTID, SPCSETKeylifetime + FROM ILP-Components; + +PAUTH ::= SEQUENCE { + sPCSETKey SPCSETKey, + spctid SPCTID, + sPCSETKeylifetime SPCSETKeylifetime OPTIONAL, +...} + +END + +-- +-- 13.2.8 PALIVE +-- +ILP-PALIVE DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PALIVE; + +IMPORTS SPCStatusCode + FROM ILP-Components; + +PALIVE ::= SEQUENCE { + sPCStatusCode SPCStatusCode OPTIONAL, +...} + +END + +-- +-- 13.2.9 PEND +-- +ILP-PEND DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PEND; + +IMPORTS Position, StatusCode + FROM ILP-Components; + +PEND ::= SEQUENCE { + position Position OPTIONAL, + statusCode StatusCode OPTIONAL, +...} + +END + +-- +-- 13.2.10 PMESS +-- +ILP-PMESS DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +EXPORTS PMESS; + +IMPORTS Velocity, PosPayLoad, UTRAN-GPSReferenceTimeResult, UTRAN-GANSSReferenceTimeResult, UTRAN-GPSReferenceTimeAssistance, UTRAN-GANSSReferenceTimeAssistance + FROM ILP-Components; + +PMESS ::= SEQUENCE { + posPayLoad PosPayLoad, + velocity Velocity OPTIONAL, + utran-GPSReferenceTimeAssistance UTRAN-GPSReferenceTimeAssistance OPTIONAL, + utran-GPSReferenceTimeResult UTRAN-GPSReferenceTimeResult OPTIONAL, + utran-GANSSReferenceTimeAssistance UTRAN-GANSSReferenceTimeAssistance OPTIONAL, + utran-GANSSReferenceTimeResult UTRAN-GANSSReferenceTimeResult OPTIONAL, + ...} + +END diff --git a/epan/dissectors/asn1/ilp/ilp.cnf b/epan/dissectors/asn1/ilp/ilp.cnf new file mode 100644 index 00000000..093b51ac --- /dev/null +++ b/epan/dissectors/asn1/ilp/ilp.cnf @@ -0,0 +1,115 @@ +# ilp.cnf +# ilp conformation file +# Copyright 2013 e.yimjia + +#.OPT +PER +UNALIGNED +#.END + +#.PDU +ILP-PDU +#.END + + +#.TYPE_RENAME +FrequencyInfo/modeSpecificInfo FrequencySpecificInfo +#.END + +#.FIELD_RENAME +FrequencyInfo/modeSpecificInfo modeSpecificFrequencyInfo +FrequencyInfo/modeSpecificInfo/fdd fdd_fr +FrequencyInfo/modeSpecificInfo/tdd tdd_fr +SETId/min minsi +LocationDataLCI/latitude LocationDataLCI_latitude +LocationDataLCI/longitude LocationDataLCI_longitude +LocationDataLCI/altitude LocationDataLCI_altitude +CellGlobalIdEUTRA/cellIdentity eutra_cellIdentity + +#.FIELD_ATTR +SETId/min ABBREV=minsi +LocationDataLCI/latitude ABBREV=locationdatalci.latitude +LocationDataLCI/latitude ABBREV=locationdatalci.longitude +LocationDataLCI/altitude ABBREV=locationdatalci.altitude +CellGlobalIdEUTRA/cellIdentity ABBREV=cellglobalideutra.cellIdentity + + +#.END + +#.FN_HDR ILP-PDU + proto_item *it; + proto_tree *ilp_tree; + + it = proto_tree_add_item(tree, proto_ilp, tvb, 0, -1, ENC_NA); + ilp_tree = proto_item_add_subtree(it, ett_ilp); + + col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME); + col_clear(actx->pinfo->cinfo, COL_INFO); +#.END + +#.FN_BODY ILP-PDU TREE=ilp_tree +%(DEFAULT_BODY)s +#.END + +#.FN_BODY IlpMessage VAL_PTR = &IlpMessage + +guint32 IlpMessage; + + %(DEFAULT_BODY)s + + col_append_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "%%s ", val_to_str_const(IlpMessage,ilp_IlpMessage_vals,"Unknown")); + +#.END + +#.FN_BODY PosPayLoad/rrlpPayload VAL_PTR = &rrlp_tvb + tvbuff_t *rrlp_tvb; + +%(DEFAULT_BODY)s + + if (rrlp_tvb && rrlp_handle) { + call_dissector(rrlp_handle, rrlp_tvb, %(ACTX)s->pinfo, tree); + } + +#.FN_BODY MultiPosPayLoad/lPPPayload/_item VAL_PTR = &lpp_tvb + tvbuff_t *lpp_tvb; + +%(DEFAULT_BODY)s + + if (lpp_tvb && lpp_handle) { + call_dissector(lpp_handle, lpp_tvb, %(ACTX)s->pinfo, tree); + } + +#.FN_BODY SETId/msisdn VAL_PTR=&msisdn_tvb + tvbuff_t *msisdn_tvb; +%(DEFAULT_BODY)s + if (msisdn_tvb) { + proto_tree *subtree; + + subtree = proto_item_add_subtree(actx->created_item, ett_ilp_setid); + dissect_e164_msisdn(msisdn_tvb, subtree, 0, 8, E164_ENC_BCD); + } + +#.FN_BODY SETId/mdn VAL_PTR=&mdn_tvb + tvbuff_t *mdn_tvb; +%(DEFAULT_BODY)s + if (mdn_tvb) { + proto_tree *subtree; + + subtree = proto_item_add_subtree(actx->created_item, ett_ilp_setid); + proto_tree_add_item(subtree, hf_ilp_mobile_directory_number, mdn_tvb, 0, 8, ENC_BCD_DIGITS_0_9); + } + +#.FN_BODY SETId/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_ilp_setid); + dissect_e212_imsi(imsi_tvb, actx->pinfo, subtree, 0, 8, FALSE); + } + +#.TYPE_ATTR +IPAddress/ipv4Address TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL +IPAddress/ipv6Address TYPE = FT_IPv6 DISPLAY = BASE_NONE STRINGS = NULL +#.END diff --git a/epan/dissectors/asn1/ilp/packet-ilp-template.c b/epan/dissectors/asn1/ilp/packet-ilp-template.c new file mode 100644 index 00000000..48cd9386 --- /dev/null +++ b/epan/dissectors/asn1/ilp/packet-ilp-template.c @@ -0,0 +1,137 @@ +/* packet-ilp.c + * Routines for OMA Internal Location Protocol packet dissection + * Copyright 2006, e.yimjia + * Copyright 2019, Pascal Quantin + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * ref OMA-TS-ILP-V2_0_4-20181213-A + * http://www.openmobilealliance.org + */ + +#include "config.h" + +#include +#include +#include + +#include "packet-per.h" +#include "packet-tcp.h" +#include "packet-gsm_map.h" +#include "packet-e164.h" +#include "packet-e212.h" + +#define PNAME "OMA Internal Location Protocol" +#define PSNAME "ILP" +#define PFNAME "ilp" + +void proto_register_ilp(void); + +static dissector_handle_t rrlp_handle; +static dissector_handle_t lpp_handle; +static dissector_handle_t ilp_tcp_handle; + + +/* IANA Registered Ports + * oma-ilp 7276/tcp OMA Internal Location + */ +#define ILP_TCP_PORT 7276 + +/* Initialize the protocol and registered fields */ +static int proto_ilp = -1; + + +#define ILP_HEADER_SIZE 2 + +static gboolean ilp_desegment = TRUE; + +#include "packet-ilp-hf.c" +static int hf_ilp_mobile_directory_number = -1; + +/* Initialize the subtree pointers */ +static gint ett_ilp = -1; +static gint ett_ilp_setid = -1; +#include "packet-ilp-ett.c" + +/* Include constants */ +#include "packet-ilp-val.h" + + +#include "packet-ilp-fn.c" + + +static guint +get_ilp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) +{ + /* PDU length = Message length */ + return tvb_get_ntohs(tvb,offset); +} + +static int +dissect_ilp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) +{ + tcp_dissect_pdus(tvb, pinfo, tree, ilp_desegment, ILP_HEADER_SIZE, + get_ilp_pdu_len, dissect_ILP_PDU_PDU, data); + return tvb_captured_length(tvb); +} + +void proto_reg_handoff_ilp(void); + +/*--- proto_register_ilp -------------------------------------------*/ +void proto_register_ilp(void) { + + /* List of fields */ + static hf_register_info hf[] = { + +#include "packet-ilp-hfarr.c" + { &hf_ilp_mobile_directory_number, + { "Mobile Directory Number", "ilp.mobile_directory_number", + FT_STRING, BASE_NONE, NULL, 0, + NULL, HFILL }}, + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_ilp, + &ett_ilp_setid, +#include "packet-ilp-ettarr.c" + }; + + module_t *ilp_module; + + + /* Register protocol */ + proto_ilp = proto_register_protocol(PNAME, PSNAME, PFNAME); + ilp_tcp_handle = register_dissector("ilp", dissect_ilp_tcp, proto_ilp); + + /* Register fields and subtrees */ + proto_register_field_array(proto_ilp, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + ilp_module = prefs_register_protocol(proto_ilp, NULL); + + prefs_register_bool_preference(ilp_module, "desegment_ilp_messages", + "Reassemble ILP messages spanning multiple TCP segments", + "Whether the ILP dissector should reassemble messages spanning multiple TCP segments." + " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", + &ilp_desegment); +} + + +/*--- proto_reg_handoff_ilp ---------------------------------------*/ +void +proto_reg_handoff_ilp(void) +{ + dissector_handle_t ilp_pdu_handle; + + ilp_pdu_handle = create_dissector_handle(dissect_ILP_PDU_PDU, proto_ilp); + rrlp_handle = find_dissector_add_dependency("rrlp", proto_ilp); + lpp_handle = find_dissector_add_dependency("lpp", proto_ilp); + + dissector_add_string("media_type","application/oma-supl-ilp", ilp_pdu_handle); + dissector_add_uint_with_preference("tcp.port", ILP_TCP_PORT, ilp_tcp_handle); +} -- cgit v1.2.3