From a2ace4a6c4d9c98171020773feaf9aeae731b603 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Wed, 27 Oct 2004 20:08:44 +0000 Subject: [PATCH] Add a MAPdialouge dissector svn path=/trunk/; revision=12415 --- asn1/MAP_Dialouge/MAP_DialoguePDU.asn | 103 ++++++++++++++++++ asn1/MAP_Dialouge/MAP_DialoguePDU.cnf | 20 ++++ .../packet-MAP-DialoguePDU-template.c | 85 +++++++++++++++ .../packet-MAP-DialoguePDU-template.h | 31 ++++++ 4 files changed, 239 insertions(+) create mode 100644 asn1/MAP_Dialouge/MAP_DialoguePDU.asn create mode 100644 asn1/MAP_Dialouge/MAP_DialoguePDU.cnf create mode 100644 asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.c create mode 100644 asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.h diff --git a/asn1/MAP_Dialouge/MAP_DialoguePDU.asn b/asn1/MAP_Dialouge/MAP_DialoguePDU.asn new file mode 100644 index 0000000000..263085c9e4 --- /dev/null +++ b/asn1/MAP_Dialouge/MAP_DialoguePDU.asn @@ -0,0 +1,103 @@ +MAP-DialogueAS{ ccitt(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) 1 map-DialoguePDU(1) version1(1) } + +DEFINITIONS::= + +BEGIN + +MAP-DialoguePDU ::= CHOICE { + + map-open [0] IMPLICIT SEQUENCE { + + destinationReference [0] IMPLICIT DestinationReference OPTIONAL, + originationReference [1] IMPLICIT OriginationReference OPTIONAL, + ... }, + + map-accept [1] IMPLICIT SEQUENCE { + ... }, + map-close [2] IMPLICIT SEQUENCE { + ... }, + map-refuse [3] IMPLICIT SEQUENCE { + reason Reason, + ... }, + map-userAbort [4] IMPLICIT SEQUENCE { + map-UserAbortChoice MAP-UserAbortChoice, + ... }, + map-providerAbort [5] IMPLICIT SEQUENCE { + map-ProviderAbortReason MAP-ProviderAbortReason, + ... }} +-- Ethereal adaptation +ApplicationProcedureCancellation ::= ENUMERATED { + handoverCancellation (0), + radioChannelRelease (1), + networkPathRelease (2), + callRelease (3), + associatedProcedureFailure (4), + tandemDialogueRelease (5), + remoteOperationsFailure (6) +} + + +ResourceUnavailable ::= ENUMERATED { + shortTermResourceLimitation (0), + longTermResourceLimitation (1) +} +DestinationReference ::= OCTET STRING +OriginationReference ::= OCTET STRING +-- end ethereal adaptation + MAP-OpenInfo ::= SEQUENCE { + destinationReference [0] IMPLICIT DestinationReference OPTIONAL, + originationReference [1] IMPLICIT OriginationReference OPTIONAL, + ... } + + + MAP-AcceptInfo ::= SEQUENCE { + ... } + + + MAP-CloseInfo ::= SEQUENCE { + ... } + + + MAP-RefuseInfo ::= SEQUENCE { + reason Reason, + ... } + + Reason ::= ENUMERATED { + noReasonGiven (0), + invalidDestinationReference (1), + invalidOriginatingReference (2)} + + MAP-UserAbortInfo ::= SEQUENCE { + map-UserAbortChoice MAP-UserAbortChoice, + ... } + +MAP-UserAbortChoice ::= CHOICE { + userSpecificReason [0] IMPLICIT NULL, + userResourceLimitation [1] IMPLICIT NULL, + resourceUnavailable [2] IMPLICIT ResourceUnavailable, + applicationProcedureCancellation [3] IMPLICIT ApplicationProcedureCancellation +} + +ResourceUnavailableReason ::= ENUMERATED { + shortTermResourceLimitation (0), + longTermResourceLimitation (1) +} + +ProcedureCancellationReason ::= ENUMERATED { + handoverCancellation (0), + radioChannelRelease (1), + networkPathRelease (2), + callRelease (3), + associatedProcedureFailure (4), + tandemDialogueRelease (5), + remoteOperationsFailure (6) +} + +MAP-ProviderAbortInfo ::= SEQUENCE { + map-ProviderAbortReason MAP-ProviderAbortReason, +... } + +MAP-ProviderAbortReason ::= ENUMERATED { + abnormalDialogue (0), + invalidPDU (1)} +END \ No newline at end of file diff --git a/asn1/MAP_Dialouge/MAP_DialoguePDU.cnf b/asn1/MAP_Dialouge/MAP_DialoguePDU.cnf new file mode 100644 index 0000000000..d9ca6bb946 --- /dev/null +++ b/asn1/MAP_Dialouge/MAP_DialoguePDU.cnf @@ -0,0 +1,20 @@ +# gsm_map.cnf +# gsm_map conformation file + +# $Id: gsm_map.cnf 12205 2004-10-05 09:50:19Z etxrab $ + +#.MODULE_IMPORT + +#.EXPORTS + +#.PDU + +#.NO_EMIT + +#.TYPE_RENAME + +#.FIELD_RENAME + +#.END + + diff --git a/asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.c b/asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.c new file mode 100644 index 0000000000..45fee6ead8 --- /dev/null +++ b/asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.c @@ -0,0 +1,85 @@ +/* packet-MAP_DialoguePDU_asn1.c + * Routines for MAP_DialoguePDU packet dissection + * + * $Id: packet-MAP_DialoguePDU_asn1-template.c 12203 2004-10-05 09:18:55Z guy $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#include +#include + +#include "packet-ber.h" + +#define PNAME "MAP_DialoguePDU" +#define PSNAME "MAP_DialoguePDU" +#define PFNAME "MAP_DialoguePDU" + +/* Initialize the protocol and registered fields */ +int proto_MAP_DialoguePDU = -1; +#include "packet-MAP_DialoguePDU-hf.c" + +/* Initialize the subtree pointers */ +#include "packet-MAP_DialoguePDU-ett.c" + +#include "packet-MAP_DialoguePDU-fn.c" + +dissect_MAP_Dialogue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +{ + dissect_MAP_DialoguePDU_MAP_DialoguePDU(FALSE, tvb, 0, pinfo, parent_tree, -1); +} + +/*--- proto_register_MAP_DialoguePDU -------------------------------------------*/ +void proto_register_MAP_DialoguePDU(void) { + + /* List of fields */ + static hf_register_info hf[] = { +#include "packet-MAP_DialoguePDU-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { +#include "packet-MAP_DialoguePDU-ettarr.c" + }; + + /* Register protocol */ + proto_MAP_DialoguePDU = proto_register_protocol(PNAME, PSNAME, PFNAME); + register_dissector("MAP_DialoguePDU", dissect_MAP_Dialogue, proto_MAP_DialoguePDU); + /* Register fields and subtrees */ + proto_register_field_array(proto_MAP_DialoguePDU, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + + +/*--- proto_reg_handoff_MAP_DialoguePDU ---------------------------------------*/ +void proto_reg_handoff_MAP_DialoguePDU(void) { + register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_MAP_Dialogue, proto_MAP_DialoguePDU, + "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) map-DialoguePDU(1) version1(1)"); + +} + diff --git a/asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.h b/asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.h new file mode 100644 index 0000000000..04cdf2af5b --- /dev/null +++ b/asn1/MAP_Dialouge/packet-MAP-DialoguePDU-template.h @@ -0,0 +1,31 @@ +/* packet-pkinit.h + * Routines for MAP_DialoguePDU packet dissection + * + * $Id: packet-pkinit-template.h 12203 2004-10-05 09:18:55Z guy $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_MAP_DIALOUGEPDU_H +#define PACKET_GSM_MAP_H + +#include "packet-MAP_DialoguePDU-exp.h"*/ + +#endif /* PACKET_MAP_DIALOUGEPDU_H */ +