1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
4 /* asn2wrs.py -b -q -L -p q932 -c ./q932.cnf -s ./packet-q932-template -D . -O ../.. Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn */
7 * Routines for Q.932 packet dissection
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
19 #include <epan/packet.h>
20 #include <epan/expert.h>
21 #include <epan/strutil.h>
22 #include <epan/asn1.h>
23 #include <epan/prefs.h>
24 #include <wsutil/array.h>
26 #include "packet-ber.h"
27 #include "packet-q932.h"
33 void proto_register_q932(void);
35 /* Initialize the protocol and registered fields */
36 static int proto_q932
;
37 static int hf_q932_ie_type
;
38 static int hf_q932_ie_len
;
39 static int hf_q932_ie_data
;
40 static int hf_q932_pp
;
41 static int hf_q932_nd
;
42 static int hf_q932_NetworkFacilityExtension_PDU
; /* NetworkFacilityExtension */
43 static int hf_q932_NetworkProtocolProfile_PDU
; /* NetworkProtocolProfile */
44 static int hf_q932_InterpretationComponent_PDU
; /* InterpretationComponent */
45 static int hf_q932_presentationAlIowedAddress
; /* AddressScreened */
46 static int hf_q932_presentationRestricted
; /* NULL */
47 static int hf_q932_numberNotAvailableDueTolnterworking
; /* NULL */
48 static int hf_q932_presentationRestrictedAddressScreened
; /* AddressScreened */
49 static int hf_q932_presentationAllowedAddress
; /* Address */
50 static int hf_q932_presentationRestrictedAddress
; /* Address */
51 static int hf_q932_presentationAllowedNumberScreened
; /* NumberScreened */
52 static int hf_q932_numberNotAvailableDueToInterworking
; /* NULL */
53 static int hf_q932_presentationRestrictedNumberScreened
; /* NumberScreened */
54 static int hf_q932_presentationAllowedNumber
; /* PartyNumber */
55 static int hf_q932_presentationRestrictedNumber
; /* PartyNumber */
56 static int hf_q932_partyNumber
; /* PartyNumber */
57 static int hf_q932_screeninglndicator
; /* ScreeningIndicator */
58 static int hf_q932_partySubaddress
; /* PartySubaddress */
59 static int hf_q932_screeningIndicator
; /* ScreeningIndicator */
60 static int hf_q932_unknownPartyNumber
; /* NumberDigits */
61 static int hf_q932_publicPartyNumber
; /* PublicPartyNumber */
62 static int hf_q932_nsapEncodedNumber
; /* NsapEncodedNumber */
63 static int hf_q932_dataPartyNumber
; /* NumberDigits */
64 static int hf_q932_telexPartyNumber
; /* NumberDigits */
65 static int hf_q932_privatePartyNumber
; /* PrivatePartyNumber */
66 static int hf_q932_nationalStandardPartyNumber
; /* NumberDigits */
67 static int hf_q932_publicTypeOfNumber
; /* PublicTypeOfNumber */
68 static int hf_q932_publicNumberDigits
; /* NumberDigits */
69 static int hf_q932_privateTypeOfNumber
; /* PrivateTypeOfNumber */
70 static int hf_q932_privateNumberDigits
; /* NumberDigits */
71 static int hf_q932_userSpecifiedSubaddress
; /* UserSpecifiedSubaddress */
72 static int hf_q932_nSAPSubaddress
; /* NSAPSubaddress */
73 static int hf_q932_subaddressInformation
; /* SubaddressInformation */
74 static int hf_q932_oddCountIndicator
; /* BOOLEAN */
75 static int hf_q932_sourceEntity
; /* EntityType */
76 static int hf_q932_sourceEntityAddress
; /* AddressInformation */
77 static int hf_q932_destinationEntity
; /* EntityType */
78 static int hf_q932_destinationEntityAddress
; /* AddressInformation */
80 /* Initialize the subtree pointers */
82 static int ett_q932_ie
;
83 static int ett_q932_PresentedAddressScreened
;
84 static int ett_q932_PresentedAddressUnscreened
;
85 static int ett_q932_PresentedNumberScreened
;
86 static int ett_q932_PresentedNumberUnscreened
;
87 static int ett_q932_AddressScreened
;
88 static int ett_q932_NumberScreened
;
89 static int ett_q932_Address
;
90 static int ett_q932_PartyNumber
;
91 static int ett_q932_PublicPartyNumber
;
92 static int ett_q932_PrivatePartyNumber
;
93 static int ett_q932_PartySubaddress
;
94 static int ett_q932_UserSpecifiedSubaddress
;
95 static int ett_q932_NetworkFacilityExtension_U
;
97 static expert_field ei_q932_dse_not_supported
;
98 static expert_field ei_q932_acse_not_supported
;
99 static expert_field ei_q932_unknown_component
;
100 static expert_field ei_q932_asn1_encoded
;
106 static rose_ctx_t q932_rose_ctx
;
108 dissector_table_t qsig_arg_local_dissector_table
;
109 dissector_table_t qsig_res_local_dissector_table
;
110 dissector_table_t qsig_err_local_dissector_table
;
112 dissector_table_t etsi_arg_local_dissector_table
;
113 dissector_table_t etsi_res_local_dissector_table
;
114 dissector_table_t etsi_err_local_dissector_table
;
116 #define FACILITY_QSIG 0
117 #define FACILITY_ETSI 1
118 static int g_facility_encoding
= FACILITY_QSIG
;
120 void proto_reg_handoff_q932(void);
122 static dissector_handle_t q932_ie_handle
;
125 static dissector_handle_t q932_ros_handle
;
127 #define Q932_IE_EXTENDED_FACILITY 0x0D
128 #define Q932_IE_FACILITY 0x1C
129 #define Q932_IE_NOTIFICATION_INDICATOR 0x27
130 #define Q932_IE_INFORMATION_REQUEST 0x32
131 #define Q932_IE_FEATURE_ACTIVATION 0x38
132 #define Q932_IE_FEATURE_INDICATION 0x39
133 #define Q932_IE_SERVICE_PROFILE_ID 0x3A
134 #define Q932_IE_ENDPOINT_IDENTIFIER 0x3B
135 static const value_string q932_str_ie_type
[] = {
136 { Q932_IE_EXTENDED_FACILITY
, "Extended facility" },
137 { Q932_IE_FACILITY
, "Facility" },
138 { Q932_IE_NOTIFICATION_INDICATOR
, "Notification indicator" },
139 { Q932_IE_INFORMATION_REQUEST
, "Information request" },
140 { Q932_IE_FEATURE_ACTIVATION
, "Feature activation" },
141 { Q932_IE_FEATURE_INDICATION
, "Feature indication" },
142 { Q932_IE_SERVICE_PROFILE_ID
, "Service profile identification" },
143 { Q932_IE_ENDPOINT_IDENTIFIER
, "Endpoint identifier" },
147 static const value_string str_pp
[] = {
148 { 0x11 , "Remote Operations Protocol" },
149 { 0x12 , "CMIP Protocol" },
150 { 0x13 , "ACSE Protocol" },
151 { 0x1F , "Networking extensions" },
155 static const value_string str_nd
[] = {
156 { 0x00 , "User suspended" },
157 { 0x01 , "User resume" },
158 { 0x02 , "Bearer service change" },
159 { 0x04 , "Call completion delay" },
160 { 0x03 , "Discriminator for extension to ASN.1 encoded component" },
161 { 0x40 , "Discriminator for extension to ASN.1 encoded component for ISO" },
162 { 0x42 , "Conference established" },
163 { 0x43 , "Conference disconnected" },
164 { 0x44 , "Other party added" },
165 { 0x45 , "Isolated" },
166 { 0x46 , "Reattached" },
167 { 0x47 , "Other party isolated" },
168 { 0x48 , "Other party reattached" },
169 { 0x49 , "Other party split" },
170 { 0x4A , "Other party disconnected" },
171 { 0x4B , "Conference floating" },
172 { 0x4C , "Conference disconnected, pre-emption" },
173 { 0x4F , "Conference floating, served user pre-empted" },
174 { 0x60 , "Call is a waiting call" },
175 { 0x68 , "Diversion activated" },
176 { 0x69 , "call transferred, alerting" },
177 { 0x6A , "call transferred, answered" },
178 { 0x6E , "reverse charging (whole call)" },
179 { 0x6F , "reverse charging (for the rest of the call)" },
180 { 0x74 , "service profile update" },
181 { 0x79 , "Remote hold" },
182 { 0x7A , "Remote retrieval" },
183 { 0x7B , "Call is diverting" },
190 dissect_q932_NumberDigits(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_restricted_string(implicit_tag
, BER_UNI_TAG_NumericString
,
192 actx
, tree
, tvb
, offset
, hf_index
,
199 static const value_string q932_PublicTypeOfNumber_vals
[] = {
201 { 1, "internationalNumber" },
202 { 2, "nationalNumber" },
203 { 3, "networkSpecificNumber" },
204 { 4, "subscriberNumber" },
205 { 6, "abbreviatedNumber" },
211 dissect_q932_PublicTypeOfNumber(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
212 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
219 static const ber_sequence_t PublicPartyNumber_sequence
[] = {
220 { &hf_q932_publicTypeOfNumber
, BER_CLASS_UNI
, BER_UNI_TAG_ENUMERATED
, BER_FLAGS_NOOWNTAG
, dissect_q932_PublicTypeOfNumber
},
221 { &hf_q932_publicNumberDigits
, BER_CLASS_UNI
, BER_UNI_TAG_NumericString
, BER_FLAGS_NOOWNTAG
, dissect_q932_NumberDigits
},
222 { NULL
, 0, 0, 0, NULL
}
226 dissect_q932_PublicPartyNumber(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
227 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
228 PublicPartyNumber_sequence
, hf_index
, ett_q932_PublicPartyNumber
);
236 dissect_q932_NsapEncodedNumber(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
237 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
244 static const value_string q932_PrivateTypeOfNumber_vals
[] = {
246 { 1, "level2RegionalNumber" },
247 { 2, "level1RegionalNumber" },
248 { 3, "pTNSpecificNumber" },
249 { 4, "localNumber" },
250 { 6, "abbreviatedNumber" },
256 dissect_q932_PrivateTypeOfNumber(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
257 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
264 static const ber_sequence_t PrivatePartyNumber_sequence
[] = {
265 { &hf_q932_privateTypeOfNumber
, BER_CLASS_UNI
, BER_UNI_TAG_ENUMERATED
, BER_FLAGS_NOOWNTAG
, dissect_q932_PrivateTypeOfNumber
},
266 { &hf_q932_privateNumberDigits
, BER_CLASS_UNI
, BER_UNI_TAG_NumericString
, BER_FLAGS_NOOWNTAG
, dissect_q932_NumberDigits
},
267 { NULL
, 0, 0, 0, NULL
}
271 dissect_q932_PrivatePartyNumber(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
272 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
273 PrivatePartyNumber_sequence
, hf_index
, ett_q932_PrivatePartyNumber
);
279 const value_string q932_PartyNumber_vals
[] = {
280 { 0, "unknownPartyNumber" },
281 { 1, "publicPartyNumber" },
282 { 2, "nsapEncodedNumber" },
283 { 3, "dataPartyNumber" },
284 { 4, "telexPartyNumber" },
285 { 5, "privatePartyNumber" },
286 { 8, "nationalStandardPartyNumber" },
290 static const ber_choice_t PartyNumber_choice
[] = {
291 { 0, &hf_q932_unknownPartyNumber
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_q932_NumberDigits
},
292 { 1, &hf_q932_publicPartyNumber
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_q932_PublicPartyNumber
},
293 { 2, &hf_q932_nsapEncodedNumber
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_q932_NsapEncodedNumber
},
294 { 3, &hf_q932_dataPartyNumber
, BER_CLASS_CON
, 3, BER_FLAGS_IMPLTAG
, dissect_q932_NumberDigits
},
295 { 4, &hf_q932_telexPartyNumber
, BER_CLASS_CON
, 4, BER_FLAGS_IMPLTAG
, dissect_q932_NumberDigits
},
296 { 5, &hf_q932_privatePartyNumber
, BER_CLASS_CON
, 5, BER_FLAGS_IMPLTAG
, dissect_q932_PrivatePartyNumber
},
297 { 8, &hf_q932_nationalStandardPartyNumber
, BER_CLASS_CON
, 8, BER_FLAGS_IMPLTAG
, dissect_q932_NumberDigits
},
298 { 0, NULL
, 0, 0, 0, NULL
}
302 dissect_q932_PartyNumber(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
303 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
304 PartyNumber_choice
, hf_index
, ett_q932_PartyNumber
,
311 const value_string q932_ScreeningIndicator_vals
[] = {
312 { 0, "userProvidedNotScreened" },
313 { 1, "userProvidedVerifiedAndPassed" },
314 { 2, "userProvidedVerifiedAndFailed" },
315 { 3, "networkProvided" },
321 dissect_q932_ScreeningIndicator(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
322 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
331 dissect_q932_SubaddressInformation(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
332 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
341 dissect_q932_BOOLEAN(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
342 offset
= dissect_ber_boolean(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
, NULL
);
348 static const ber_sequence_t UserSpecifiedSubaddress_sequence
[] = {
349 { &hf_q932_subaddressInformation
, BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, BER_FLAGS_NOOWNTAG
, dissect_q932_SubaddressInformation
},
350 { &hf_q932_oddCountIndicator
, BER_CLASS_UNI
, BER_UNI_TAG_BOOLEAN
, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
, dissect_q932_BOOLEAN
},
351 { NULL
, 0, 0, 0, NULL
}
355 dissect_q932_UserSpecifiedSubaddress(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(implicit_tag
, actx
, tree
, tvb
, offset
,
357 UserSpecifiedSubaddress_sequence
, hf_index
, ett_q932_UserSpecifiedSubaddress
);
365 dissect_q932_NSAPSubaddress(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
366 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
373 const value_string q932_PartySubaddress_vals
[] = {
374 { 0, "userSpecifiedSubaddress" },
375 { 1, "nSAPSubaddress" },
379 static const ber_choice_t PartySubaddress_choice
[] = {
380 { 0, &hf_q932_userSpecifiedSubaddress
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_q932_UserSpecifiedSubaddress
},
381 { 1, &hf_q932_nSAPSubaddress
, BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, BER_FLAGS_NOOWNTAG
, dissect_q932_NSAPSubaddress
},
382 { 0, NULL
, 0, 0, 0, NULL
}
386 dissect_q932_PartySubaddress(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
387 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
388 PartySubaddress_choice
, hf_index
, ett_q932_PartySubaddress
,
395 static const ber_sequence_t AddressScreened_sequence
[] = {
396 { &hf_q932_partyNumber
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_q932_PartyNumber
},
397 { &hf_q932_screeninglndicator
, BER_CLASS_UNI
, BER_UNI_TAG_ENUMERATED
, BER_FLAGS_NOOWNTAG
, dissect_q932_ScreeningIndicator
},
398 { &hf_q932_partySubaddress
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_q932_PartySubaddress
},
399 { NULL
, 0, 0, 0, NULL
}
403 dissect_q932_AddressScreened(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
404 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
405 AddressScreened_sequence
, hf_index
, ett_q932_AddressScreened
);
413 dissect_q932_NULL(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
414 offset
= dissect_ber_null(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
);
420 const value_string q932_PresentedAddressScreened_vals
[] = {
421 { 0, "presentationAlIowedAddress" },
422 { 1, "presentationRestricted" },
423 { 2, "numberNotAvailableDueTolnterworking" },
424 { 3, "presentationRestrictedAddress" },
428 static const ber_choice_t PresentedAddressScreened_choice
[] = {
429 { 0, &hf_q932_presentationAlIowedAddress
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_q932_AddressScreened
},
430 { 1, &hf_q932_presentationRestricted
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
431 { 2, &hf_q932_numberNotAvailableDueTolnterworking
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
432 { 3, &hf_q932_presentationRestrictedAddressScreened
, BER_CLASS_CON
, 3, BER_FLAGS_IMPLTAG
, dissect_q932_AddressScreened
},
433 { 0, NULL
, 0, 0, 0, NULL
}
437 dissect_q932_PresentedAddressScreened(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
438 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
439 PresentedAddressScreened_choice
, hf_index
, ett_q932_PresentedAddressScreened
,
446 static const ber_sequence_t Address_sequence
[] = {
447 { &hf_q932_partyNumber
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_q932_PartyNumber
},
448 { &hf_q932_partySubaddress
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_q932_PartySubaddress
},
449 { NULL
, 0, 0, 0, NULL
}
453 dissect_q932_Address(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
454 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
455 Address_sequence
, hf_index
, ett_q932_Address
);
461 const value_string q932_PresentedAddressUnscreened_vals
[] = {
462 { 0, "presentationAllowedAddress" },
463 { 1, "presentationRestricted" },
464 { 2, "numberNotAvailableDueTolnterworking" },
465 { 3, "presentationRestrictedAddress" },
469 static const ber_choice_t PresentedAddressUnscreened_choice
[] = {
470 { 0, &hf_q932_presentationAllowedAddress
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_q932_Address
},
471 { 1, &hf_q932_presentationRestricted
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
472 { 2, &hf_q932_numberNotAvailableDueTolnterworking
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
473 { 3, &hf_q932_presentationRestrictedAddress
, BER_CLASS_CON
, 3, BER_FLAGS_IMPLTAG
, dissect_q932_Address
},
474 { 0, NULL
, 0, 0, 0, NULL
}
478 dissect_q932_PresentedAddressUnscreened(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
479 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
480 PresentedAddressUnscreened_choice
, hf_index
, ett_q932_PresentedAddressUnscreened
,
487 static const ber_sequence_t NumberScreened_sequence
[] = {
488 { &hf_q932_partyNumber
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_q932_PartyNumber
},
489 { &hf_q932_screeningIndicator
, BER_CLASS_UNI
, BER_UNI_TAG_ENUMERATED
, BER_FLAGS_NOOWNTAG
, dissect_q932_ScreeningIndicator
},
490 { NULL
, 0, 0, 0, NULL
}
494 dissect_q932_NumberScreened(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
495 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
496 NumberScreened_sequence
, hf_index
, ett_q932_NumberScreened
);
502 const value_string q932_PresentedNumberScreened_vals
[] = {
503 { 0, "presentationAllowedNumber" },
504 { 1, "presentationRestricted" },
505 { 2, "numberNotAvailableDueToInterworking" },
506 { 3, "presentationRestrictedNumber" },
510 static const ber_choice_t PresentedNumberScreened_choice
[] = {
511 { 0, &hf_q932_presentationAllowedNumberScreened
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_q932_NumberScreened
},
512 { 1, &hf_q932_presentationRestricted
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
513 { 2, &hf_q932_numberNotAvailableDueToInterworking
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
514 { 3, &hf_q932_presentationRestrictedNumberScreened
, BER_CLASS_CON
, 3, BER_FLAGS_IMPLTAG
, dissect_q932_NumberScreened
},
515 { 0, NULL
, 0, 0, 0, NULL
}
519 dissect_q932_PresentedNumberScreened(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
520 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
521 PresentedNumberScreened_choice
, hf_index
, ett_q932_PresentedNumberScreened
,
528 const value_string q932_PresentedNumberUnscreened_vals
[] = {
529 { 0, "presentationAllowedNumber" },
530 { 1, "presentationRestricted" },
531 { 2, "numberNotAvailableDueToInterworking" },
532 { 3, "presentationRestrictedNumber" },
536 static const ber_choice_t PresentedNumberUnscreened_choice
[] = {
537 { 0, &hf_q932_presentationAllowedNumber
, BER_CLASS_CON
, 0, 0, dissect_q932_PartyNumber
},
538 { 1, &hf_q932_presentationRestricted
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
539 { 2, &hf_q932_numberNotAvailableDueToInterworking
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_q932_NULL
},
540 { 3, &hf_q932_presentationRestrictedNumber
, BER_CLASS_CON
, 3, 0, dissect_q932_PartyNumber
},
541 { 0, NULL
, 0, 0, 0, NULL
}
545 dissect_q932_PresentedNumberUnscreened(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
546 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
547 PresentedNumberUnscreened_choice
, hf_index
, ett_q932_PresentedNumberUnscreened
,
556 dissect_q932_PresentationAllowedIndicator(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
557 offset
= dissect_ber_boolean(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
, NULL
);
563 static const value_string q932_EntityType_vals
[] = {
565 { 1, "anyTypeOfPINX" },
571 dissect_q932_EntityType(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
572 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
581 dissect_q932_AddressInformation(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
582 offset
= dissect_q932_PartyNumber(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
588 static const ber_sequence_t NetworkFacilityExtension_U_sequence
[] = {
589 { &hf_q932_sourceEntity
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_q932_EntityType
},
590 { &hf_q932_sourceEntityAddress
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOTCHKTAG
, dissect_q932_AddressInformation
},
591 { &hf_q932_destinationEntity
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_q932_EntityType
},
592 { &hf_q932_destinationEntityAddress
, BER_CLASS_CON
, 3, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOTCHKTAG
, dissect_q932_AddressInformation
},
593 { NULL
, 0, 0, 0, NULL
}
597 dissect_q932_NetworkFacilityExtension_U(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
598 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
599 NetworkFacilityExtension_U_sequence
, hf_index
, ett_q932_NetworkFacilityExtension_U
);
607 dissect_q932_NetworkFacilityExtension(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
608 offset
= dissect_ber_tagged_type(implicit_tag
, actx
, tree
, tvb
, offset
,
609 hf_index
, BER_CLASS_CON
, 10, true, dissect_q932_NetworkFacilityExtension_U
);
615 static const value_string q932_NetworkProtocolProfile_U_vals
[] = {
623 dissect_q932_NetworkProtocolProfile_U(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
624 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
633 dissect_q932_NetworkProtocolProfile(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
634 offset
= dissect_ber_tagged_type(implicit_tag
, actx
, tree
, tvb
, offset
,
635 hf_index
, BER_CLASS_CON
, 18, true, dissect_q932_NetworkProtocolProfile_U
);
641 static const value_string q932_InterpretationComponent_U_vals
[] = {
642 { 0, "discardAnyUnrecognisedInvokePdu" },
643 { 1, "clearCallIfAnyInvokePduNotRecognised" },
644 { 2, "rejectAnyUnrecognisedInvokePdu" },
650 dissect_q932_InterpretationComponent_U(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
651 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
660 dissect_q932_InterpretationComponent(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
661 offset
= dissect_ber_tagged_type(implicit_tag
, actx
, tree
, tvb
, offset
,
662 hf_index
, BER_CLASS_CON
, 11, true, dissect_q932_InterpretationComponent_U
);
669 static int dissect_NetworkFacilityExtension_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
672 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
673 offset
= dissect_q932_NetworkFacilityExtension(false, tvb
, offset
, &asn1_ctx
, tree
, hf_q932_NetworkFacilityExtension_PDU
);
676 static int dissect_NetworkProtocolProfile_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
679 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
680 offset
= dissect_q932_NetworkProtocolProfile(false, tvb
, offset
, &asn1_ctx
, tree
, hf_q932_NetworkProtocolProfile_PDU
);
683 static int dissect_InterpretationComponent_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
686 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
687 offset
= dissect_q932_InterpretationComponent(false, tvb
, offset
, &asn1_ctx
, tree
, hf_q932_InterpretationComponent_PDU
);
692 /*--- dissect_q932_facility_ie -------------------------------------------------------*/
694 dissect_q932_facility_ie(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, int length
) {
699 int hoffset
, eoffset
;
703 ie_end
= offset
+ length
;
704 proto_tree_add_item(tree
, hf_q932_pp
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
706 while (offset
< ie_end
) {
708 offset
= get_ber_identifier(tvb
, offset
, &appclass
, &pc
, &tag
);
709 offset
= get_ber_length(tvb
, offset
, &len
, NULL
);
710 eoffset
= offset
+ len
;
711 next_tvb
= tvb_new_subset_length(tvb
, hoffset
, eoffset
- hoffset
);
715 case 10 : /* Network Facility Extension */
716 dissect_NetworkFacilityExtension_PDU(next_tvb
, pinfo
, tree
, NULL
);
718 case 18 : /* Network Protocol Profile */
719 dissect_NetworkProtocolProfile_PDU(next_tvb
, pinfo
, tree
, NULL
);
721 case 11 : /* Interpretation Component */
722 dissect_InterpretationComponent_PDU(next_tvb
, pinfo
, tree
, NULL
);
725 case 1 : /* invoke */
726 case 2 : /* returnResult */
727 case 3 : /* returnError */
728 case 4 : /* reject */
729 q932_rose_ctx
.apdu_depth
= 1;
730 call_dissector_with_data(q932_ros_handle
, next_tvb
, pinfo
, tree
, &q932_rose_ctx
);
733 case 12 : /* begin */
735 case 15 : /* continue */
736 case 17 : /* abort */
737 offset
= dissect_ber_identifier(pinfo
, tree
, tvb
, hoffset
, NULL
, NULL
, NULL
);
738 offset
= dissect_ber_length(pinfo
, tree
, tvb
, offset
, NULL
, NULL
);
739 proto_tree_add_expert(tree
, pinfo
, &ei_q932_dse_not_supported
, tvb
, offset
, len
);
742 offset
= dissect_ber_identifier(pinfo
, tree
, tvb
, hoffset
, NULL
, NULL
, NULL
);
743 offset
= dissect_ber_length(pinfo
, tree
, tvb
, offset
, NULL
, NULL
);
744 proto_tree_add_expert(tree
, pinfo
, &ei_q932_unknown_component
, tvb
, offset
, len
);
755 offset
= dissect_ber_identifier(pinfo
, tree
, tvb
, hoffset
, NULL
, NULL
, NULL
);
756 offset
= dissect_ber_length(pinfo
, tree
, tvb
, offset
, NULL
, NULL
);
757 proto_tree_add_expert(tree
, pinfo
, &ei_q932_acse_not_supported
, tvb
, offset
, len
);
760 offset
= dissect_ber_identifier(pinfo
, tree
, tvb
, hoffset
, NULL
, NULL
, NULL
);
761 offset
= dissect_ber_length(pinfo
, tree
, tvb
, offset
, NULL
, NULL
);
762 proto_tree_add_expert(tree
, pinfo
, &ei_q932_unknown_component
, tvb
, offset
, len
);
766 offset
= dissect_ber_identifier(pinfo
, tree
, tvb
, hoffset
, NULL
, NULL
, NULL
);
767 offset
= dissect_ber_length(pinfo
, tree
, tvb
, offset
, NULL
, NULL
);
768 proto_tree_add_expert(tree
, pinfo
, &ei_q932_unknown_component
, tvb
, offset
, len
);
774 /*--- dissect_q932_ni_ie -------------------------------------------------------*/
776 dissect_q932_ni_ie(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, int length
) {
782 while ((remain
> 0) && !(octet
& 0x80)) {
783 octet
= tvb_get_uint8(tvb
, offset
++);
786 value
|= octet
& 0x7F;
788 ti
= proto_tree_add_uint(tree
, hf_q932_nd
, tvb
, offset
- (length
- remain
), length
- remain
, value
);
791 expert_add_info(pinfo
, ti
, &ei_q932_asn1_encoded
);
795 /*--- dissect_q932_ie -------------------------------------------------------*/
797 dissect_q932_ie(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
) {
801 uint8_t ie_type
, ie_len
;
805 ti
= proto_tree_add_item(tree
, proto_q932
, tvb
, offset
, -1, ENC_NA
);
806 proto_item_set_hidden(ti
);
808 ie_type
= tvb_get_uint8(tvb
, offset
);
809 ie_len
= tvb_get_uint8(tvb
, offset
+ 1);
811 ie_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_q932_ie
, NULL
,
812 val_to_str(ie_type
, VALS(q932_str_ie_type
), "unknown (0x%02X)"));
814 proto_tree_add_item(ie_tree
, hf_q932_ie_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
815 proto_tree_add_item(ie_tree
, hf_q932_ie_len
, tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
817 if (tvb_reported_length_remaining(tvb
, offset
) <= 0)
820 case Q932_IE_FACILITY
:
821 dissect_q932_facility_ie(tvb
, offset
, pinfo
, ie_tree
, ie_len
);
823 case Q932_IE_NOTIFICATION_INDICATOR
:
824 dissect_q932_ni_ie(tvb
, offset
, pinfo
, ie_tree
, ie_len
);
828 proto_tree_add_item(ie_tree
, hf_q932_ie_data
, tvb
, offset
, ie_len
, ENC_NA
);
831 return tvb_captured_length(tvb
);
834 /*--- dissect_q932_apdu -----------------------------------------------------*/
836 dissect_q932_apdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
) {
837 return call_dissector(q932_ros_handle
, tvb
, pinfo
, tree
);
840 /*--- proto_register_q932 ---------------------------------------------------*/
841 void proto_register_q932(void) {
844 static hf_register_info hf
[] = {
845 { &hf_q932_ie_type
, { "Type", "q932.ie.type",
846 FT_UINT8
, BASE_HEX
, VALS(q932_str_ie_type
), 0x0,
847 "Information Element Type", HFILL
}},
848 { &hf_q932_ie_len
, { "Length", "q932.ie.len",
849 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
850 "Information Element Length", HFILL
}},
851 { &hf_q932_ie_data
, { "Data", "q932.ie.data",
852 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
854 { &hf_q932_pp
, { "Protocol profile", "q932.pp",
855 FT_UINT8
, BASE_HEX
, VALS(str_pp
), 0x1F,
857 { &hf_q932_nd
, { "Notification description", "q932.nd",
858 FT_UINT8
, BASE_HEX
, VALS(str_nd
), 0x0,
860 { &hf_q932_NetworkFacilityExtension_PDU
,
861 { "NetworkFacilityExtension", "q932.NetworkFacilityExtension_element",
862 FT_NONE
, BASE_NONE
, NULL
, 0,
864 { &hf_q932_NetworkProtocolProfile_PDU
,
865 { "NetworkProtocolProfile", "q932.NetworkProtocolProfile",
866 FT_UINT32
, BASE_DEC
, VALS(q932_NetworkProtocolProfile_U_vals
), 0,
868 { &hf_q932_InterpretationComponent_PDU
,
869 { "InterpretationComponent", "q932.InterpretationComponent",
870 FT_UINT32
, BASE_DEC
, VALS(q932_InterpretationComponent_U_vals
), 0,
872 { &hf_q932_presentationAlIowedAddress
,
873 { "presentationAlIowedAddress", "q932.presentationAlIowedAddress_element",
874 FT_NONE
, BASE_NONE
, NULL
, 0,
875 "AddressScreened", HFILL
}},
876 { &hf_q932_presentationRestricted
,
877 { "presentationRestricted", "q932.presentationRestricted_element",
878 FT_NONE
, BASE_NONE
, NULL
, 0,
880 { &hf_q932_numberNotAvailableDueTolnterworking
,
881 { "numberNotAvailableDueTolnterworking", "q932.numberNotAvailableDueTolnterworking_element",
882 FT_NONE
, BASE_NONE
, NULL
, 0,
884 { &hf_q932_presentationRestrictedAddressScreened
,
885 { "presentationRestrictedAddress", "q932.presentationRestrictedAddressScreened_element",
886 FT_NONE
, BASE_NONE
, NULL
, 0,
887 "AddressScreened", HFILL
}},
888 { &hf_q932_presentationAllowedAddress
,
889 { "presentationAllowedAddress", "q932.presentationAllowedAddress_element",
890 FT_NONE
, BASE_NONE
, NULL
, 0,
892 { &hf_q932_presentationRestrictedAddress
,
893 { "presentationRestrictedAddress", "q932.presentationRestrictedAddress_element",
894 FT_NONE
, BASE_NONE
, NULL
, 0,
896 { &hf_q932_presentationAllowedNumberScreened
,
897 { "presentationAllowedNumber", "q932.presentationAllowedNumberScreened_element",
898 FT_NONE
, BASE_NONE
, NULL
, 0,
899 "NumberScreened", HFILL
}},
900 { &hf_q932_numberNotAvailableDueToInterworking
,
901 { "numberNotAvailableDueToInterworking", "q932.numberNotAvailableDueToInterworking_element",
902 FT_NONE
, BASE_NONE
, NULL
, 0,
904 { &hf_q932_presentationRestrictedNumberScreened
,
905 { "presentationRestrictedNumber", "q932.presentationRestrictedNumberScreened_element",
906 FT_NONE
, BASE_NONE
, NULL
, 0,
907 "NumberScreened", HFILL
}},
908 { &hf_q932_presentationAllowedNumber
,
909 { "presentationAllowedNumber", "q932.presentationAllowedNumber",
910 FT_UINT32
, BASE_DEC
, VALS(q932_PartyNumber_vals
), 0,
911 "PartyNumber", HFILL
}},
912 { &hf_q932_presentationRestrictedNumber
,
913 { "presentationRestrictedNumber", "q932.presentationRestrictedNumber",
914 FT_UINT32
, BASE_DEC
, VALS(q932_PartyNumber_vals
), 0,
915 "PartyNumber", HFILL
}},
916 { &hf_q932_partyNumber
,
917 { "partyNumber", "q932.partyNumber",
918 FT_UINT32
, BASE_DEC
, VALS(q932_PartyNumber_vals
), 0,
920 { &hf_q932_screeninglndicator
,
921 { "screeninglndicator", "q932.screeninglndicator",
922 FT_UINT32
, BASE_DEC
, VALS(q932_ScreeningIndicator_vals
), 0,
923 "ScreeningIndicator", HFILL
}},
924 { &hf_q932_partySubaddress
,
925 { "partySubaddress", "q932.partySubaddress",
926 FT_UINT32
, BASE_DEC
, VALS(q932_PartySubaddress_vals
), 0,
928 { &hf_q932_screeningIndicator
,
929 { "screeningIndicator", "q932.screeningIndicator",
930 FT_UINT32
, BASE_DEC
, VALS(q932_ScreeningIndicator_vals
), 0,
932 { &hf_q932_unknownPartyNumber
,
933 { "unknownPartyNumber", "q932.unknownPartyNumber",
934 FT_STRING
, BASE_NONE
, NULL
, 0,
935 "NumberDigits", HFILL
}},
936 { &hf_q932_publicPartyNumber
,
937 { "publicPartyNumber", "q932.publicPartyNumber_element",
938 FT_NONE
, BASE_NONE
, NULL
, 0,
940 { &hf_q932_nsapEncodedNumber
,
941 { "nsapEncodedNumber", "q932.nsapEncodedNumber",
942 FT_BYTES
, BASE_NONE
, NULL
, 0,
944 { &hf_q932_dataPartyNumber
,
945 { "dataPartyNumber", "q932.dataPartyNumber",
946 FT_STRING
, BASE_NONE
, NULL
, 0,
947 "NumberDigits", HFILL
}},
948 { &hf_q932_telexPartyNumber
,
949 { "telexPartyNumber", "q932.telexPartyNumber",
950 FT_STRING
, BASE_NONE
, NULL
, 0,
951 "NumberDigits", HFILL
}},
952 { &hf_q932_privatePartyNumber
,
953 { "privatePartyNumber", "q932.privatePartyNumber_element",
954 FT_NONE
, BASE_NONE
, NULL
, 0,
956 { &hf_q932_nationalStandardPartyNumber
,
957 { "nationalStandardPartyNumber", "q932.nationalStandardPartyNumber",
958 FT_STRING
, BASE_NONE
, NULL
, 0,
959 "NumberDigits", HFILL
}},
960 { &hf_q932_publicTypeOfNumber
,
961 { "publicTypeOfNumber", "q932.publicTypeOfNumber",
962 FT_UINT32
, BASE_DEC
, VALS(q932_PublicTypeOfNumber_vals
), 0,
964 { &hf_q932_publicNumberDigits
,
965 { "publicNumberDigits", "q932.publicNumberDigits",
966 FT_STRING
, BASE_NONE
, NULL
, 0,
967 "NumberDigits", HFILL
}},
968 { &hf_q932_privateTypeOfNumber
,
969 { "privateTypeOfNumber", "q932.privateTypeOfNumber",
970 FT_UINT32
, BASE_DEC
, VALS(q932_PrivateTypeOfNumber_vals
), 0,
972 { &hf_q932_privateNumberDigits
,
973 { "privateNumberDigits", "q932.privateNumberDigits",
974 FT_STRING
, BASE_NONE
, NULL
, 0,
975 "NumberDigits", HFILL
}},
976 { &hf_q932_userSpecifiedSubaddress
,
977 { "userSpecifiedSubaddress", "q932.userSpecifiedSubaddress_element",
978 FT_NONE
, BASE_NONE
, NULL
, 0,
980 { &hf_q932_nSAPSubaddress
,
981 { "nSAPSubaddress", "q932.nSAPSubaddress",
982 FT_BYTES
, BASE_NONE
, NULL
, 0,
984 { &hf_q932_subaddressInformation
,
985 { "subaddressInformation", "q932.subaddressInformation",
986 FT_BYTES
, BASE_NONE
, NULL
, 0,
988 { &hf_q932_oddCountIndicator
,
989 { "oddCountIndicator", "q932.oddCountIndicator",
990 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
992 { &hf_q932_sourceEntity
,
993 { "sourceEntity", "q932.sourceEntity",
994 FT_UINT32
, BASE_DEC
, VALS(q932_EntityType_vals
), 0,
995 "EntityType", HFILL
}},
996 { &hf_q932_sourceEntityAddress
,
997 { "sourceEntityAddress", "q932.sourceEntityAddress",
998 FT_UINT32
, BASE_DEC
, VALS(q932_PartyNumber_vals
), 0,
999 "AddressInformation", HFILL
}},
1000 { &hf_q932_destinationEntity
,
1001 { "destinationEntity", "q932.destinationEntity",
1002 FT_UINT32
, BASE_DEC
, VALS(q932_EntityType_vals
), 0,
1003 "EntityType", HFILL
}},
1004 { &hf_q932_destinationEntityAddress
,
1005 { "destinationEntityAddress", "q932.destinationEntityAddress",
1006 FT_UINT32
, BASE_DEC
, VALS(q932_PartyNumber_vals
), 0,
1007 "AddressInformation", HFILL
}},
1010 /* List of subtrees */
1011 static int *ett
[] = {
1014 &ett_q932_PresentedAddressScreened
,
1015 &ett_q932_PresentedAddressUnscreened
,
1016 &ett_q932_PresentedNumberScreened
,
1017 &ett_q932_PresentedNumberUnscreened
,
1018 &ett_q932_AddressScreened
,
1019 &ett_q932_NumberScreened
,
1021 &ett_q932_PartyNumber
,
1022 &ett_q932_PublicPartyNumber
,
1023 &ett_q932_PrivatePartyNumber
,
1024 &ett_q932_PartySubaddress
,
1025 &ett_q932_UserSpecifiedSubaddress
,
1026 &ett_q932_NetworkFacilityExtension_U
,
1029 static ei_register_info ei
[] = {
1030 { &ei_q932_dse_not_supported
, { "q932.dse_not_supported", PI_UNDECODED
, PI_WARN
, "DSE APDU (not supported)", EXPFILL
}},
1031 { &ei_q932_acse_not_supported
, { "q932.acse_not_supported", PI_UNDECODED
, PI_WARN
, "ACSE APDU (not supported)", EXPFILL
}},
1032 { &ei_q932_unknown_component
, { "q932.unknown_component", PI_UNDECODED
, PI_WARN
, "Unknown Component", EXPFILL
}},
1033 { &ei_q932_asn1_encoded
, { "q932.asn1_encoded", PI_UNDECODED
, PI_WARN
, "ASN.1 Encoded Data Structure(NOT IMPLEMENTED)", EXPFILL
}},
1036 module_t
*q932_module
;
1037 expert_module_t
* expert_q932
;
1039 static const enum_val_t facility_encoding
[] = {
1040 {"QSIG", "Dissect facility as QSIG", FACILITY_QSIG
},
1041 {"ETSI", "Dissect facility as ETSI", FACILITY_ETSI
},
1045 /* Register protocol and dissector */
1046 proto_q932
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
1047 register_dissector("q932.apdu", dissect_q932_apdu
, proto_q932
);
1048 q932_ie_handle
= register_dissector("q932.ie", dissect_q932_ie
, proto_q932
);
1050 /* Register fields and subtrees */
1051 proto_register_field_array(proto_q932
, hf
, array_length(hf
));
1052 proto_register_subtree_array(ett
, array_length(ett
));
1053 expert_q932
= expert_register_protocol(proto_q932
);
1054 expert_register_field_array(expert_q932
, ei
, array_length(ei
));
1056 rose_ctx_init(&q932_rose_ctx
);
1058 /* Register dissector tables */
1059 q932_rose_ctx
.arg_global_dissector_table
= register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", proto_q932
, FT_STRING
, STRING_CASE_SENSITIVE
);
1060 q932_rose_ctx
.res_global_dissector_table
= register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", proto_q932
, FT_STRING
, STRING_CASE_SENSITIVE
);
1061 q932_rose_ctx
.err_global_dissector_table
= register_dissector_table("q932.ros.global.err", "Q.932 Error (global opcode)", proto_q932
, FT_STRING
, STRING_CASE_SENSITIVE
);
1063 qsig_arg_local_dissector_table
= register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", proto_q932
, FT_UINT32
, BASE_HEX
);
1064 qsig_res_local_dissector_table
= register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", proto_q932
, FT_UINT32
, BASE_HEX
);
1065 qsig_err_local_dissector_table
= register_dissector_table("q932.ros.local.err", "Q.932 Error (local opcode)", proto_q932
, FT_UINT32
, BASE_HEX
);
1067 etsi_arg_local_dissector_table
= register_dissector_table("q932.ros.etsi.local.arg", "Q.932 ETSI Operation Argument (local opcode)", proto_q932
, FT_UINT32
, BASE_HEX
);
1068 etsi_res_local_dissector_table
= register_dissector_table("q932.ros.etsi.local.res", "Q.932 ETSI Operation Result (local opcode)", proto_q932
, FT_UINT32
, BASE_HEX
);
1069 etsi_err_local_dissector_table
= register_dissector_table("q932.ros.etsi.local.err", "Q.932 ETSI Error (local opcode)", proto_q932
, FT_UINT32
, BASE_HEX
);
1071 q932_module
= prefs_register_protocol(proto_q932
, proto_reg_handoff_q932
);
1073 prefs_register_enum_preference(q932_module
, "facility_encoding",
1074 "Type of Facility encoding",
1075 "Type of Facility encoding",
1076 &g_facility_encoding
, facility_encoding
, false);
1079 /*--- proto_reg_handoff_q932 ------------------------------------------------*/
1080 void proto_reg_handoff_q932(void) {
1081 static bool q931_prefs_initialized
= false;
1083 if (!q931_prefs_initialized
) {
1085 dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_FACILITY
, q932_ie_handle
);
1086 /* Notification indicator */
1087 dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR
, q932_ie_handle
);
1088 q932_ros_handle
= find_dissector_add_dependency("q932.ros", proto_q932
);
1090 q931_prefs_initialized
= true;
1093 if(g_facility_encoding
== FACILITY_QSIG
){
1094 q932_rose_ctx
.arg_local_dissector_table
= qsig_arg_local_dissector_table
;
1095 q932_rose_ctx
.res_local_dissector_table
= qsig_res_local_dissector_table
;
1096 q932_rose_ctx
.err_local_dissector_table
= qsig_err_local_dissector_table
;
1098 q932_rose_ctx
.arg_local_dissector_table
= etsi_arg_local_dissector_table
;
1099 q932_rose_ctx
.res_local_dissector_table
= etsi_res_local_dissector_table
;
1100 q932_rose_ctx
.err_local_dissector_table
= etsi_err_local_dissector_table
;
1105 /*---------------------------------------------------------------------------*/