diff options
Diffstat (limited to 'epan/dissectors/packet-rspro.c')
-rw-r--r-- | epan/dissectors/packet-rspro.c | 1232 |
1 files changed, 1232 insertions, 0 deletions
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); +} |