ASN.1 decoder

Κλειστό Αναρτήθηκε Apr 16, 2010 Πληρώθηκε κατά την παράδοση
Κλειστό Πληρώθηκε κατά την παράδοση

I have a ASN.1 description file for certain data. I would like to have program which decodes as per this asn1 file when I gave a hex-dump as an input. This hex-dump is encoded using the same asn1 description.

This program needs to be written in C language which I can compile on Linux platform.

## Deliverables

Here is the snippet from the ASN.1 file.

DEFINITIONS IMPLICIT TAGS ::=

BEGIN

-- EXPORTS everything

IMPORTS

CallDuration, CalledNumber, RecordType, CallingNumber, CallReferenceNumber, CellId, DefaultSMS-Handling, Diagnostics, Ext-GeographicalInformation, IMSI, IMEI, IPAddress, ISDN-AddressString, LCSCause, LCSClientExternalID, LCSClientIdentity, LCSClientInternalID, LCSClientType, LCS-Priority, LCSQoSInfo, LevelOfCAMELService, LocalSequenceNumber, LocationAreaAndCell, LocationAreaCode, LocationType, ManagementExtensions, MessageReference, MSISDN, NotificationToMSUser, PositioningData, RecordingEntity, ServiceKey, SMSResult, SmsTpDestinationNumber, TimeStamp

FROM GenericChargingDataTypes {itu-t (0) identified-organization (4) etsi(0) mobileDomain (0) charging (5) genericChargingDataTypes (0) asn1Module (0) version1 (0)}

DefaultGPRS-Handling, RAIdentity

FROM MAP-MS-DataTypes { itu-t identified-organization (4) etsi (0) mobileDomain (0)

gsm-Network (1) modules (3) map-MS-DataTypes (11) version6 (6)}

--

-- from TS 29.002 [60]

LocationMethod

FROM SS-DataTypes { itu-t identified-organization (4) etsi (0) mobileDomain (0) gsm-Access (2) modules (3) ss-DataTypes (2) version7 (7)}

--

-- from TS 24.080 [61]

MBMS2G3GIndicator, FileRepairSupported, MBMSServiceType, MBMSUserServiceType, RequiredMBMSBearerCapabilities, MBMSSessionIdentity, TMGI, MBMSInformation

FROM MBMSChargingDataTypes {itu-t (0) identified-organization (4) etsi(0) mobileDomain (0) charging (5) mbmsChargingDataTypes (8) asn1Module (0) version1 (0)}

Editor’s note: consider moving the above 2 items also into the generic module in order to avoid again copying from external sources.

;

------------------------------------------------------------------------------

--

-- GPRS RECORDS

--

------------------------------------------------------------------------------

GPRSRecord ::= CHOICE

--

-- Record values 20..27 are GPRS specific

-- Record value 70 is FBC specific

-- Record values 76..77 are GPRS and MBMS specific

{

sgsnPDPRecord [20] SGSNPDPRecord,

ggsnPDPRecord [21] GGSNPDPRecord,

sgsnMMRecord [22] SGSNMMRecord,

sgsnSMORecord [23] SGSNSMORecord,

sgsnSMTRecord [24] SGSNSMTRecord,

sgsnLCTRecord [25] SGSNLCTRecord,

sgsnLCORecord [26] SGSNLCORecord,

sgsnLCNRecord [27] SGSNLCNRecord,

--

egsnPDPRecord [70] EGSNPDPRecord,

--

sgsnMBMSRecord [76] SGSNMBMSRecord,

ggsnMBMSRecord [77] GGSNMBMSRecord

}

GGSNPDPRecord ::= SET

{

recordType [0] RecordType,

networkInitiation [1] NetworkInitiatedPDPContext OPTIONAL,

servedIMSI [3] IMSI,

ggsnAddress [4] GSNAddress,

chargingID [5] ChargingID,

sgsnAddress [6] SEQUENCE OF GSNAddress,

accessPointNameNI [7] AccessPointNameNI OPTIONAL,

pdpType [8] PDPType OPTIONAL,

servedPDPAddress [9] PDPAddress OPTIONAL,

dynamicAddressFlag [11] DynamicAddressFlag OPTIONAL,

listOfTrafficVolumes [12] SEQUENCE OF ChangeOfCharCondition OPTIONAL,

recordOpeningTime [13] TimeStamp,

duration [14] CallDuration,

causeForRecClosing [15] CauseForRecClosing,

diagnostics [16] Diagnostics OPTIONAL,

recordSequenceNumber [17] INTEGER OPTIONAL,

nodeID [18] NodeID OPTIONAL,

recordExtensions [19] ManagementExtensions OPTIONAL,

localSequenceNumber [20] LocalSequenceNumber OPTIONAL,

apnSelectionMode [21] APNSelectionMode OPTIONAL,

servedMSISDN [22] MSISDN OPTIONAL,

chargingCharacteristics [23] ChargingCharacteristics,

chChSelectionMode [24] ChChSelectionMode OPTIONAL,

iMSsignalingContext [25] NULL OPTIONAL,

externalChargingID [26] OCTET STRING OPTIONAL,

sgsnPLMNIdentifier [27] PLMN-Id OPTIONAL,

servedIMEISV [29] IMEI OPTIONAL,

rATType [30] RATType OPTIONAL,

mSTimeZone [31] MSTimeZone OPTIONAL,

userLocationInformation [32] OCTET STRING OPTIONAL,

cAMELChargingInformation [33] OCTET STRING OPTIONAL

}

