epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-charging_ase.c
blob36985082db5252f75aee1ed38c374ff5b1335185
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-charging_ase.c */
4 /* asn2wrs.py -b -q -L -p charging_ase -c ./charging_ase.cnf -s ./packet-charging_ase-template -D . -O ../.. Tariffing-Data-Types.asn */
6 /* packet-charging_ase-template.c
7 * Copyright 2009 , Anders Broman <anders.broman [AT] ericsson.com>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 * References: ETSI ES 201 296 V1.3.1 (2003-04)
17 #include "config.h"
19 #include <epan/packet.h>
20 #include <epan/expert.h>
21 #include <epan/asn1.h>
22 #include <wsutil/array.h>
23 #include "packet-ber.h"
24 #include "packet-charging_ase.h"
26 #define PNAME "Charging ASE"
27 #define PSNAME "ChargingASE"
28 #define PFNAME "chargingase"
30 void proto_register_charging_ase(void);
31 void proto_reg_handoff_charging_ase(void);
33 /* Define the Charging ASE proto */
34 static int proto_charging_ase;
36 static int hf_charging_ase_charging_ase_ChargingMessageType_PDU; /* ChargingMessageType */
37 static int hf_charging_ase_crgt; /* ChargingTariffInformation */
38 static int hf_charging_ase_aocrg; /* AddOnChargingInformation */
39 static int hf_charging_ase_crga; /* ChargingAcknowledgementInformation */
40 static int hf_charging_ase_start; /* StartCharging */
41 static int hf_charging_ase_stop; /* StopCharging */
42 static int hf_charging_ase_acknowledgementIndicators; /* T_acknowledgementIndicators */
43 static int hf_charging_ase_extensions; /* SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField */
44 static int hf_charging_ase_extensions_item; /* ExtensionField */
45 static int hf_charging_ase_originationIdentification; /* ChargingReferenceIdentification */
46 static int hf_charging_ase_destinationIdentification; /* ChargingReferenceIdentification */
47 static int hf_charging_ase_chargingControlIndicators; /* ChargingControlIndicators */
48 static int hf_charging_ase_addOncharge; /* T_addOncharge */
49 static int hf_charging_ase_addOnChargeCurrency; /* CurrencyFactorScale */
50 static int hf_charging_ase_addOnChargePulse; /* PulseUnits */
51 static int hf_charging_ase_currency; /* Currency */
52 static int hf_charging_ase_chargingTariff; /* T_chargingTariff */
53 static int hf_charging_ase_tariffCurrency; /* TariffCurrency */
54 static int hf_charging_ase_tariffPulse; /* TariffPulse */
55 static int hf_charging_ase_local; /* INTEGER */
56 static int hf_charging_ase_global; /* OBJECT_IDENTIFIER */
57 static int hf_charging_ase_currencyFactorScale; /* CurrencyFactorScale */
58 static int hf_charging_ase_tariffDuration; /* TariffDuration */
59 static int hf_charging_ase_subTariffControl; /* SubTariffControl */
60 static int hf_charging_ase_pulseUnits; /* PulseUnits */
61 static int hf_charging_ase_chargeUnitTimeInterval; /* ChargeUnitTimeInterval */
62 static int hf_charging_ase_currencyFactor; /* CurrencyFactor */
63 static int hf_charging_ase_currencyScale; /* CurrencyScale */
64 static int hf_charging_ase_type; /* Code */
65 static int hf_charging_ase_criticality; /* CriticalityType */
66 static int hf_charging_ase_value; /* T_value */
67 static int hf_charging_ase_networkOperators; /* SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification */
68 static int hf_charging_ase_networkOperators_item; /* NetworkIdentification */
69 static int hf_charging_ase_stopIndicators; /* T_stopIndicators */
70 static int hf_charging_ase_currentTariffCurrency; /* TariffCurrencyFormat */
71 static int hf_charging_ase_tariffSwitchCurrency; /* TariffSwitchCurrency */
72 static int hf_charging_ase_nextTariffCurrency; /* TariffCurrencyFormat */
73 static int hf_charging_ase_tariffSwitchoverTime; /* TariffSwitchoverTime */
74 static int hf_charging_ase_communicationChargeSequenceCurrency; /* SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency */
75 static int hf_charging_ase_communicationChargeSequenceCurrency_item; /* CommunicationChargeCurrency */
76 static int hf_charging_ase_tariffControlIndicators; /* T_tariffControlIndicators */
77 static int hf_charging_ase_callAttemptChargeCurrency; /* CurrencyFactorScale */
78 static int hf_charging_ase_callSetupChargeCurrency; /* CurrencyFactorScale */
79 static int hf_charging_ase_currentTariffPulse; /* TariffPulseFormat */
80 static int hf_charging_ase_tariffSwitchPulse; /* TariffSwitchPulse */
81 static int hf_charging_ase_nextTariffPulse; /* TariffPulseFormat */
82 static int hf_charging_ase_communicationChargeSequencePulse; /* SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse */
83 static int hf_charging_ase_communicationChargeSequencePulse_item; /* CommunicationChargePulse */
84 static int hf_charging_ase_tariffControlIndicators_01; /* T_tariffControlIndicators_01 */
85 static int hf_charging_ase_callAttemptChargePulse; /* PulseUnits */
86 static int hf_charging_ase_callSetupChargePulse; /* PulseUnits */
87 static int hf_charging_ase_networkIdentification; /* NetworkIdentification */
88 static int hf_charging_ase_referenceID; /* ReferenceID */
89 /* named bits */
90 static int hf_charging_ase_T_acknowledgementIndicators_accepted;
91 static int hf_charging_ase_ChargingControlIndicators_subscriberCharge;
92 static int hf_charging_ase_ChargingControlIndicators_immediateChangeOfActuallyAppliedTariff;
93 static int hf_charging_ase_ChargingControlIndicators_delayUntilStart;
94 static int hf_charging_ase_T_stopIndicators_callAttemptChargesApplicable;
95 static int hf_charging_ase_SubTariffControl_oneTimeCharge;
96 static int hf_charging_ase_T_tariffControlIndicators_non_cyclicTariff;
97 static int hf_charging_ase_T_tariffControlIndicators_01_non_cyclicTariff;
99 static int ett_charging_ase;
100 static int ett_charging_ase_ChargingMessageType;
101 static int ett_charging_ase_ChargingAcknowledgementInformation;
102 static int ett_charging_ase_T_acknowledgementIndicators;
103 static int ett_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField;
104 static int ett_charging_ase_ChargingControlIndicators;
105 static int ett_charging_ase_AddOnChargingInformation;
106 static int ett_charging_ase_T_addOncharge;
107 static int ett_charging_ase_ChargingTariffInformation;
108 static int ett_charging_ase_T_chargingTariff;
109 static int ett_charging_ase_Code;
110 static int ett_charging_ase_CommunicationChargeCurrency;
111 static int ett_charging_ase_CommunicationChargePulse;
112 static int ett_charging_ase_CurrencyFactorScale;
113 static int ett_charging_ase_ExtensionField;
114 static int ett_charging_ase_StartCharging;
115 static int ett_charging_ase_SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification;
116 static int ett_charging_ase_StopCharging;
117 static int ett_charging_ase_T_stopIndicators;
118 static int ett_charging_ase_SubTariffControl;
119 static int ett_charging_ase_TariffCurrency;
120 static int ett_charging_ase_TariffSwitchCurrency;
121 static int ett_charging_ase_TariffCurrencyFormat;
122 static int ett_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency;
123 static int ett_charging_ase_T_tariffControlIndicators;
124 static int ett_charging_ase_TariffPulse;
125 static int ett_charging_ase_TariffSwitchPulse;
126 static int ett_charging_ase_TariffPulseFormat;
127 static int ett_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse;
128 static int ett_charging_ase_T_tariffControlIndicators_01;
129 static int ett_charging_ase_ChargingReferenceIdentification;
131 static expert_field ei_charging_ase_extensions_not_dissected;
133 static dissector_handle_t charging_ase_handle;
136 static int * const ChargingControlIndicators_bits[] = {
137 &hf_charging_ase_ChargingControlIndicators_subscriberCharge,
138 &hf_charging_ase_ChargingControlIndicators_immediateChangeOfActuallyAppliedTariff,
139 &hf_charging_ase_ChargingControlIndicators_delayUntilStart,
140 NULL
143 static int
144 dissect_charging_ase_ChargingControlIndicators(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
145 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
146 ChargingControlIndicators_bits, 3, hf_index, ett_charging_ase_ChargingControlIndicators,
147 NULL);
149 return offset;
154 static int
155 dissect_charging_ase_CurrencyFactor(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
156 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
157 NULL);
159 return offset;
164 static int
165 dissect_charging_ase_CurrencyScale(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
166 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
167 NULL);
169 return offset;
173 static const ber_sequence_t CurrencyFactorScale_sequence[] = {
174 { &hf_charging_ase_currencyFactor, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_CurrencyFactor },
175 { &hf_charging_ase_currencyScale, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_CurrencyScale },
176 { NULL, 0, 0, 0, NULL }
179 static int
180 dissect_charging_ase_CurrencyFactorScale(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
181 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
182 CurrencyFactorScale_sequence, hf_index, ett_charging_ase_CurrencyFactorScale);
184 return offset;
189 static int
190 dissect_charging_ase_TariffDuration(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
191 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
192 NULL);
194 return offset;
198 static int * const SubTariffControl_bits[] = {
199 &hf_charging_ase_SubTariffControl_oneTimeCharge,
200 NULL
203 static int
204 dissect_charging_ase_SubTariffControl(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
205 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
206 SubTariffControl_bits, 1, hf_index, ett_charging_ase_SubTariffControl,
207 NULL);
209 return offset;
213 static const ber_sequence_t CommunicationChargeCurrency_sequence[] = {
214 { &hf_charging_ase_currencyFactorScale, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_CurrencyFactorScale },
215 { &hf_charging_ase_tariffDuration, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffDuration },
216 { &hf_charging_ase_subTariffControl, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_charging_ase_SubTariffControl },
217 { NULL, 0, 0, 0, NULL }
220 static int
221 dissect_charging_ase_CommunicationChargeCurrency(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
222 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
223 CommunicationChargeCurrency_sequence, hf_index, ett_charging_ase_CommunicationChargeCurrency);
225 return offset;
229 static const ber_sequence_t SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency_sequence_of[1] = {
230 { &hf_charging_ase_communicationChargeSequenceCurrency_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_charging_ase_CommunicationChargeCurrency },
233 static int
234 dissect_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
235 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
236 SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency_sequence_of, hf_index, ett_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency);
238 return offset;
242 static int * const T_tariffControlIndicators_bits[] = {
243 &hf_charging_ase_T_tariffControlIndicators_non_cyclicTariff,
244 NULL
247 static int
248 dissect_charging_ase_T_tariffControlIndicators(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
249 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
250 T_tariffControlIndicators_bits, 1, hf_index, ett_charging_ase_T_tariffControlIndicators,
251 NULL);
253 return offset;
257 static const ber_sequence_t TariffCurrencyFormat_sequence[] = {
258 { &hf_charging_ase_communicationChargeSequenceCurrency, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency },
259 { &hf_charging_ase_tariffControlIndicators, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_tariffControlIndicators },
260 { &hf_charging_ase_callAttemptChargeCurrency, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_CurrencyFactorScale },
261 { &hf_charging_ase_callSetupChargeCurrency, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_CurrencyFactorScale },
262 { NULL, 0, 0, 0, NULL }
265 static int
266 dissect_charging_ase_TariffCurrencyFormat(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
267 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
268 TariffCurrencyFormat_sequence, hf_index, ett_charging_ase_TariffCurrencyFormat);
270 return offset;
275 static int
276 dissect_charging_ase_TariffSwitchoverTime(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
277 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
278 NULL);
280 return offset;
284 static const ber_sequence_t TariffSwitchCurrency_sequence[] = {
285 { &hf_charging_ase_nextTariffCurrency, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffCurrencyFormat },
286 { &hf_charging_ase_tariffSwitchoverTime, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffSwitchoverTime },
287 { NULL, 0, 0, 0, NULL }
290 static int
291 dissect_charging_ase_TariffSwitchCurrency(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
292 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
293 TariffSwitchCurrency_sequence, hf_index, ett_charging_ase_TariffSwitchCurrency);
295 return offset;
299 static const ber_sequence_t TariffCurrency_sequence[] = {
300 { &hf_charging_ase_currentTariffCurrency, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffCurrencyFormat },
301 { &hf_charging_ase_tariffSwitchCurrency, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffSwitchCurrency },
302 { NULL, 0, 0, 0, NULL }
305 static int
306 dissect_charging_ase_TariffCurrency(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
307 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
308 TariffCurrency_sequence, hf_index, ett_charging_ase_TariffCurrency);
310 return offset;
315 static int
316 dissect_charging_ase_PulseUnits(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
317 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
318 NULL);
320 return offset;
325 static int
326 dissect_charging_ase_ChargeUnitTimeInterval(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
327 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
328 NULL);
330 return offset;
334 static const ber_sequence_t CommunicationChargePulse_sequence[] = {
335 { &hf_charging_ase_pulseUnits, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_PulseUnits },
336 { &hf_charging_ase_chargeUnitTimeInterval, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargeUnitTimeInterval },
337 { &hf_charging_ase_tariffDuration, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffDuration },
338 { NULL, 0, 0, 0, NULL }
341 static int
342 dissect_charging_ase_CommunicationChargePulse(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
343 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
344 CommunicationChargePulse_sequence, hf_index, ett_charging_ase_CommunicationChargePulse);
346 return offset;
350 static const ber_sequence_t SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse_sequence_of[1] = {
351 { &hf_charging_ase_communicationChargeSequencePulse_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_charging_ase_CommunicationChargePulse },
354 static int
355 dissect_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
356 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
357 SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse_sequence_of, hf_index, ett_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse);
359 return offset;
363 static int * const T_tariffControlIndicators_01_bits[] = {
364 &hf_charging_ase_T_tariffControlIndicators_01_non_cyclicTariff,
365 NULL
368 static int
369 dissect_charging_ase_T_tariffControlIndicators_01(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
370 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
371 T_tariffControlIndicators_01_bits, 1, hf_index, ett_charging_ase_T_tariffControlIndicators_01,
372 NULL);
374 return offset;
378 static const ber_sequence_t TariffPulseFormat_sequence[] = {
379 { &hf_charging_ase_communicationChargeSequencePulse, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse },
380 { &hf_charging_ase_tariffControlIndicators_01, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_tariffControlIndicators_01 },
381 { &hf_charging_ase_callAttemptChargePulse, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_PulseUnits },
382 { &hf_charging_ase_callSetupChargePulse, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_PulseUnits },
383 { NULL, 0, 0, 0, NULL }
386 static int
387 dissect_charging_ase_TariffPulseFormat(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
388 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
389 TariffPulseFormat_sequence, hf_index, ett_charging_ase_TariffPulseFormat);
391 return offset;
395 static const ber_sequence_t TariffSwitchPulse_sequence[] = {
396 { &hf_charging_ase_nextTariffPulse, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffPulseFormat },
397 { &hf_charging_ase_tariffSwitchoverTime, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffSwitchoverTime },
398 { NULL, 0, 0, 0, NULL }
401 static int
402 dissect_charging_ase_TariffSwitchPulse(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
403 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
404 TariffSwitchPulse_sequence, hf_index, ett_charging_ase_TariffSwitchPulse);
406 return offset;
410 static const ber_sequence_t TariffPulse_sequence[] = {
411 { &hf_charging_ase_currentTariffPulse, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffPulseFormat },
412 { &hf_charging_ase_tariffSwitchPulse, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffSwitchPulse },
413 { NULL, 0, 0, 0, NULL }
416 static int
417 dissect_charging_ase_TariffPulse(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
418 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
419 TariffPulse_sequence, hf_index, ett_charging_ase_TariffPulse);
421 return offset;
425 static const value_string charging_ase_T_chargingTariff_vals[] = {
426 { 0, "tariffCurrency" },
427 { 1, "tariffPulse" },
428 { 0, NULL }
431 static const ber_choice_t T_chargingTariff_choice[] = {
432 { 0, &hf_charging_ase_tariffCurrency, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffCurrency },
433 { 1, &hf_charging_ase_tariffPulse, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_TariffPulse },
434 { 0, NULL, 0, 0, 0, NULL }
437 static int
438 dissect_charging_ase_T_chargingTariff(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
439 offset = dissect_ber_choice(actx, tree, tvb, offset,
440 T_chargingTariff_choice, hf_index, ett_charging_ase_T_chargingTariff,
441 NULL);
443 return offset;
448 static int
449 dissect_charging_ase_INTEGER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
450 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
451 NULL);
453 return offset;
458 static int
459 dissect_charging_ase_OBJECT_IDENTIFIER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
460 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
462 return offset;
466 static const value_string charging_ase_Code_vals[] = {
467 { 0, "local" },
468 { 1, "global" },
469 { 0, NULL }
472 static const ber_choice_t Code_choice[] = {
473 { 0, &hf_charging_ase_local , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_charging_ase_INTEGER },
474 { 1, &hf_charging_ase_global , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_charging_ase_OBJECT_IDENTIFIER },
475 { 0, NULL, 0, 0, 0, NULL }
478 static int
479 dissect_charging_ase_Code(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
480 offset = dissect_ber_choice(actx, tree, tvb, offset,
481 Code_choice, hf_index, ett_charging_ase_Code,
482 NULL);
484 return offset;
488 static const value_string charging_ase_CriticalityType_vals[] = {
489 { 0, "ignore" },
490 { 1, "abort" },
491 { 0, NULL }
495 static int
496 dissect_charging_ase_CriticalityType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
497 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
498 NULL);
500 return offset;
505 static int
506 dissect_charging_ase_T_value(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
508 proto_tree_add_expert(tree, actx->pinfo, &ei_charging_ase_extensions_not_dissected, tvb, offset, -1);
509 return tvb_reported_length(tvb);
511 return offset;
515 static const ber_sequence_t ExtensionField_sequence[] = {
516 { &hf_charging_ase_type , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_charging_ase_Code },
517 { &hf_charging_ase_criticality, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_charging_ase_CriticalityType },
518 { &hf_charging_ase_value , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_value },
519 { NULL, 0, 0, 0, NULL }
522 static int
523 dissect_charging_ase_ExtensionField(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
524 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
525 ExtensionField_sequence, hf_index, ett_charging_ase_ExtensionField);
527 return offset;
531 static const ber_sequence_t SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField_sequence_of[1] = {
532 { &hf_charging_ase_extensions_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_charging_ase_ExtensionField },
535 static int
536 dissect_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
537 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
538 SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField_sequence_of, hf_index, ett_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField);
540 return offset;
545 static int
546 dissect_charging_ase_NetworkIdentification(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
547 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
549 return offset;
554 static int
555 dissect_charging_ase_ReferenceID(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
556 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
557 NULL);
559 return offset;
563 static const ber_sequence_t ChargingReferenceIdentification_sequence[] = {
564 { &hf_charging_ase_networkIdentification, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_NetworkIdentification },
565 { &hf_charging_ase_referenceID, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_ReferenceID },
566 { NULL, 0, 0, 0, NULL }
569 static int
570 dissect_charging_ase_ChargingReferenceIdentification(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
571 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
572 ChargingReferenceIdentification_sequence, hf_index, ett_charging_ase_ChargingReferenceIdentification);
574 return offset;
578 static const value_string charging_ase_Currency_vals[] = {
579 { 0, "noIndication" },
580 { 1, "australianDollar" },
581 { 2, "austrianSchilling" },
582 { 3, "belgianFranc" },
583 { 4, "britishPound" },
584 { 5, "czechKoruna" },
585 { 6, "danishKrone" },
586 { 7, "dutchGuilder" },
587 { 8, "euro" },
588 { 9, "finnishMarkka" },
589 { 10, "frenchFranc" },
590 { 11, "germanMark" },
591 { 12, "greekDrachma" },
592 { 13, "hungarianForint" },
593 { 14, "irishPunt" },
594 { 15, "italianLira" },
595 { 16, "japaneseYen" },
596 { 17, "luxembourgian-Franc" },
597 { 18, "norwegianKrone" },
598 { 19, "polishZloty" },
599 { 20, "portugeseEscudo" },
600 { 21, "russianRouble" },
601 { 22, "slovakKoruna" },
602 { 23, "spanishPeseta" },
603 { 24, "swedishKrone" },
604 { 25, "swissFranc" },
605 { 26, "turkishLira" },
606 { 27, "uSDollar" },
607 { 0, NULL }
611 static int
612 dissect_charging_ase_Currency(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
613 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
614 NULL);
616 return offset;
620 static const ber_sequence_t ChargingTariffInformation_sequence[] = {
621 { &hf_charging_ase_chargingControlIndicators, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingControlIndicators },
622 { &hf_charging_ase_chargingTariff, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_chargingTariff },
623 { &hf_charging_ase_extensions, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField },
624 { &hf_charging_ase_originationIdentification, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
625 { &hf_charging_ase_destinationIdentification, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
626 { &hf_charging_ase_currency, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_charging_ase_Currency },
627 { NULL, 0, 0, 0, NULL }
630 static int
631 dissect_charging_ase_ChargingTariffInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
632 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
633 ChargingTariffInformation_sequence, hf_index, ett_charging_ase_ChargingTariffInformation);
635 return offset;
639 static const value_string charging_ase_T_addOncharge_vals[] = {
640 { 0, "addOnChargeCurrency" },
641 { 1, "addOnChargePulse" },
642 { 0, NULL }
645 static const ber_choice_t T_addOncharge_choice[] = {
646 { 0, &hf_charging_ase_addOnChargeCurrency, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_CurrencyFactorScale },
647 { 1, &hf_charging_ase_addOnChargePulse, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_PulseUnits },
648 { 0, NULL, 0, 0, 0, NULL }
651 static int
652 dissect_charging_ase_T_addOncharge(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
653 offset = dissect_ber_choice(actx, tree, tvb, offset,
654 T_addOncharge_choice, hf_index, ett_charging_ase_T_addOncharge,
655 NULL);
657 return offset;
661 static const ber_sequence_t AddOnChargingInformation_sequence[] = {
662 { &hf_charging_ase_chargingControlIndicators, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingControlIndicators },
663 { &hf_charging_ase_addOncharge, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_addOncharge },
664 { &hf_charging_ase_extensions, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField },
665 { &hf_charging_ase_originationIdentification, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
666 { &hf_charging_ase_destinationIdentification, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
667 { &hf_charging_ase_currency, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_charging_ase_Currency },
668 { NULL, 0, 0, 0, NULL }
671 static int
672 dissect_charging_ase_AddOnChargingInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
673 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
674 AddOnChargingInformation_sequence, hf_index, ett_charging_ase_AddOnChargingInformation);
676 return offset;
680 static int * const T_acknowledgementIndicators_bits[] = {
681 &hf_charging_ase_T_acknowledgementIndicators_accepted,
682 NULL
685 static int
686 dissect_charging_ase_T_acknowledgementIndicators(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
687 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
688 T_acknowledgementIndicators_bits, 1, hf_index, ett_charging_ase_T_acknowledgementIndicators,
689 NULL);
691 return offset;
695 static const ber_sequence_t ChargingAcknowledgementInformation_sequence[] = {
696 { &hf_charging_ase_acknowledgementIndicators, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_acknowledgementIndicators },
697 { &hf_charging_ase_extensions, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField },
698 { &hf_charging_ase_originationIdentification, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
699 { &hf_charging_ase_destinationIdentification, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
700 { NULL, 0, 0, 0, NULL }
703 static int
704 dissect_charging_ase_ChargingAcknowledgementInformation(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
705 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
706 ChargingAcknowledgementInformation_sequence, hf_index, ett_charging_ase_ChargingAcknowledgementInformation);
708 return offset;
712 static const ber_sequence_t SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification_sequence_of[1] = {
713 { &hf_charging_ase_networkOperators_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_charging_ase_NetworkIdentification },
716 static int
717 dissect_charging_ase_SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
718 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
719 SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification_sequence_of, hf_index, ett_charging_ase_SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification);
721 return offset;
725 static const ber_sequence_t StartCharging_sequence[] = {
726 { &hf_charging_ase_networkOperators, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification },
727 { &hf_charging_ase_extensions, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField },
728 { &hf_charging_ase_originationIdentification, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
729 { NULL, 0, 0, 0, NULL }
732 static int
733 dissect_charging_ase_StartCharging(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
734 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
735 StartCharging_sequence, hf_index, ett_charging_ase_StartCharging);
737 return offset;
741 static int * const T_stopIndicators_bits[] = {
742 &hf_charging_ase_T_stopIndicators_callAttemptChargesApplicable,
743 NULL
746 static int
747 dissect_charging_ase_T_stopIndicators(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
748 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
749 T_stopIndicators_bits, 1, hf_index, ett_charging_ase_T_stopIndicators,
750 NULL);
752 return offset;
756 static const ber_sequence_t StopCharging_sequence[] = {
757 { &hf_charging_ase_stopIndicators, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_T_stopIndicators },
758 { &hf_charging_ase_networkOperators, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification },
759 { &hf_charging_ase_extensions, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField },
760 { &hf_charging_ase_originationIdentification, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingReferenceIdentification },
761 { NULL, 0, 0, 0, NULL }
764 static int
765 dissect_charging_ase_StopCharging(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
766 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
767 StopCharging_sequence, hf_index, ett_charging_ase_StopCharging);
769 return offset;
773 const value_string charging_ase_ChargingMessageType_vals[] = {
774 { 0, "crgt" },
775 { 1, "aocrg" },
776 { 2, "crga" },
777 { 3, "start" },
778 { 4, "stop" },
779 { 0, NULL }
782 static const ber_choice_t ChargingMessageType_choice[] = {
783 { 0, &hf_charging_ase_crgt , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingTariffInformation },
784 { 1, &hf_charging_ase_aocrg , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_charging_ase_AddOnChargingInformation },
785 { 2, &hf_charging_ase_crga , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_charging_ase_ChargingAcknowledgementInformation },
786 { 3, &hf_charging_ase_start , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_charging_ase_StartCharging },
787 { 4, &hf_charging_ase_stop , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_charging_ase_StopCharging },
788 { 0, NULL, 0, 0, 0, NULL }
792 dissect_charging_ase_ChargingMessageType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
793 offset = dissect_ber_choice(actx, tree, tvb, offset,
794 ChargingMessageType_choice, hf_index, ett_charging_ase_ChargingMessageType,
795 NULL);
797 return offset;
800 /*--- PDUs ---*/
802 int dissect_charging_ase_ChargingMessageType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
803 int offset = 0;
804 asn1_ctx_t asn1_ctx;
805 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
806 offset = dissect_charging_ase_ChargingMessageType(false, tvb, offset, &asn1_ctx, tree, hf_charging_ase_charging_ase_ChargingMessageType_PDU);
807 return offset;
811 static int
812 dissect_charging_ase(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
814 proto_item *it;
815 proto_tree *tr;
817 it=proto_tree_add_protocol_format(tree, proto_charging_ase, tvb, 0, -1, "Charging ASE");
818 tr=proto_item_add_subtree(it, ett_charging_ase);
820 if(tvb_reported_length(tvb)>0)
822 dissect_charging_ase_ChargingMessageType_PDU(tvb , pinfo, tr, NULL);
824 return tvb_captured_length(tvb);
827 /* Register all the bits needed with the filtering engine */
828 void
829 proto_register_charging_ase(void)
831 /* List of fields */
832 static hf_register_info hf[] = {
833 { &hf_charging_ase_charging_ase_ChargingMessageType_PDU,
834 { "ChargingMessageType", "charging_ase.ChargingMessageType",
835 FT_UINT32, BASE_DEC, VALS(charging_ase_ChargingMessageType_vals), 0,
836 NULL, HFILL }},
837 { &hf_charging_ase_crgt,
838 { "crgt", "charging_ase.crgt_element",
839 FT_NONE, BASE_NONE, NULL, 0,
840 "ChargingTariffInformation", HFILL }},
841 { &hf_charging_ase_aocrg,
842 { "aocrg", "charging_ase.aocrg_element",
843 FT_NONE, BASE_NONE, NULL, 0,
844 "AddOnChargingInformation", HFILL }},
845 { &hf_charging_ase_crga,
846 { "crga", "charging_ase.crga_element",
847 FT_NONE, BASE_NONE, NULL, 0,
848 "ChargingAcknowledgementInformation", HFILL }},
849 { &hf_charging_ase_start,
850 { "start", "charging_ase.start_element",
851 FT_NONE, BASE_NONE, NULL, 0,
852 "StartCharging", HFILL }},
853 { &hf_charging_ase_stop,
854 { "stop", "charging_ase.stop_element",
855 FT_NONE, BASE_NONE, NULL, 0,
856 "StopCharging", HFILL }},
857 { &hf_charging_ase_acknowledgementIndicators,
858 { "acknowledgementIndicators", "charging_ase.acknowledgementIndicators",
859 FT_BYTES, BASE_NONE, NULL, 0,
860 NULL, HFILL }},
861 { &hf_charging_ase_extensions,
862 { "extensions", "charging_ase.extensions",
863 FT_UINT32, BASE_DEC, NULL, 0,
864 "SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField", HFILL }},
865 { &hf_charging_ase_extensions_item,
866 { "ExtensionField", "charging_ase.ExtensionField_element",
867 FT_NONE, BASE_NONE, NULL, 0,
868 NULL, HFILL }},
869 { &hf_charging_ase_originationIdentification,
870 { "originationIdentification", "charging_ase.originationIdentification_element",
871 FT_NONE, BASE_NONE, NULL, 0,
872 "ChargingReferenceIdentification", HFILL }},
873 { &hf_charging_ase_destinationIdentification,
874 { "destinationIdentification", "charging_ase.destinationIdentification_element",
875 FT_NONE, BASE_NONE, NULL, 0,
876 "ChargingReferenceIdentification", HFILL }},
877 { &hf_charging_ase_chargingControlIndicators,
878 { "chargingControlIndicators", "charging_ase.chargingControlIndicators",
879 FT_BYTES, BASE_NONE, NULL, 0,
880 NULL, HFILL }},
881 { &hf_charging_ase_addOncharge,
882 { "addOncharge", "charging_ase.addOncharge",
883 FT_UINT32, BASE_DEC, VALS(charging_ase_T_addOncharge_vals), 0,
884 NULL, HFILL }},
885 { &hf_charging_ase_addOnChargeCurrency,
886 { "addOnChargeCurrency", "charging_ase.addOnChargeCurrency_element",
887 FT_NONE, BASE_NONE, NULL, 0,
888 "CurrencyFactorScale", HFILL }},
889 { &hf_charging_ase_addOnChargePulse,
890 { "addOnChargePulse", "charging_ase.addOnChargePulse",
891 FT_BYTES, BASE_NONE, NULL, 0,
892 "PulseUnits", HFILL }},
893 { &hf_charging_ase_currency,
894 { "currency", "charging_ase.currency",
895 FT_UINT32, BASE_DEC, VALS(charging_ase_Currency_vals), 0,
896 NULL, HFILL }},
897 { &hf_charging_ase_chargingTariff,
898 { "chargingTariff", "charging_ase.chargingTariff",
899 FT_UINT32, BASE_DEC, VALS(charging_ase_T_chargingTariff_vals), 0,
900 NULL, HFILL }},
901 { &hf_charging_ase_tariffCurrency,
902 { "tariffCurrency", "charging_ase.tariffCurrency_element",
903 FT_NONE, BASE_NONE, NULL, 0,
904 NULL, HFILL }},
905 { &hf_charging_ase_tariffPulse,
906 { "tariffPulse", "charging_ase.tariffPulse_element",
907 FT_NONE, BASE_NONE, NULL, 0,
908 NULL, HFILL }},
909 { &hf_charging_ase_local,
910 { "local", "charging_ase.local",
911 FT_INT32, BASE_DEC, NULL, 0,
912 "INTEGER", HFILL }},
913 { &hf_charging_ase_global,
914 { "global", "charging_ase.global",
915 FT_OID, BASE_NONE, NULL, 0,
916 "OBJECT_IDENTIFIER", HFILL }},
917 { &hf_charging_ase_currencyFactorScale,
918 { "currencyFactorScale", "charging_ase.currencyFactorScale_element",
919 FT_NONE, BASE_NONE, NULL, 0,
920 NULL, HFILL }},
921 { &hf_charging_ase_tariffDuration,
922 { "tariffDuration", "charging_ase.tariffDuration",
923 FT_UINT32, BASE_DEC, NULL, 0,
924 NULL, HFILL }},
925 { &hf_charging_ase_subTariffControl,
926 { "subTariffControl", "charging_ase.subTariffControl",
927 FT_BYTES, BASE_NONE, NULL, 0,
928 NULL, HFILL }},
929 { &hf_charging_ase_pulseUnits,
930 { "pulseUnits", "charging_ase.pulseUnits",
931 FT_BYTES, BASE_NONE, NULL, 0,
932 NULL, HFILL }},
933 { &hf_charging_ase_chargeUnitTimeInterval,
934 { "chargeUnitTimeInterval", "charging_ase.chargeUnitTimeInterval",
935 FT_BYTES, BASE_NONE, NULL, 0,
936 NULL, HFILL }},
937 { &hf_charging_ase_currencyFactor,
938 { "currencyFactor", "charging_ase.currencyFactor",
939 FT_UINT32, BASE_DEC, NULL, 0,
940 NULL, HFILL }},
941 { &hf_charging_ase_currencyScale,
942 { "currencyScale", "charging_ase.currencyScale",
943 FT_INT32, BASE_DEC, NULL, 0,
944 NULL, HFILL }},
945 { &hf_charging_ase_type,
946 { "type", "charging_ase.type",
947 FT_UINT32, BASE_DEC, VALS(charging_ase_Code_vals), 0,
948 "Code", HFILL }},
949 { &hf_charging_ase_criticality,
950 { "criticality", "charging_ase.criticality",
951 FT_UINT32, BASE_DEC, VALS(charging_ase_CriticalityType_vals), 0,
952 "CriticalityType", HFILL }},
953 { &hf_charging_ase_value,
954 { "value", "charging_ase.value_element",
955 FT_NONE, BASE_NONE, NULL, 0,
956 NULL, HFILL }},
957 { &hf_charging_ase_networkOperators,
958 { "networkOperators", "charging_ase.networkOperators",
959 FT_UINT32, BASE_DEC, NULL, 0,
960 "SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification", HFILL }},
961 { &hf_charging_ase_networkOperators_item,
962 { "NetworkIdentification", "charging_ase.NetworkIdentification",
963 FT_OID, BASE_NONE, NULL, 0,
964 NULL, HFILL }},
965 { &hf_charging_ase_stopIndicators,
966 { "stopIndicators", "charging_ase.stopIndicators",
967 FT_BYTES, BASE_NONE, NULL, 0,
968 NULL, HFILL }},
969 { &hf_charging_ase_currentTariffCurrency,
970 { "currentTariffCurrency", "charging_ase.currentTariffCurrency_element",
971 FT_NONE, BASE_NONE, NULL, 0,
972 "TariffCurrencyFormat", HFILL }},
973 { &hf_charging_ase_tariffSwitchCurrency,
974 { "tariffSwitchCurrency", "charging_ase.tariffSwitchCurrency_element",
975 FT_NONE, BASE_NONE, NULL, 0,
976 NULL, HFILL }},
977 { &hf_charging_ase_nextTariffCurrency,
978 { "nextTariffCurrency", "charging_ase.nextTariffCurrency_element",
979 FT_NONE, BASE_NONE, NULL, 0,
980 "TariffCurrencyFormat", HFILL }},
981 { &hf_charging_ase_tariffSwitchoverTime,
982 { "tariffSwitchoverTime", "charging_ase.tariffSwitchoverTime",
983 FT_BYTES, BASE_NONE, NULL, 0,
984 NULL, HFILL }},
985 { &hf_charging_ase_communicationChargeSequenceCurrency,
986 { "communicationChargeSequenceCurrency", "charging_ase.communicationChargeSequenceCurrency",
987 FT_UINT32, BASE_DEC, NULL, 0,
988 "SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency", HFILL }},
989 { &hf_charging_ase_communicationChargeSequenceCurrency_item,
990 { "CommunicationChargeCurrency", "charging_ase.CommunicationChargeCurrency_element",
991 FT_NONE, BASE_NONE, NULL, 0,
992 NULL, HFILL }},
993 { &hf_charging_ase_tariffControlIndicators,
994 { "tariffControlIndicators", "charging_ase.tariffControlIndicators",
995 FT_BYTES, BASE_NONE, NULL, 0,
996 NULL, HFILL }},
997 { &hf_charging_ase_callAttemptChargeCurrency,
998 { "callAttemptChargeCurrency", "charging_ase.callAttemptChargeCurrency_element",
999 FT_NONE, BASE_NONE, NULL, 0,
1000 "CurrencyFactorScale", HFILL }},
1001 { &hf_charging_ase_callSetupChargeCurrency,
1002 { "callSetupChargeCurrency", "charging_ase.callSetupChargeCurrency_element",
1003 FT_NONE, BASE_NONE, NULL, 0,
1004 "CurrencyFactorScale", HFILL }},
1005 { &hf_charging_ase_currentTariffPulse,
1006 { "currentTariffPulse", "charging_ase.currentTariffPulse_element",
1007 FT_NONE, BASE_NONE, NULL, 0,
1008 "TariffPulseFormat", HFILL }},
1009 { &hf_charging_ase_tariffSwitchPulse,
1010 { "tariffSwitchPulse", "charging_ase.tariffSwitchPulse_element",
1011 FT_NONE, BASE_NONE, NULL, 0,
1012 NULL, HFILL }},
1013 { &hf_charging_ase_nextTariffPulse,
1014 { "nextTariffPulse", "charging_ase.nextTariffPulse_element",
1015 FT_NONE, BASE_NONE, NULL, 0,
1016 "TariffPulseFormat", HFILL }},
1017 { &hf_charging_ase_communicationChargeSequencePulse,
1018 { "communicationChargeSequencePulse", "charging_ase.communicationChargeSequencePulse",
1019 FT_UINT32, BASE_DEC, NULL, 0,
1020 "SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse", HFILL }},
1021 { &hf_charging_ase_communicationChargeSequencePulse_item,
1022 { "CommunicationChargePulse", "charging_ase.CommunicationChargePulse_element",
1023 FT_NONE, BASE_NONE, NULL, 0,
1024 NULL, HFILL }},
1025 { &hf_charging_ase_tariffControlIndicators_01,
1026 { "tariffControlIndicators", "charging_ase.tariffControlIndicators",
1027 FT_BYTES, BASE_NONE, NULL, 0,
1028 "T_tariffControlIndicators_01", HFILL }},
1029 { &hf_charging_ase_callAttemptChargePulse,
1030 { "callAttemptChargePulse", "charging_ase.callAttemptChargePulse",
1031 FT_BYTES, BASE_NONE, NULL, 0,
1032 "PulseUnits", HFILL }},
1033 { &hf_charging_ase_callSetupChargePulse,
1034 { "callSetupChargePulse", "charging_ase.callSetupChargePulse",
1035 FT_BYTES, BASE_NONE, NULL, 0,
1036 "PulseUnits", HFILL }},
1037 { &hf_charging_ase_networkIdentification,
1038 { "networkIdentification", "charging_ase.networkIdentification",
1039 FT_OID, BASE_NONE, NULL, 0,
1040 NULL, HFILL }},
1041 { &hf_charging_ase_referenceID,
1042 { "referenceID", "charging_ase.referenceID",
1043 FT_UINT32, BASE_DEC, NULL, 0,
1044 NULL, HFILL }},
1045 { &hf_charging_ase_T_acknowledgementIndicators_accepted,
1046 { "accepted", "charging.ase.T.acknowledgementIndicators.accepted",
1047 FT_BOOLEAN, 8, NULL, 0x80,
1048 NULL, HFILL }},
1049 { &hf_charging_ase_ChargingControlIndicators_subscriberCharge,
1050 { "subscriberCharge", "charging.ase.ChargingControlIndicators.subscriberCharge",
1051 FT_BOOLEAN, 8, NULL, 0x80,
1052 NULL, HFILL }},
1053 { &hf_charging_ase_ChargingControlIndicators_immediateChangeOfActuallyAppliedTariff,
1054 { "immediateChangeOfActuallyAppliedTariff", "charging.ase.ChargingControlIndicators.immediateChangeOfActuallyAppliedTariff",
1055 FT_BOOLEAN, 8, NULL, 0x40,
1056 NULL, HFILL }},
1057 { &hf_charging_ase_ChargingControlIndicators_delayUntilStart,
1058 { "delayUntilStart", "charging.ase.ChargingControlIndicators.delayUntilStart",
1059 FT_BOOLEAN, 8, NULL, 0x20,
1060 NULL, HFILL }},
1061 { &hf_charging_ase_T_stopIndicators_callAttemptChargesApplicable,
1062 { "callAttemptChargesApplicable", "charging.ase.T.stopIndicators.callAttemptChargesApplicable",
1063 FT_BOOLEAN, 8, NULL, 0x80,
1064 NULL, HFILL }},
1065 { &hf_charging_ase_SubTariffControl_oneTimeCharge,
1066 { "oneTimeCharge", "charging.ase.SubTariffControl.oneTimeCharge",
1067 FT_BOOLEAN, 8, NULL, 0x80,
1068 NULL, HFILL }},
1069 { &hf_charging_ase_T_tariffControlIndicators_non_cyclicTariff,
1070 { "non-cyclicTariff", "charging.ase.T.tariffControlIndicators.non.cyclicTariff",
1071 FT_BOOLEAN, 8, NULL, 0x80,
1072 NULL, HFILL }},
1073 { &hf_charging_ase_T_tariffControlIndicators_01_non_cyclicTariff,
1074 { "non-cyclicTariff", "charging.ase.T.tariffControlIndicators.01.non.cyclicTariff",
1075 FT_BOOLEAN, 8, NULL, 0x80,
1076 NULL, HFILL }},
1079 /* List of subtrees */
1080 static int *ett[] = {
1081 &ett_charging_ase,
1082 &ett_charging_ase_ChargingMessageType,
1083 &ett_charging_ase_ChargingAcknowledgementInformation,
1084 &ett_charging_ase_T_acknowledgementIndicators,
1085 &ett_charging_ase_SEQUENCE_SIZE_1_numOfExtensions_OF_ExtensionField,
1086 &ett_charging_ase_ChargingControlIndicators,
1087 &ett_charging_ase_AddOnChargingInformation,
1088 &ett_charging_ase_T_addOncharge,
1089 &ett_charging_ase_ChargingTariffInformation,
1090 &ett_charging_ase_T_chargingTariff,
1091 &ett_charging_ase_Code,
1092 &ett_charging_ase_CommunicationChargeCurrency,
1093 &ett_charging_ase_CommunicationChargePulse,
1094 &ett_charging_ase_CurrencyFactorScale,
1095 &ett_charging_ase_ExtensionField,
1096 &ett_charging_ase_StartCharging,
1097 &ett_charging_ase_SEQUENCE_SIZE_1_maxNetworkOperators_OF_NetworkIdentification,
1098 &ett_charging_ase_StopCharging,
1099 &ett_charging_ase_T_stopIndicators,
1100 &ett_charging_ase_SubTariffControl,
1101 &ett_charging_ase_TariffCurrency,
1102 &ett_charging_ase_TariffSwitchCurrency,
1103 &ett_charging_ase_TariffCurrencyFormat,
1104 &ett_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargeCurrency,
1105 &ett_charging_ase_T_tariffControlIndicators,
1106 &ett_charging_ase_TariffPulse,
1107 &ett_charging_ase_TariffSwitchPulse,
1108 &ett_charging_ase_TariffPulseFormat,
1109 &ett_charging_ase_SEQUENCE_SIZE_minCommunicationTariffNum_maxCommunicationTariffNum_OF_CommunicationChargePulse,
1110 &ett_charging_ase_T_tariffControlIndicators_01,
1111 &ett_charging_ase_ChargingReferenceIdentification,
1114 static ei_register_info ei[] = {
1115 { &ei_charging_ase_extensions_not_dissected, { "charging_ase.extensions_not_dissected", PI_UNDECODED, PI_WARN, "Extensions not dissected", EXPFILL }},
1118 expert_module_t* expert_charging_ase;
1120 proto_charging_ase = proto_register_protocol(PNAME, PSNAME, PFNAME);
1122 proto_register_field_array(proto_charging_ase, hf, array_length(hf));
1123 proto_register_subtree_array(ett, array_length(ett));
1124 expert_charging_ase = expert_register_protocol(proto_charging_ase);
1125 expert_register_field_array(expert_charging_ase, ei, array_length(ei));
1126 charging_ase_handle = register_dissector("charging_ase", dissect_charging_ase, proto_charging_ase);
1129 /* The registration hand-off routine */
1130 void
1131 proto_reg_handoff_charging_ase(void)