diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/CMakeLists.txt | 2 | ||||
-rw-r--r-- | epan/dissectors/asn1/CMakeLists.txt | 1 | ||||
-rw-r--r-- | epan/dissectors/asn1/rspro/CMakeLists.txt | 31 | ||||
-rw-r--r-- | epan/dissectors/asn1/rspro/RSPRO.asn | 347 | ||||
-rw-r--r-- | epan/dissectors/asn1/rspro/packet-rspro-template.c | 95 | ||||
-rw-r--r-- | epan/dissectors/asn1/rspro/packet-rspro-template.h | 16 | ||||
-rw-r--r-- | epan/dissectors/asn1/rspro/rspro.cnf | 28 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_ipa.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-rspro.c | 1232 | ||||
-rw-r--r-- | epan/dissectors/packet-rspro.h | 24 |
10 files changed, 1778 insertions, 0 deletions
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt index 55d7c043f5..f2590b8f62 100644 --- a/epan/dissectors/CMakeLists.txt +++ b/epan/dissectors/CMakeLists.txt @@ -172,6 +172,7 @@ set(CLEAN_ASN1_DISSECTOR_SRC ${CMAKE_CURRENT_SOURCE_DIR}/packet-ros.c ${CMAKE_CURRENT_SOURCE_DIR}/packet-rrc.c ${CMAKE_CURRENT_SOURCE_DIR}/packet-rrlp.c + ${CMAKE_CURRENT_SOURCE_DIR}/packet-rspro.c ${CMAKE_CURRENT_SOURCE_DIR}/packet-rtse.c ${CMAKE_CURRENT_SOURCE_DIR}/packet-rua.c ${CMAKE_CURRENT_SOURCE_DIR}/packet-s1ap.c @@ -554,6 +555,7 @@ set(DISSECTOR_PUBLIC_HEADERS packet-rpcrdma.h packet-rrc.h packet-rsvp.h + packet-rspro.h packet-rtcp.h packet-rtp.h packet-rtp-events.h diff --git a/epan/dissectors/asn1/CMakeLists.txt b/epan/dissectors/asn1/CMakeLists.txt index 5aec3bcb4c..d3734c02ec 100644 --- a/epan/dissectors/asn1/CMakeLists.txt +++ b/epan/dissectors/asn1/CMakeLists.txt @@ -109,6 +109,7 @@ set(ASN1_SRC_DIRS ros rrc rrlp + rspro rtse rua s1ap diff --git a/epan/dissectors/asn1/rspro/CMakeLists.txt b/epan/dissectors/asn1/rspro/CMakeLists.txt new file mode 100644 index 0000000000..99316d5d92 --- /dev/null +++ b/epan/dissectors/asn1/rspro/CMakeLists.txt @@ -0,0 +1,31 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +set( PROTOCOL_NAME rspro ) + +set( PROTO_OPT ) + +set( ASN_FILE_LIST + RSPRO.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/rspro/RSPRO.asn b/epan/dissectors/asn1/rspro/RSPRO.asn new file mode 100644 index 0000000000..6141c534a6 --- /dev/null +++ b/epan/dissectors/asn1/rspro/RSPRO.asn @@ -0,0 +1,347 @@ +---------------------------------------------------------------------- +-- RSPRO - Remote SIM Protocol, part of Osmocom Remote SIM Suite +-- (C) 2018 by Harald Welte <laforge@gnumonks.org> +-- All Rights Reserved +-- +-- SPDX-License-Identifier: GPL-2.0+ +-- +-- 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. +-- +---------------------------------------------------------------------- + +RSPRO DEFINITIONS + +IMPLICIT TAGS + +::= + +BEGIN + +EXPORTS + RsproPDU +; + +---------------------------------------------------------------------- +-- Elementary Data Types +---------------------------------------------------------------------- + +-- Some random ID the requestor can chose and which the client echos back in a response. +-- This allows multiple outstanding commands in flight and matching of responses to requests. +OperationTag ::= INTEGER(0..2147483647) + +-- Unique identifier of a given SIM bank +BankId ::= INTEGER(0..1023) + +-- Unique identifier of a given client (modem) +ClientId ::= INTEGER(0..1023) + +ComponentType ::= ENUMERATED { + -- client: Modems / Phones + remsimClient (0), + -- server: Coordination + remsimServer (1), + -- bank daemon: SIM cards + remsimBankd (2) +} +ComponentName ::= IA5String (SIZE (1..32)) +ComponentIdentity ::= SEQUENCE { + type ComponentType, + name ComponentName, + software [0] ComponentName, + swVersion [1] ComponentName, + hwManufacturer [2] ComponentName OPTIONAL, + hwModel [3] ComponentName OPTIONAL, + hwSerialNr [4] ComponentName OPTIONAL, + hwVersion [5] ComponentName OPTIONAL, + fwVersion [6] ComponentName OPTIONAL, + ... +} + +-- IP address / port details +Ipv4Address ::= OCTET STRING (SIZE (4)) +Ipv6Address ::= OCTET STRING (SIZE (16)) +IpAddress ::= CHOICE { + ipv4 [0] Ipv4Address, + ipv6 [1] Ipv6Address +} +PortNumber ::= INTEGER (0..65535) +IpPort ::= SEQUENCE { + ip IpAddress, + port PortNumber +} + +-- Result of a given operation +ResultCode ::= ENUMERATED { + ok (0), + -- client / bank / slot ID not accepted + illegalClientId (1), + illegalBankId (2), + illegalSlotId (3), + unsupportedProtocolVersion (4), + unknownSlotmap (5), + + -- no card is present in given slot + cardNotPresent (100), + -- card is present but unresponsive in given slot + cardUnresponsive (101), + -- unrecoverable transmission errors detected + cardTransmissionError (102), + ... +} + +ErrorCode ::= ENUMERATED { + -- Bankd or Server has received connection form unknown client (no mapping) + unknownClientConnected (1), + -- unexpected disconnect (typically bankd reports client disconnect) + unexpectedDisconnect (2), + unexpectedProtocolVersion (3), + ... +} + +ErrorString ::= IA5String (SIZE (1..255)) + +ErrorSeverity ::= ENUMERATED { + minor (1), + major (2), + fatal (3), + ... +} + +-- Slot number within a SIM bank or a client. +SlotNumber ::= INTEGER(0..1023) + +-- Slot identity on client (modem) side +ClientSlot ::= SEQUENCE { + clientId ClientId, + slotNr SlotNumber, + ... +} + +-- Slot identity on SIM bank side +BankSlot ::= SEQUENCE { + bankId BankId, + slotNr SlotNumber, + ... +} + +ATR ::= OCTET STRING (SIZE (1..55)) + +-- flags related to a TPDU in either of the two directions +TpduFlags ::= SEQUENCE { + -- indicates a TPDU header is present in this message + tpduHeaderPresent BOOLEAN, + -- indicates last part of transmission in this direction + finalPart BOOLEAN, + -- indicates a PB is present and we should continue with TX + procByteContinueTx BOOLEAN, + -- indicates a PB is present and we should continue with RX + procByteContinueRx BOOLEAN, + ... +} + +--- physical state of a given slot +SlotPhysStatus ::= SEQUENCE { + -- is RST activated by the modem? + resetActive [0] BOOLEAN, + -- is VCC applied by the modem? + vccPresent [1] BOOLEAN OPTIONAL, + -- is CLK applied by the modem? + clkActive [2] BOOLEAN OPTIONAL, -- not all hardware supports this + -- is card presence signalled to the modem? + cardPresent [3] BOOLEAN OPTIONAL, + ... +} + +---------------------------------------------------------------------- +-- Messages +---------------------------------------------------------------------- + + +-- BANKD->SERVER: SIM Bank connects to central server +ConnectBankReq ::= SEQUENCE { + -- identity of the bank that is connecting to the server + identity ComponentIdentity, + -- bank number, pre-configured on bank side + bankId BankId, + numberOfSlots SlotNumber, + ... +} +ConnectBankRes ::= SEQUENCE { + -- identity of the server to which the bank is connecting + identity ComponentIdentity, + result ResultCode, + ... +} + +-- CLIENT->SERVER or CLIENT->BANKD +ConnectClientReq ::= SEQUENCE { + -- identity of the client that is connecting to the server/bankd + identity ComponentIdentity, + clientSlot ClientSlot OPTIONAL, -- mandatory for CL->BANKD; CL->SERVER: old identity, if any + ... +} +ConnectClientRes ::= SEQUENCE { + -- identity of the bankd/server to which the client is connecting + identity ComponentIdentity, + result ResultCode, + ... +} + +-- SERVER->BANKD: create a mapping between a given Bank:Slot <-> Client:Slot +CreateMappingReq ::= SEQUENCE { + client ClientSlot, + bank BankSlot, + ... +} +CreateMappingRes ::= SEQUENCE { + result ResultCode, + ... +} + +-- SERVER->BANKD: remove a mapping between a given Bank:Slot <-> Client:Slot +RemoveMappingReq ::= SEQUENCE { + client ClientSlot, + bank BankSlot, + ... +} +RemoveMappingRes ::= SEQUENCE { + result ResultCode, + ... +} + +-- SERVER->CLIENT: set Client ID +ConfigClientIdReq ::= SEQUENCE { + -- server-allocated assignment of a client ID + clientSlot ClientSlot, + ... +} +ConfigClientIdRes ::= SEQUENCE { + result ResultCode, + ... +} + +-- SERVER->CLIENT: set BankId/Slot and IP/Port +ConfigClientBankReq ::= SEQUENCE { + -- server-allocated assignment of a client ID + bankSlot BankSlot, + -- bank to which the client shall connect + bankd IpPort, + ... +} +ConfigClientBankRes ::= SEQUENCE { + result ResultCode, + ... +} + + +-- BANKD->CLIENT: configure the ATR which the card emulator (client) shall send to the modem +SetAtrReq ::= SEQUENCE { + slot ClientSlot, + atr ATR, + ... +} +SetAtrRes ::= SEQUENCE { + result ResultCode, + ... +} + +-- CLIENT->BANKD: TPDU in Modem -> Card direction +TpduModemToCard ::= SEQUENCE { + -- we include fully-qualified bank and client slots for easier debugging + fromClientSlot ClientSlot, + toBankSlot BankSlot, + flags TpduFlags, + data OCTET STRING, + ... +} + +-- BANKD->CLIENT: TPDU in Card -> Modem direction +TpduCardToModem ::= SEQUENCE { + -- we include fully-qualified bank and client slots for easier debugging + fromBankSlot BankSlot, + toClientSlot ClientSlot, + flags TpduFlags, + data OCTET STRING, + ... +} + +-- CLIENT->BANKD: indciation about the current status of a client (modem side) +ClientSlotStatusInd ::= SEQUENCE { + fromClientSlot ClientSlot, + toBankSlot BankSlot, + slotPhysStatus SlotPhysStatus, + ... +} + +-- BANKD->CLIENT: indciation about the current status of a bank (modem side) +BankSlotStatusInd ::= SEQUENCE { + fromBankSlot BankSlot, + toClientSlot ClientSlot, + slotPhysStatus SlotPhysStatus, + ... +} + +-- *->SERVER: indication about some kind of error +ErrorInd ::= SEQUENCE { + -- whoever is detecting + sending us the error + sender ComponentType, + severity ErrorSeverity, + code ErrorCode, + -- any bank-side slot that's affected + bankSlot [0] BankSlot OPTIONAL, + -- any client-side slot that's affected + clientSlot [1] ClientSlot OPTIONAL, + -- any additional textual information + errorString [2] ErrorString OPTIONAL, + ... +} + + +---------------------------------------------------------------------- +-- PDU +---------------------------------------------------------------------- + +RsproPDUchoice ::= CHOICE { + -- configuration + management + connectBankReq [0] ConnectBankReq, + connectBankRes [1] ConnectBankRes, + connectClientReq [2] ConnectClientReq, + connectClientRes [3] ConnectClientRes, + createMappingReq [4] CreateMappingReq, + createMappingRes [5] CreateMappingRes, + removeMappingReq [6] RemoveMappingReq, + removeMappingRes [7] RemoveMappingRes, + configClientIdReq [8] ConfigClientIdReq, + configClientIdRes [9] ConfigClientIdRes, + configClientBankReq [17] ConfigClientBankReq, + configClientBankRes [18] ConfigClientBankRes, + errorInd [16] ErrorInd, + -- APDUs etc. + setAtrReq [10] SetAtrReq, + setAtrRes [11] SetAtrRes, + tpduModemToCard [12] TpduModemToCard, + tpduCardToModem [13] TpduCardToModem, + clientSlotStatusInd [14] ClientSlotStatusInd, + bankSlotStatusInd [15] BankSlotStatusInd, + ... +} + +RsproPDU ::= SEQUENCE { + version [0] INTEGER(0..32), + tag [1] OperationTag, + msg [2] RsproPDUchoice +} + +END diff --git a/epan/dissectors/asn1/rspro/packet-rspro-template.c b/epan/dissectors/asn1/rspro/packet-rspro-template.c new file mode 100644 index 0000000000..24e655e181 --- /dev/null +++ b/epan/dissectors/asn1/rspro/packet-rspro-template.c @@ -0,0 +1,95 @@ +/* packet-rspro.c + * Routines for RSPRO (Remote SIM Protocol) packet dissection + * (C) 2019 by Harald Welte <laforge@gnumonks.org> + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <glib.h> +#include <epan/packet.h> +#include <epan/conversation.h> + +#include <stdio.h> +#include <string.h> + +#include "packet-ber.h" +#include "packet-rspro.h" + +#define PNAME "Remote SIM Protocol" +#define PSNAME "RSPRO" +#define PFNAME "rspro" +#define IPAC_PROTO_EXT_RSPRO 0x07 +static dissector_handle_t rspro_handle=NULL; + +void proto_reg_handoff_rspro(void); +void proto_register_rspro(void); + +/* Initialize the protocol and registered fields */ +static int proto_rspro = -1; + +#include "packet-rspro-hf.c" + +/* Initialize the subtree pointers */ +static int ett_rspro = -1; + +#include "packet-rspro-ett.c" + +#include "packet-rspro-fn.c" + + +static int +dissect_rspro(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) +{ + proto_item *rspro_item = NULL; + proto_tree *rspro_tree = NULL; + + /* make entry in the Protocol column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); + + /* create the rspro protocol tree */ + if (tree) { + rspro_item = proto_tree_add_item(tree, proto_rspro, tvb, 0, -1, FALSE); + rspro_tree = proto_item_add_subtree(rspro_item, ett_rspro); + + dissect_RsproPDU_PDU(tvb, pinfo, rspro_tree, data); + } + + return tvb_captured_length(tvb); +} + +/*--- proto_register_rspro -------------------------------------------*/ +void proto_register_rspro(void) { + /* List of fields */ + static hf_register_info hf[] = { +#include "packet-rspro-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_rspro, +#include "packet-rspro-ettarr.c" + }; + + /* Register protocol */ + proto_rspro = proto_register_protocol(PNAME, PSNAME, PFNAME); + /* Register fields and subtrees */ + proto_register_field_array(proto_rspro, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); +} + + +/*--- proto_reg_handoff_rspro ---------------------------------------*/ +void +proto_reg_handoff_rspro(void) +{ + rspro_handle = create_dissector_handle(dissect_rspro, proto_rspro); + dissector_add_uint_with_preference("ipa.osmo.protocol", IPAC_PROTO_EXT_RSPRO, rspro_handle); +} diff --git a/epan/dissectors/asn1/rspro/packet-rspro-template.h b/epan/dissectors/asn1/rspro/packet-rspro-template.h new file mode 100644 index 0000000000..7b6f185218 --- /dev/null +++ b/epan/dissectors/asn1/rspro/packet-rspro-template.h @@ -0,0 +1,16 @@ +/* packet-rspro.h + * Routines for RSPRO (remote SIM protocol) packet dissection + * (C) 2019 by Harald Welte <laforge@gnumonks.org> + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef PACKET_RSPRO_H +#define PACKET_RSPRO_H + + +#endif /* PACKET_RSPRO_H */ diff --git a/epan/dissectors/asn1/rspro/rspro.cnf b/epan/dissectors/asn1/rspro/rspro.cnf new file mode 100644 index 0000000000..60ea648a81 --- /dev/null +++ b/epan/dissectors/asn1/rspro/rspro.cnf @@ -0,0 +1,28 @@ +# rspro.cnf +# rspro conformation file +# Copyright 2019 Harald Welte + +#.OPT +BER +#.END + +#.MODULE_IMPORT + +#.EXPORTS + +#.PDU +RsproPDU + +#.NO_EMIT + +#.TYPE_RENAME + +#.FIELD_RENAME + +#.FN_HDR RsproPDUchoice + gint choice_index; +#.FN_BODY RsproPDUchoice VAL_PTR = &choice_index + %(DEFAULT_BODY)s + col_append_str(actx->pinfo->cinfo, COL_INFO, val_to_str(choice_index, rspro_RsproPDUchoice_vals, "Unknown (%%u)")); + +#.END diff --git a/epan/dissectors/packet-gsm_ipa.c b/epan/dissectors/packet-gsm_ipa.c index f12a011c7f..1a15a8a064 100644 --- a/epan/dissectors/packet-gsm_ipa.c +++ b/epan/dissectors/packet-gsm_ipa.c @@ -114,6 +114,7 @@ static dissector_table_t osmo_dissector_table; #define IPAC_PROTO_EXT_ORC 0x04 #define IPAC_PROTO_EXT_GSUP 0x05 #define IPAC_PROTO_EXT_OAP 0x06 +#define IPAC_PROTO_EXT_RSPRO 0x07 static const value_string ipa_protocol_vals[] = { { 0x00, "RSL" }, @@ -165,6 +166,7 @@ static const value_string ipa_osmo_proto_vals[] = { { 0x04, "ORC" }, { 0x05, "GSUP" }, { 0x06, "OAP" }, + { 0x07, "RSPRO" }, { 0, NULL } }; diff --git a/epan/dissectors/packet-rspro.c b/epan/dissectors/packet-rspro.c new file mode 100644 index 0000000000..5dd114d58a --- /dev/null +++ b/epan/dissectors/packet-rspro.c @@ -0,0 +1,1232 @@ +/* Do not modify this file. Changes will be overwritten. */ +/* Generated automatically by the ASN.1 to Wireshark dissector compiler */ +/* packet-rspro.c */ +/* asn2wrs.py -p rspro -c ./rspro.cnf -s ./packet-rspro-template -D . -O ../.. RSPRO.asn */ + +/* Input file: packet-rspro-template.c */ + +#line 1 "./asn1/rspro/packet-rspro-template.c" +/* packet-rspro.c + * Routines for RSPRO (Remote SIM Protocol) packet dissection + * (C) 2019 by Harald Welte <laforge@gnumonks.org> + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <glib.h> +#include <epan/packet.h> +#include <epan/conversation.h> + +#include <stdio.h> +#include <string.h> + +#include "packet-ber.h" +#include "packet-rspro.h" + +#define PNAME "Remote SIM Protocol" +#define PSNAME "RSPRO" +#define PFNAME "rspro" +#define IPAC_PROTO_EXT_RSPRO 0x07 +static dissector_handle_t rspro_handle=NULL; + +void proto_reg_handoff_rspro(void); +void proto_register_rspro(void); + +/* Initialize the protocol and registered fields */ +static int proto_rspro = -1; + + +/*--- Included file: packet-rspro-hf.c ---*/ +#line 1 "./asn1/rspro/packet-rspro-hf.c" +static int hf_rspro_RsproPDU_PDU = -1; /* RsproPDU */ +static int hf_rspro_type = -1; /* ComponentType */ +static int hf_rspro_name = -1; /* ComponentName */ +static int hf_rspro_software = -1; /* ComponentName */ +static int hf_rspro_swVersion = -1; /* ComponentName */ +static int hf_rspro_hwManufacturer = -1; /* ComponentName */ +static int hf_rspro_hwModel = -1; /* ComponentName */ +static int hf_rspro_hwSerialNr = -1; /* ComponentName */ +static int hf_rspro_hwVersion = -1; /* ComponentName */ +static int hf_rspro_fwVersion = -1; /* ComponentName */ +static int hf_rspro_ipv4 = -1; /* Ipv4Address */ +static int hf_rspro_ipv6 = -1; /* Ipv6Address */ +static int hf_rspro_ip = -1; /* IpAddress */ +static int hf_rspro_port = -1; /* PortNumber */ +static int hf_rspro_clientId = -1; /* ClientId */ +static int hf_rspro_slotNr = -1; /* SlotNumber */ +static int hf_rspro_bankId = -1; /* BankId */ +static int hf_rspro_tpduHeaderPresent = -1; /* BOOLEAN */ +static int hf_rspro_finalPart = -1; /* BOOLEAN */ +static int hf_rspro_procByteContinueTx = -1; /* BOOLEAN */ +static int hf_rspro_procByteContinueRx = -1; /* BOOLEAN */ +static int hf_rspro_resetActive = -1; /* BOOLEAN */ +static int hf_rspro_vccPresent = -1; /* BOOLEAN */ +static int hf_rspro_clkActive = -1; /* BOOLEAN */ +static int hf_rspro_cardPresent = -1; /* BOOLEAN */ +static int hf_rspro_identity = -1; /* ComponentIdentity */ +static int hf_rspro_numberOfSlots = -1; /* SlotNumber */ +static int hf_rspro_result = -1; /* ResultCode */ +static int hf_rspro_clientSlot = -1; /* ClientSlot */ +static int hf_rspro_client = -1; /* ClientSlot */ +static int hf_rspro_bank = -1; /* BankSlot */ +static int hf_rspro_bankSlot = -1; /* BankSlot */ +static int hf_rspro_bankd = -1; /* IpPort */ +static int hf_rspro_slot = -1; /* ClientSlot */ +static int hf_rspro_atr = -1; /* ATR */ +static int hf_rspro_fromClientSlot = -1; /* ClientSlot */ +static int hf_rspro_toBankSlot = -1; /* BankSlot */ +static int hf_rspro_flags = -1; /* TpduFlags */ +static int hf_rspro_data = -1; /* OCTET_STRING */ +static int hf_rspro_fromBankSlot = -1; /* BankSlot */ +static int hf_rspro_toClientSlot = -1; /* ClientSlot */ +static int hf_rspro_slotPhysStatus = -1; /* SlotPhysStatus */ +static int hf_rspro_sender = -1; /* ComponentType */ +static int hf_rspro_severity = -1; /* ErrorSeverity */ +static int hf_rspro_code = -1; /* ErrorCode */ +static int hf_rspro_errorString = -1; /* ErrorString */ +static int hf_rspro_connectBankReq = -1; /* ConnectBankReq */ +static int hf_rspro_connectBankRes = -1; /* ConnectBankRes */ +static int hf_rspro_connectClientReq = -1; /* ConnectClientReq */ +static int hf_rspro_connectClientRes = -1; /* ConnectClientRes */ +static int hf_rspro_createMappingReq = -1; /* CreateMappingReq */ +static int hf_rspro_createMappingRes = -1; /* CreateMappingRes */ +static int hf_rspro_removeMappingReq = -1; /* RemoveMappingReq */ +static int hf_rspro_removeMappingRes = -1; /* RemoveMappingRes */ +static int hf_rspro_configClientIdReq = -1; /* ConfigClientIdReq */ +static int hf_rspro_configClientIdRes = -1; /* ConfigClientIdRes */ +static int hf_rspro_configClientBankReq = -1; /* ConfigClientBankReq */ +static int hf_rspro_configClientBankRes = -1; /* ConfigClientBankRes */ +static int hf_rspro_errorInd = -1; /* ErrorInd */ +static int hf_rspro_setAtrReq = -1; /* SetAtrReq */ +static int hf_rspro_setAtrRes = -1; /* SetAtrRes */ +static int hf_rspro_tpduModemToCard = -1; /* TpduModemToCard */ +static int hf_rspro_tpduCardToModem = -1; /* TpduCardToModem */ +static int hf_rspro_clientSlotStatusInd = -1; /* ClientSlotStatusInd */ +static int hf_rspro_bankSlotStatusInd = -1; /* BankSlotStatusInd */ +static int hf_rspro_version = -1; /* INTEGER_0_32 */ +static int hf_rspro_tag = -1; /* OperationTag */ +static int hf_rspro_msg = -1; /* RsproPDUchoice */ + +/*--- End of included file: packet-rspro-hf.c ---*/ +#line 39 "./asn1/rspro/packet-rspro-template.c" + +/* Initialize the subtree pointers */ +static int ett_rspro = -1; + + +/*--- Included file: packet-rspro-ett.c ---*/ +#line 1 "./asn1/rspro/packet-rspro-ett.c" +static gint ett_rspro_ComponentIdentity = -1; +static gint ett_rspro_IpAddress = -1; +static gint ett_rspro_IpPort = -1; +static gint ett_rspro_ClientSlot = -1; +static gint ett_rspro_BankSlot = -1; +static gint ett_rspro_TpduFlags = -1; +static gint ett_rspro_SlotPhysStatus = -1; +static gint ett_rspro_ConnectBankReq = -1; +static gint ett_rspro_ConnectBankRes = -1; +static gint ett_rspro_ConnectClientReq = -1; +static gint ett_rspro_ConnectClientRes = -1; +static gint ett_rspro_CreateMappingReq = -1; +static gint ett_rspro_CreateMappingRes = -1; +static gint ett_rspro_RemoveMappingReq = -1; +static gint ett_rspro_RemoveMappingRes = -1; +static gint ett_rspro_ConfigClientIdReq = -1; +static gint ett_rspro_ConfigClientIdRes = -1; +static gint ett_rspro_ConfigClientBankReq = -1; +static gint ett_rspro_ConfigClientBankRes = -1; +static gint ett_rspro_SetAtrReq = -1; +static gint ett_rspro_SetAtrRes = -1; +static gint ett_rspro_TpduModemToCard = -1; +static gint ett_rspro_TpduCardToModem = -1; +static gint ett_rspro_ClientSlotStatusInd = -1; +static gint ett_rspro_BankSlotStatusInd = -1; +static gint ett_rspro_ErrorInd = -1; +static gint ett_rspro_RsproPDUchoice = -1; +static gint ett_rspro_RsproPDU = -1; + +/*--- End of included file: packet-rspro-ett.c ---*/ +#line 44 "./asn1/rspro/packet-rspro-template.c" + + +/*--- Included file: packet-rspro-fn.c ---*/ +#line 1 "./asn1/rspro/packet-rspro-fn.c" + + +static int +dissect_rspro_OperationTag(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_BankId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_ClientId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const value_string rspro_ComponentType_vals[] = { + { 0, "remsimClient" }, + { 1, "remsimServer" }, + { 2, "remsimBankd" }, + { 0, NULL } +}; + + +static int +dissect_rspro_ComponentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_ComponentName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String, + actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const ber_sequence_t ComponentIdentity_sequence[] = { + { &hf_rspro_type , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentType }, + { &hf_rspro_name , BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentName }, + { &hf_rspro_software , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { &hf_rspro_swVersion , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { &hf_rspro_hwManufacturer, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { &hf_rspro_hwModel , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { &hf_rspro_hwSerialNr , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { &hf_rspro_hwVersion , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { &hf_rspro_fwVersion , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ComponentName }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ComponentIdentity(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ComponentIdentity_sequence, hf_index, ett_rspro_ComponentIdentity); + + return offset; +} + + + +static int +dissect_rspro_Ipv4Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_Ipv6Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const value_string rspro_IpAddress_vals[] = { + { 0, "ipv4" }, + { 1, "ipv6" }, + { 0, NULL } +}; + +static const ber_choice_t IpAddress_choice[] = { + { 0, &hf_rspro_ipv4 , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_rspro_Ipv4Address }, + { 1, &hf_rspro_ipv6 , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_rspro_Ipv6Address }, + { 0, NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_IpAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(actx, tree, tvb, offset, + IpAddress_choice, hf_index, ett_rspro_IpAddress, + NULL); + + return offset; +} + + + +static int +dissect_rspro_PortNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const ber_sequence_t IpPort_sequence[] = { + { &hf_rspro_ip , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_rspro_IpAddress }, + { &hf_rspro_port , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_PortNumber }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_IpPort(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + IpPort_sequence, hf_index, ett_rspro_IpPort); + + return offset; +} + + +static const value_string rspro_ResultCode_vals[] = { + { 0, "ok" }, + { 1, "illegalClientId" }, + { 2, "illegalBankId" }, + { 3, "illegalSlotId" }, + { 4, "unsupportedProtocolVersion" }, + { 5, "unknownSlotmap" }, + { 100, "cardNotPresent" }, + { 101, "cardUnresponsive" }, + { 102, "cardTransmissionError" }, + { 0, NULL } +}; + + +static int +dissect_rspro_ResultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const value_string rspro_ErrorCode_vals[] = { + { 1, "unknownClientConnected" }, + { 2, "unexpectedDisconnect" }, + { 3, "unexpectedProtocolVersion" }, + { 0, NULL } +}; + + +static int +dissect_rspro_ErrorCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_ErrorString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String, + actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const value_string rspro_ErrorSeverity_vals[] = { + { 1, "minor" }, + { 2, "major" }, + { 3, "fatal" }, + { 0, NULL } +}; + + +static int +dissect_rspro_ErrorSeverity(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_SlotNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const ber_sequence_t ClientSlot_sequence[] = { + { &hf_rspro_clientId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientId }, + { &hf_rspro_slotNr , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_SlotNumber }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ClientSlot(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ClientSlot_sequence, hf_index, ett_rspro_ClientSlot); + + return offset; +} + + +static const ber_sequence_t BankSlot_sequence[] = { + { &hf_rspro_bankId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_BankId }, + { &hf_rspro_slotNr , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_SlotNumber }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_BankSlot(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + BankSlot_sequence, hf_index, ett_rspro_BankSlot); + + return offset; +} + + + +static int +dissect_rspro_ATR(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_rspro_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); + + return offset; +} + + +static const ber_sequence_t TpduFlags_sequence[] = { + { &hf_rspro_tpduHeaderPresent, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_rspro_BOOLEAN }, + { &hf_rspro_finalPart , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_rspro_BOOLEAN }, + { &hf_rspro_procByteContinueTx, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_rspro_BOOLEAN }, + { &hf_rspro_procByteContinueRx, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_rspro_BOOLEAN }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_TpduFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TpduFlags_sequence, hf_index, ett_rspro_TpduFlags); + + return offset; +} + + +static const ber_sequence_t SlotPhysStatus_sequence[] = { + { &hf_rspro_resetActive , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_rspro_BOOLEAN }, + { &hf_rspro_vccPresent , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_BOOLEAN }, + { &hf_rspro_clkActive , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_BOOLEAN }, + { &hf_rspro_cardPresent , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_BOOLEAN }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_SlotPhysStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + SlotPhysStatus_sequence, hf_index, ett_rspro_SlotPhysStatus); + + return offset; +} + + +static const ber_sequence_t ConnectBankReq_sequence[] = { + { &hf_rspro_identity , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentIdentity }, + { &hf_rspro_bankId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_BankId }, + { &hf_rspro_numberOfSlots , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_rspro_SlotNumber }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConnectBankReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConnectBankReq_sequence, hf_index, ett_rspro_ConnectBankReq); + + return offset; +} + + +static const ber_sequence_t ConnectBankRes_sequence[] = { + { &hf_rspro_identity , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentIdentity }, + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConnectBankRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConnectBankRes_sequence, hf_index, ett_rspro_ConnectBankRes); + + return offset; +} + + +static const ber_sequence_t ConnectClientReq_sequence[] = { + { &hf_rspro_identity , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentIdentity }, + { &hf_rspro_clientSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConnectClientReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConnectClientReq_sequence, hf_index, ett_rspro_ConnectClientReq); + + return offset; +} + + +static const ber_sequence_t ConnectClientRes_sequence[] = { + { &hf_rspro_identity , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentIdentity }, + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConnectClientRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConnectClientRes_sequence, hf_index, ett_rspro_ConnectClientRes); + + return offset; +} + + +static const ber_sequence_t CreateMappingReq_sequence[] = { + { &hf_rspro_client , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_bank , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_CreateMappingReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CreateMappingReq_sequence, hf_index, ett_rspro_CreateMappingReq); + + return offset; +} + + +static const ber_sequence_t CreateMappingRes_sequence[] = { + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_CreateMappingRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CreateMappingRes_sequence, hf_index, ett_rspro_CreateMappingRes); + + return offset; +} + + +static const ber_sequence_t RemoveMappingReq_sequence[] = { + { &hf_rspro_client , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_bank , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_RemoveMappingReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + RemoveMappingReq_sequence, hf_index, ett_rspro_RemoveMappingReq); + + return offset; +} + + +static const ber_sequence_t RemoveMappingRes_sequence[] = { + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_RemoveMappingRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + RemoveMappingRes_sequence, hf_index, ett_rspro_RemoveMappingRes); + + return offset; +} + + +static const ber_sequence_t ConfigClientIdReq_sequence[] = { + { &hf_rspro_clientSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConfigClientIdReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConfigClientIdReq_sequence, hf_index, ett_rspro_ConfigClientIdReq); + + return offset; +} + + +static const ber_sequence_t ConfigClientIdRes_sequence[] = { + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConfigClientIdRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConfigClientIdRes_sequence, hf_index, ett_rspro_ConfigClientIdRes); + + return offset; +} + + +static const ber_sequence_t ConfigClientBankReq_sequence[] = { + { &hf_rspro_bankSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { &hf_rspro_bankd , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_IpPort }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConfigClientBankReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConfigClientBankReq_sequence, hf_index, ett_rspro_ConfigClientBankReq); + + return offset; +} + + +static const ber_sequence_t ConfigClientBankRes_sequence[] = { + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ConfigClientBankRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ConfigClientBankRes_sequence, hf_index, ett_rspro_ConfigClientBankRes); + + return offset; +} + + +static const ber_sequence_t SetAtrReq_sequence[] = { + { &hf_rspro_slot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_atr , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_rspro_ATR }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_SetAtrReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + SetAtrReq_sequence, hf_index, ett_rspro_SetAtrReq); + + return offset; +} + + +static const ber_sequence_t SetAtrRes_sequence[] = { + { &hf_rspro_result , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ResultCode }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_SetAtrRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + SetAtrRes_sequence, hf_index, ett_rspro_SetAtrRes); + + return offset; +} + + + +static int +dissect_rspro_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const ber_sequence_t TpduModemToCard_sequence[] = { + { &hf_rspro_fromClientSlot, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_toBankSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { &hf_rspro_flags , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_TpduFlags }, + { &hf_rspro_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_rspro_OCTET_STRING }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_TpduModemToCard(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TpduModemToCard_sequence, hf_index, ett_rspro_TpduModemToCard); + + return offset; +} + + +static const ber_sequence_t TpduCardToModem_sequence[] = { + { &hf_rspro_fromBankSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { &hf_rspro_toClientSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_flags , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_TpduFlags }, + { &hf_rspro_data , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_rspro_OCTET_STRING }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_TpduCardToModem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TpduCardToModem_sequence, hf_index, ett_rspro_TpduCardToModem); + + return offset; +} + + +static const ber_sequence_t ClientSlotStatusInd_sequence[] = { + { &hf_rspro_fromClientSlot, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_toBankSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { &hf_rspro_slotPhysStatus, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_SlotPhysStatus }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ClientSlotStatusInd(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ClientSlotStatusInd_sequence, hf_index, ett_rspro_ClientSlotStatusInd); + + return offset; +} + + +static const ber_sequence_t BankSlotStatusInd_sequence[] = { + { &hf_rspro_fromBankSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_BankSlot }, + { &hf_rspro_toClientSlot , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_slotPhysStatus, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rspro_SlotPhysStatus }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_BankSlotStatusInd(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + BankSlotStatusInd_sequence, hf_index, ett_rspro_BankSlotStatusInd); + + return offset; +} + + +static const ber_sequence_t ErrorInd_sequence[] = { + { &hf_rspro_sender , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ComponentType }, + { &hf_rspro_severity , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ErrorSeverity }, + { &hf_rspro_code , BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rspro_ErrorCode }, + { &hf_rspro_bankSlot , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_BankSlot }, + { &hf_rspro_clientSlot , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ClientSlot }, + { &hf_rspro_errorString , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rspro_ErrorString }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_ErrorInd(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ErrorInd_sequence, hf_index, ett_rspro_ErrorInd); + + return offset; +} + + +static const value_string rspro_RsproPDUchoice_vals[] = { + { 0, "connectBankReq" }, + { 1, "connectBankRes" }, + { 2, "connectClientReq" }, + { 3, "connectClientRes" }, + { 4, "createMappingReq" }, + { 5, "createMappingRes" }, + { 6, "removeMappingReq" }, + { 7, "removeMappingRes" }, + { 8, "configClientIdReq" }, + { 9, "configClientIdRes" }, + { 17, "configClientBankReq" }, + { 18, "configClientBankRes" }, + { 16, "errorInd" }, + { 10, "setAtrReq" }, + { 11, "setAtrRes" }, + { 12, "tpduModemToCard" }, + { 13, "tpduCardToModem" }, + { 14, "clientSlotStatusInd" }, + { 15, "bankSlotStatusInd" }, + { 0, NULL } +}; + +static const ber_choice_t RsproPDUchoice_choice[] = { + { 0, &hf_rspro_connectBankReq, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_rspro_ConnectBankReq }, + { 1, &hf_rspro_connectBankRes, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_rspro_ConnectBankRes }, + { 2, &hf_rspro_connectClientReq, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_rspro_ConnectClientReq }, + { 3, &hf_rspro_connectClientRes, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_rspro_ConnectClientRes }, + { 4, &hf_rspro_createMappingReq, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_rspro_CreateMappingReq }, + { 5, &hf_rspro_createMappingRes, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_rspro_CreateMappingRes }, + { 6, &hf_rspro_removeMappingReq, BER_CLASS_CON, 6, BER_FLAGS_IMPLTAG, dissect_rspro_RemoveMappingReq }, + { 7, &hf_rspro_removeMappingRes, BER_CLASS_CON, 7, BER_FLAGS_IMPLTAG, dissect_rspro_RemoveMappingRes }, + { 8, &hf_rspro_configClientIdReq, BER_CLASS_CON, 8, BER_FLAGS_IMPLTAG, dissect_rspro_ConfigClientIdReq }, + { 9, &hf_rspro_configClientIdRes, BER_CLASS_CON, 9, BER_FLAGS_IMPLTAG, dissect_rspro_ConfigClientIdRes }, + { 17, &hf_rspro_configClientBankReq, BER_CLASS_CON, 17, BER_FLAGS_IMPLTAG, dissect_rspro_ConfigClientBankReq }, + { 18, &hf_rspro_configClientBankRes, BER_CLASS_CON, 18, BER_FLAGS_IMPLTAG, dissect_rspro_ConfigClientBankRes }, + { 16, &hf_rspro_errorInd , BER_CLASS_CON, 16, BER_FLAGS_IMPLTAG, dissect_rspro_ErrorInd }, + { 10, &hf_rspro_setAtrReq , BER_CLASS_CON, 10, BER_FLAGS_IMPLTAG, dissect_rspro_SetAtrReq }, + { 11, &hf_rspro_setAtrRes , BER_CLASS_CON, 11, BER_FLAGS_IMPLTAG, dissect_rspro_SetAtrRes }, + { 12, &hf_rspro_tpduModemToCard, BER_CLASS_CON, 12, BER_FLAGS_IMPLTAG, dissect_rspro_TpduModemToCard }, + { 13, &hf_rspro_tpduCardToModem, BER_CLASS_CON, 13, BER_FLAGS_IMPLTAG, dissect_rspro_TpduCardToModem }, + { 14, &hf_rspro_clientSlotStatusInd, BER_CLASS_CON, 14, BER_FLAGS_IMPLTAG, dissect_rspro_ClientSlotStatusInd }, + { 15, &hf_rspro_bankSlotStatusInd, BER_CLASS_CON, 15, BER_FLAGS_IMPLTAG, dissect_rspro_BankSlotStatusInd }, + { 0, NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_RsproPDUchoice(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 23 "./asn1/rspro/rspro.cnf" + gint choice_index; + +#line 25 "./asn1/rspro/rspro.cnf" + offset = dissect_ber_choice(actx, tree, tvb, offset, + RsproPDUchoice_choice, hf_index, ett_rspro_RsproPDUchoice, + &choice_index); + + col_append_str(actx->pinfo->cinfo, COL_INFO, val_to_str(choice_index, rspro_RsproPDUchoice_vals, "Unknown (%u)")); + + + + return offset; +} + + + +static int +dissect_rspro_INTEGER_0_32(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + +static const ber_sequence_t RsproPDU_sequence[] = { + { &hf_rspro_version , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_rspro_INTEGER_0_32 }, + { &hf_rspro_tag , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_rspro_OperationTag }, + { &hf_rspro_msg , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_rspro_RsproPDUchoice }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_rspro_RsproPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + RsproPDU_sequence, hf_index, ett_rspro_RsproPDU); + + return offset; +} + +/*--- PDUs ---*/ + +static int dissect_RsproPDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { + int offset = 0; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + offset = dissect_rspro_RsproPDU(FALSE, tvb, offset, &asn1_ctx, tree, hf_rspro_RsproPDU_PDU); + return offset; +} + + +/*--- End of included file: packet-rspro-fn.c ---*/ +#line 46 "./asn1/rspro/packet-rspro-template.c" + + +static int +dissect_rspro(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) +{ + proto_item *rspro_item = NULL; + proto_tree *rspro_tree = NULL; + + /* make entry in the Protocol column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME); + + /* create the rspro protocol tree */ + if (tree) { + rspro_item = proto_tree_add_item(tree, proto_rspro, tvb, 0, -1, FALSE); + rspro_tree = proto_item_add_subtree(rspro_item, ett_rspro); + + dissect_RsproPDU_PDU(tvb, pinfo, rspro_tree, data); + } + + return tvb_captured_length(tvb); +} + +/*--- proto_register_rspro -------------------------------------------*/ +void proto_register_rspro(void) { + /* List of fields */ + static hf_register_info hf[] = { + +/*--- Included file: packet-rspro-hfarr.c ---*/ +#line 1 "./asn1/rspro/packet-rspro-hfarr.c" + { &hf_rspro_RsproPDU_PDU, + { "RsproPDU", "rspro.RsproPDU_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_type, + { "type", "rspro.type", + FT_UINT32, BASE_DEC, VALS(rspro_ComponentType_vals), 0, + "ComponentType", HFILL }}, + { &hf_rspro_name, + { "name", "rspro.name", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_software, + { "software", "rspro.software", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_swVersion, + { "swVersion", "rspro.swVersion", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_hwManufacturer, + { "hwManufacturer", "rspro.hwManufacturer", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_hwModel, + { "hwModel", "rspro.hwModel", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_hwSerialNr, + { "hwSerialNr", "rspro.hwSerialNr", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_hwVersion, + { "hwVersion", "rspro.hwVersion", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_fwVersion, + { "fwVersion", "rspro.fwVersion", + FT_STRING, BASE_NONE, NULL, 0, + "ComponentName", HFILL }}, + { &hf_rspro_ipv4, + { "ipv4", "rspro.ipv4", + FT_BYTES, BASE_NONE, NULL, 0, + "Ipv4Address", HFILL }}, + { &hf_rspro_ipv6, + { "ipv6", "rspro.ipv6", + FT_BYTES, BASE_NONE, NULL, 0, + "Ipv6Address", HFILL }}, + { &hf_rspro_ip, + { "ip", "rspro.ip", + FT_UINT32, BASE_DEC, VALS(rspro_IpAddress_vals), 0, + "IpAddress", HFILL }}, + { &hf_rspro_port, + { "port", "rspro.port", + FT_UINT32, BASE_DEC, NULL, 0, + "PortNumber", HFILL }}, + { &hf_rspro_clientId, + { "clientId", "rspro.clientId", + FT_UINT32, BASE_DEC, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_slotNr, + { "slotNr", "rspro.slotNr", + FT_UINT32, BASE_DEC, NULL, 0, + "SlotNumber", HFILL }}, + { &hf_rspro_bankId, + { "bankId", "rspro.bankId", + FT_UINT32, BASE_DEC, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_tpduHeaderPresent, + { "tpduHeaderPresent", "rspro.tpduHeaderPresent", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_finalPart, + { "finalPart", "rspro.finalPart", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_procByteContinueTx, + { "procByteContinueTx", "rspro.procByteContinueTx", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_procByteContinueRx, + { "procByteContinueRx", "rspro.procByteContinueRx", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_resetActive, + { "resetActive", "rspro.resetActive", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_vccPresent, + { "vccPresent", "rspro.vccPresent", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_clkActive, + { "clkActive", "rspro.clkActive", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_cardPresent, + { "cardPresent", "rspro.cardPresent", + FT_BOOLEAN, BASE_NONE, NULL, 0, + "BOOLEAN", HFILL }}, + { &hf_rspro_identity, + { "identity", "rspro.identity_element", + FT_NONE, BASE_NONE, NULL, 0, + "ComponentIdentity", HFILL }}, + { &hf_rspro_numberOfSlots, + { "numberOfSlots", "rspro.numberOfSlots", + FT_UINT32, BASE_DEC, NULL, 0, + "SlotNumber", HFILL }}, + { &hf_rspro_result, + { "result", "rspro.result", + FT_UINT32, BASE_DEC, VALS(rspro_ResultCode_vals), 0, + "ResultCode", HFILL }}, + { &hf_rspro_clientSlot, + { "clientSlot", "rspro.clientSlot_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_client, + { "client", "rspro.client_element", + FT_NONE, BASE_NONE, NULL, 0, + "ClientSlot", HFILL }}, + { &hf_rspro_bank, + { "bank", "rspro.bank_element", + FT_NONE, BASE_NONE, NULL, 0, + "BankSlot", HFILL }}, + { &hf_rspro_bankSlot, + { "bankSlot", "rspro.bankSlot_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_bankd, + { "bankd", "rspro.bankd_element", + FT_NONE, BASE_NONE, NULL, 0, + "IpPort", HFILL }}, + { &hf_rspro_slot, + { "slot", "rspro.slot_element", + FT_NONE, BASE_NONE, NULL, 0, + "ClientSlot", HFILL }}, + { &hf_rspro_atr, + { "atr", "rspro.atr", + FT_BYTES, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_fromClientSlot, + { "fromClientSlot", "rspro.fromClientSlot_element", + FT_NONE, BASE_NONE, NULL, 0, + "ClientSlot", HFILL }}, + { &hf_rspro_toBankSlot, + { "toBankSlot", "rspro.toBankSlot_element", + FT_NONE, BASE_NONE, NULL, 0, + "BankSlot", HFILL }}, + { &hf_rspro_flags, + { "flags", "rspro.flags_element", + FT_NONE, BASE_NONE, NULL, 0, + "TpduFlags", HFILL }}, + { &hf_rspro_data, + { "data", "rspro.data", + FT_BYTES, BASE_NONE, NULL, 0, + "OCTET_STRING", HFILL }}, + { &hf_rspro_fromBankSlot, + { "fromBankSlot", "rspro.fromBankSlot_element", + FT_NONE, BASE_NONE, NULL, 0, + "BankSlot", HFILL }}, + { &hf_rspro_toClientSlot, + { "toClientSlot", "rspro.toClientSlot_element", + FT_NONE, BASE_NONE, NULL, 0, + "ClientSlot", HFILL }}, + { &hf_rspro_slotPhysStatus, + { "slotPhysStatus", "rspro.slotPhysStatus_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_sender, + { "sender", "rspro.sender", + FT_UINT32, BASE_DEC, VALS(rspro_ComponentType_vals), 0, + "ComponentType", HFILL }}, + { &hf_rspro_severity, + { "severity", "rspro.severity", + FT_UINT32, BASE_DEC, VALS(rspro_ErrorSeverity_vals), 0, + "ErrorSeverity", HFILL }}, + { &hf_rspro_code, + { "code", "rspro.code", + FT_UINT32, BASE_DEC, VALS(rspro_ErrorCode_vals), 0, + "ErrorCode", HFILL }}, + { &hf_rspro_errorString, + { "errorString", "rspro.errorString", + FT_STRING, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_connectBankReq, + { "connectBankReq", "rspro.connectBankReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_connectBankRes, + { "connectBankRes", "rspro.connectBankRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_connectClientReq, + { "connectClientReq", "rspro.connectClientReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_connectClientRes, + { "connectClientRes", "rspro.connectClientRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_createMappingReq, + { "createMappingReq", "rspro.createMappingReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_createMappingRes, + { "createMappingRes", "rspro.createMappingRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_removeMappingReq, + { "removeMappingReq", "rspro.removeMappingReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_removeMappingRes, + { "removeMappingRes", "rspro.removeMappingRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_configClientIdReq, + { "configClientIdReq", "rspro.configClientIdReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_configClientIdRes, + { "configClientIdRes", "rspro.configClientIdRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_configClientBankReq, + { "configClientBankReq", "rspro.configClientBankReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_configClientBankRes, + { "configClientBankRes", "rspro.configClientBankRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_errorInd, + { "errorInd", "rspro.errorInd_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_setAtrReq, + { "setAtrReq", "rspro.setAtrReq_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_setAtrRes, + { "setAtrRes", "rspro.setAtrRes_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_tpduModemToCard, + { "tpduModemToCard", "rspro.tpduModemToCard_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_tpduCardToModem, + { "tpduCardToModem", "rspro.tpduCardToModem_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_clientSlotStatusInd, + { "clientSlotStatusInd", "rspro.clientSlotStatusInd_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_bankSlotStatusInd, + { "bankSlotStatusInd", "rspro.bankSlotStatusInd_element", + FT_NONE, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_rspro_version, + { "version", "rspro.version", + FT_UINT32, BASE_DEC, NULL, 0, + "INTEGER_0_32", HFILL }}, + { &hf_rspro_tag, + { "tag", "rspro.tag", + FT_UINT32, BASE_DEC, NULL, 0, + "OperationTag", HFILL }}, + { &hf_rspro_msg, + { "msg", "rspro.msg", + FT_UINT32, BASE_DEC, VALS(rspro_RsproPDUchoice_vals), 0, + "RsproPDUchoice", HFILL }}, + +/*--- End of included file: packet-rspro-hfarr.c ---*/ +#line 73 "./asn1/rspro/packet-rspro-template.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_rspro, + +/*--- Included file: packet-rspro-ettarr.c ---*/ +#line 1 "./asn1/rspro/packet-rspro-ettarr.c" + &ett_rspro_ComponentIdentity, + &ett_rspro_IpAddress, + &ett_rspro_IpPort, + &ett_rspro_ClientSlot, + &ett_rspro_BankSlot, + &ett_rspro_TpduFlags, + &ett_rspro_SlotPhysStatus, + &ett_rspro_ConnectBankReq, + &ett_rspro_ConnectBankRes, + &ett_rspro_ConnectClientReq, + &ett_rspro_ConnectClientRes, + &ett_rspro_CreateMappingReq, + &ett_rspro_CreateMappingRes, + &ett_rspro_RemoveMappingReq, + &ett_rspro_RemoveMappingRes, + &ett_rspro_ConfigClientIdReq, + &ett_rspro_ConfigClientIdRes, + &ett_rspro_ConfigClientBankReq, + &ett_rspro_ConfigClientBankRes, + &ett_rspro_SetAtrReq, + &ett_rspro_SetAtrRes, + &ett_rspro_TpduModemToCard, + &ett_rspro_TpduCardToModem, + &ett_rspro_ClientSlotStatusInd, + &ett_rspro_BankSlotStatusInd, + &ett_rspro_ErrorInd, + &ett_rspro_RsproPDUchoice, + &ett_rspro_RsproPDU, + +/*--- End of included file: packet-rspro-ettarr.c ---*/ +#line 79 "./asn1/rspro/packet-rspro-template.c" + }; + + /* Register protocol */ + proto_rspro = proto_register_protocol(PNAME, PSNAME, PFNAME); + /* Register fields and subtrees */ + proto_register_field_array(proto_rspro, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); +} + + +/*--- proto_reg_handoff_rspro ---------------------------------------*/ +void +proto_reg_handoff_rspro(void) +{ + rspro_handle = create_dissector_handle(dissect_rspro, proto_rspro); + dissector_add_uint_with_preference("ipa.osmo.protocol", IPAC_PROTO_EXT_RSPRO, rspro_handle); +} diff --git a/epan/dissectors/packet-rspro.h b/epan/dissectors/packet-rspro.h new file mode 100644 index 0000000000..ed3057b6b3 --- /dev/null +++ b/epan/dissectors/packet-rspro.h @@ -0,0 +1,24 @@ +/* Do not modify this file. Changes will be overwritten. */ +/* Generated automatically by the ASN.1 to Wireshark dissector compiler */ +/* packet-rspro.h */ +/* asn2wrs.py -p rspro -c ./rspro.cnf -s ./packet-rspro-template -D . -O ../.. RSPRO.asn */ + +/* Input file: packet-rspro-template.h */ + +#line 1 "./asn1/rspro/packet-rspro-template.h" +/* packet-rspro.h + * Routines for RSPRO (remote SIM protocol) packet dissection + * (C) 2019 by Harald Welte <laforge@gnumonks.org> + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef PACKET_RSPRO_H +#define PACKET_RSPRO_H + + +#endif /* PACKET_RSPRO_H */ |