EGSNPDPRecord ::= SET

{

recordType [0] RecordType,

networkInitiation [1] NetworkInitiatedPDPContext OPTIONAL,

servedIMSI [3] IMSI,

ggsnAddress [4] GSNAddress,

chargingID [5] ChargingID,

sgsnAddress [6] SEQUENCE OF GSNAddress,

accessPointNameNI [7] AccessPointNameNI OPTIONAL,

pdpType [8] PDPType OPTIONAL,

servedPDPAddress [9] PDPAddress OPTIONAL,

dynamicAddressFlag [11] DynamicAddressFlag OPTIONAL,

listOfTrafficVolumes [12] SEQUENCE OF ChangeOfCharCondition OPTIONAL,

recordOpeningTime [13] TimeStamp,

duration [14] CallDuration,

causeForRecClosing [15] CauseForRecClosing,

diagnostics [16] Diagnostics OPTIONAL,

recordSequenceNumber [17] INTEGER OPTIONAL,

nodeID [18] NodeID OPTIONAL,

recordExtensions [19] ManagementExtensions OPTIONAL,

localSequenceNumber [20] LocalSequenceNumber OPTIONAL,

apnSelectionMode [21] APNSelectionMode OPTIONAL,

servedMSISDN [22] MSISDN OPTIONAL,

chargingCharacteristics [23] ChargingCharacteristics,

chChSelectionMode [24] ChChSelectionMode OPTIONAL,

iMSsignalingContext [25] NULL OPTIONAL,

externalChargingID [26] OCTET STRING OPTIONAL,

sgsnPLMNIdentifier [27] PLMN-Id OPTIONAL,

pSFurnishChargingInformation [28] PSFurnishChargingInformation OPTIONAL,

servedIMEISV [29] IMEI OPTIONAL,

rATType [30] RATType OPTIONAL,

mSTimeZone [31] MSTimeZone OPTIONAL,

userLocationInformation [32] OCTET STRING OPTIONAL,

cAMELChargingInformation [33] OCTET STRING OPTIONAL,

listOfServiceData [34] SEQUENCE OF ChangeOfServiceCondition OPTIONAL

}

SGSNMMRecord ::= SET

{

recordType [0] RecordType,

servedIMSI [1] IMSI,

servedIMEI [2] IMEI OPTIONAL,

sgsnAddress [3] GSNAddress OPTIONAL,

msNetworkCapability [4] MSNetworkCapability OPTIONAL,

routingArea [5] RoutingAreaCode OPTIONAL,

locationAreaCode [6] LocationAreaCode OPTIONAL,

cellIdentifier [7] CellId OPTIONAL,

changeLocation [8] SEQUENCE OF ChangeLocation OPTIONAL,

recordOpeningTime [9] TimeStamp,

duration [10] CallDuration OPTIONAL,

sgsnChange [11] SGSNChange OPTIONAL,

causeForRecClosing [12] CauseForRecClosing,

diagnostics [13] Diagnostics OPTIONAL,

recordSequenceNumber [14] INTEGER OPTIONAL,

nodeID [15] NodeID OPTIONAL,

recordExtensions [16] ManagementExtensions OPTIONAL,

localSequenceNumber [17] LocalSequenceNumber OPTIONAL,

servedMSISDN [18] MSISDN OPTIONAL,

chargingCharacteristics [19] ChargingCharacteristics,

cAMELInformationMM [20] CAMELInformationMM OPTIONAL,

rATType [21] RATType OPTIONAL,

chChSelectionMode [22] ChChSelectionMode OPTIONAL,

cellPLMNId [23] PLMN-Id OPTIONAL

}

Here is a sample hex-dump which the program should be able to decode as per description above.

b5 82 00 57 80 00 40 01 13 83 08 21 43 65 87 09 21 03 f1 a4 06 80 04 00 50 0a 0b 08 0a 85 04 0c 10 01 25 a6 06 80 04 0a 0b 00 60 08 0a 8b 01 01 ac 82 00 18 30 82 00 14 83 01 00 00 70 84 01 00 85 01 02 86 09 10 04 13 20 16 18 2b 00 00 80 00 8d 09 10 04 13 20 16 15 2b 00 00 8e 01 03 8f 00 90 01 00 97 02 00 00

50 0a 0b 08 0a 85 04 0c 10 01 25 a6 06 80 04 0a 0b 00 60 08 0a 8b 01 01 ac 82 00 18 30 82 00 14 83 01 00 00 70 84 01 00 85 01 02 86 09 10 04 13 20 16 18 2b 00 00 80 00 8d 09 10 04 13 20 16 15 2b 00 00 8e 01 03 8f 00 90 01 00 97 02 00 00

** Note hex-dump and asn.1 file can be provided again if format is not correct over here.

Μηχανολογία MySQL PHP Αρχιτεκτονική Λογισμικού Δοκιμή Λογισμικού

Ταυτότητα Εργασίας: #3350072

Σχετικά με την εργασία

Απομακρυσμένη εργασία Ενεργό Apr 27, 2010