/src/wireshark/epan/dissectors/packet-h323.c
Line | Count | Source |
1 | | /* Do not modify this file. Changes will be overwritten. */ |
2 | | /* Generated automatically by the ASN.1 to Wireshark dissector compiler */ |
3 | | /* packet-h323.c */ |
4 | | /* asn2wrs.py -q -L -p h323 -c ./h323.cnf -s ./packet-h323-template -D . -O ../.. RAS-PROTOCOL-TUNNEL.asn ROBUSTNESS-DATA.asn */ |
5 | | |
6 | | /* packet-h323.c |
7 | | * Routines for H.323 packet dissection |
8 | | * 2007 Tomas Kukosa |
9 | | * |
10 | | * Wireshark - Network traffic analyzer |
11 | | * By Gerald Combs <gerald@wireshark.org> |
12 | | * Copyright 1998 Gerald Combs |
13 | | * |
14 | | * SPDX-License-Identifier: GPL-2.0-or-later |
15 | | */ |
16 | | |
17 | | #include "config.h" |
18 | | |
19 | | #include <epan/packet.h> |
20 | | #include <epan/oids.h> |
21 | | #include <epan/asn1.h> |
22 | | #include <wsutil/array.h> |
23 | | |
24 | | #include "packet-per.h" |
25 | | #include "packet-h225.h" |
26 | | #include "packet-h323.h" |
27 | | |
28 | | void proto_register_h323(void); |
29 | | void proto_reg_handoff_h323(void); |
30 | | |
31 | | /* Generic Extensible Framework */ |
32 | 730 | gef_ctx_t* gef_ctx_alloc(wmem_allocator_t *pool, gef_ctx_t *parent, const char *type) { |
33 | 730 | gef_ctx_t *gefx; |
34 | | |
35 | 730 | gefx = wmem_new0(pool, gef_ctx_t); |
36 | 730 | gefx->signature = GEF_CTX_SIGNATURE; |
37 | 730 | gefx->parent = parent; |
38 | 730 | gefx->type = type; |
39 | 730 | return gefx; |
40 | 730 | } |
41 | | |
42 | 2.56k | bool gef_ctx_check_signature(gef_ctx_t *gefx) { |
43 | 2.56k | return gefx && (gefx->signature == GEF_CTX_SIGNATURE); |
44 | 2.56k | } |
45 | | |
46 | 2.56k | gef_ctx_t* gef_ctx_get(void *ptr) { |
47 | 2.56k | gef_ctx_t *gefx = (gef_ctx_t*)ptr; |
48 | 2.56k | asn1_ctx_t *actx = (asn1_ctx_t*)ptr; |
49 | | |
50 | 2.56k | if (!asn1_ctx_check_signature(actx)) |
51 | 2.56k | actx = NULL; |
52 | | |
53 | 2.56k | if (actx) |
54 | 0 | gefx = (gef_ctx_t *)actx->private_data; |
55 | | |
56 | 2.56k | if (!gef_ctx_check_signature(gefx)) |
57 | 221 | gefx = NULL; |
58 | | |
59 | 2.56k | return gefx; |
60 | 2.56k | } |
61 | | |
62 | 668 | void gef_ctx_update_key(wmem_allocator_t *pool, gef_ctx_t *gefx) { |
63 | 668 | const char *parent_key; |
64 | | |
65 | 668 | if (!gefx) return; |
66 | 668 | parent_key = (gefx->parent) ? gefx->parent->key : NULL; |
67 | 668 | gefx->key = wmem_strdup_printf(pool, |
68 | 668 | "%s%s" /* parent prefix */ |
69 | 668 | "%s%s%s" /* type, id */ |
70 | 668 | "%s%s" /* subid */, |
71 | 668 | (parent_key) ? parent_key : "", (parent_key) ? "/" : "", |
72 | 668 | (gefx->type) ? gefx->type : "", (gefx->type && (gefx->id || gefx->subid)) ? "/" : "", (gefx->id) ? gefx->id : "", |
73 | 668 | (gefx->subid) ? "-" : "", (gefx->subid) ? gefx->subid : "" |
74 | 668 | ); |
75 | 668 | } |
76 | | |
77 | | /* Initialize the protocol and registered fields */ |
78 | | static int proto_h323; |
79 | | static int hf_h323_RasTunnelledSignallingMessage_PDU; /* RasTunnelledSignallingMessage */ |
80 | | static int hf_h323_RobustnessData_PDU; /* RobustnessData */ |
81 | | static int hf_h323_tunnelledProtocolID; /* TunnelledProtocol */ |
82 | | static int hf_h323_messageContent; /* T_messageContent */ |
83 | | static int hf_h323_messageContent_item; /* OCTET_STRING */ |
84 | | static int hf_h323_tunnellingRequired; /* NULL */ |
85 | | static int hf_h323_nonStandardData; /* NonStandardParameter */ |
86 | | static int hf_h323_versionID; /* INTEGER_1_256 */ |
87 | | static int hf_h323_robustnessData; /* T_robustnessData */ |
88 | | static int hf_h323_rrqData; /* Rrq_RD */ |
89 | | static int hf_h323_rcfData; /* Rcf_RD */ |
90 | | static int hf_h323_setupData; /* Setup_RD */ |
91 | | static int hf_h323_connectData; /* Connect_RD */ |
92 | | static int hf_h323_statusData; /* Status_RD */ |
93 | | static int hf_h323_statusInquiryData; /* StatusInquiry_RD */ |
94 | | static int hf_h323_BackupCallSignalAddresses_item; /* BackupCallSignalAddresses_item */ |
95 | | static int hf_h323_tcp; /* TransportAddress */ |
96 | | static int hf_h323_alternateTransport; /* AlternateTransportAddresses */ |
97 | | static int hf_h323_backupCallSignalAddresses; /* BackupCallSignalAddresses */ |
98 | | static int hf_h323_hasSharedRepository; /* NULL */ |
99 | | static int hf_h323_irrFrequency; /* INTEGER_1_65535 */ |
100 | | static int hf_h323_endpointGuid; /* GloballyUniqueIdentifier */ |
101 | | static int hf_h323_h245Address; /* TransportAddress */ |
102 | | static int hf_h323_fastStart; /* T_fastStart */ |
103 | | static int hf_h323_fastStart_item; /* OCTET_STRING */ |
104 | | static int hf_h323_resetH245; /* NULL */ |
105 | | static int hf_h323_timeToLive; /* TimeToLive */ |
106 | | static int hf_h323_includeFastStart; /* NULL */ |
107 | | |
108 | | /* Initialize the subtree pointers */ |
109 | | static int ett_h323_RasTunnelledSignallingMessage; |
110 | | static int ett_h323_T_messageContent; |
111 | | static int ett_h323_RobustnessData; |
112 | | static int ett_h323_T_robustnessData; |
113 | | static int ett_h323_BackupCallSignalAddresses; |
114 | | static int ett_h323_BackupCallSignalAddresses_item; |
115 | | static int ett_h323_Rrq_RD; |
116 | | static int ett_h323_Rcf_RD; |
117 | | static int ett_h323_Setup_RD; |
118 | | static int ett_h323_Connect_RD; |
119 | | static int ett_h323_Status_RD; |
120 | | static int ett_h323_T_fastStart; |
121 | | static int ett_h323_StatusInquiry_RD; |
122 | | |
123 | | |
124 | | |
125 | | static unsigned |
126 | 0 | dissect_h323_OCTET_STRING(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
127 | 0 | offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, |
128 | 0 | NO_BOUND, NO_BOUND, false, NULL); |
129 | |
|
130 | 0 | return offset; |
131 | 0 | } |
132 | | |
133 | | |
134 | | static const per_sequence_t T_messageContent_sequence_of[1] = { |
135 | | { &hf_h323_messageContent_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h323_OCTET_STRING }, |
136 | | }; |
137 | | |
138 | | static unsigned |
139 | 0 | dissect_h323_T_messageContent(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
140 | 0 | offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, |
141 | 0 | ett_h323_T_messageContent, T_messageContent_sequence_of); |
142 | |
|
143 | 0 | return offset; |
144 | 0 | } |
145 | | |
146 | | |
147 | | |
148 | | static unsigned |
149 | 0 | dissect_h323_NULL(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
150 | 0 | offset = dissect_per_null(tvb, offset, actx, tree, hf_index); |
151 | |
|
152 | 0 | return offset; |
153 | 0 | } |
154 | | |
155 | | |
156 | | static const per_sequence_t RasTunnelledSignallingMessage_sequence[] = { |
157 | | { &hf_h323_tunnelledProtocolID, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h225_TunnelledProtocol }, |
158 | | { &hf_h323_messageContent , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h323_T_messageContent }, |
159 | | { &hf_h323_tunnellingRequired, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_NULL }, |
160 | | { &hf_h323_nonStandardData, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h225_NonStandardParameter }, |
161 | | { NULL, 0, 0, NULL } |
162 | | }; |
163 | | |
164 | | static unsigned |
165 | 0 | dissect_h323_RasTunnelledSignallingMessage(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
166 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
167 | 0 | ett_h323_RasTunnelledSignallingMessage, RasTunnelledSignallingMessage_sequence); |
168 | |
|
169 | 0 | return offset; |
170 | 0 | } |
171 | | |
172 | | |
173 | | |
174 | | static unsigned |
175 | 0 | dissect_h323_INTEGER_1_256(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
176 | 0 | offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, |
177 | 0 | 1U, 256U, NULL, false); |
178 | |
|
179 | 0 | return offset; |
180 | 0 | } |
181 | | |
182 | | |
183 | | static const value_string h323_BackupCallSignalAddresses_item_vals[] = { |
184 | | { 0, "tcp" }, |
185 | | { 1, "alternateTransport" }, |
186 | | { 0, NULL } |
187 | | }; |
188 | | |
189 | | static const per_choice_t BackupCallSignalAddresses_item_choice[] = { |
190 | | { 0, &hf_h323_tcp , ASN1_EXTENSION_ROOT , dissect_h225_TransportAddress }, |
191 | | { 1, &hf_h323_alternateTransport, ASN1_EXTENSION_ROOT , dissect_h225_AlternateTransportAddresses }, |
192 | | { 0, NULL, 0, NULL } |
193 | | }; |
194 | | |
195 | | static unsigned |
196 | 0 | dissect_h323_BackupCallSignalAddresses_item(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
197 | 0 | offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, |
198 | 0 | ett_h323_BackupCallSignalAddresses_item, BackupCallSignalAddresses_item_choice, |
199 | 0 | NULL); |
200 | |
|
201 | 0 | return offset; |
202 | 0 | } |
203 | | |
204 | | |
205 | | static const per_sequence_t BackupCallSignalAddresses_sequence_of[1] = { |
206 | | { &hf_h323_BackupCallSignalAddresses_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h323_BackupCallSignalAddresses_item }, |
207 | | }; |
208 | | |
209 | | static unsigned |
210 | 0 | dissect_h323_BackupCallSignalAddresses(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
211 | 0 | offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, |
212 | 0 | ett_h323_BackupCallSignalAddresses, BackupCallSignalAddresses_sequence_of); |
213 | |
|
214 | 0 | return offset; |
215 | 0 | } |
216 | | |
217 | | |
218 | | static const per_sequence_t Rrq_RD_sequence[] = { |
219 | | { &hf_h323_backupCallSignalAddresses, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h323_BackupCallSignalAddresses }, |
220 | | { &hf_h323_hasSharedRepository, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_NULL }, |
221 | | { NULL, 0, 0, NULL } |
222 | | }; |
223 | | |
224 | | static unsigned |
225 | 0 | dissect_h323_Rrq_RD(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
226 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
227 | 0 | ett_h323_Rrq_RD, Rrq_RD_sequence); |
228 | |
|
229 | 0 | return offset; |
230 | 0 | } |
231 | | |
232 | | |
233 | | |
234 | | static unsigned |
235 | 0 | dissect_h323_INTEGER_1_65535(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
236 | 0 | offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, |
237 | 0 | 1U, 65535U, NULL, false); |
238 | |
|
239 | 0 | return offset; |
240 | 0 | } |
241 | | |
242 | | |
243 | | static const per_sequence_t Rcf_RD_sequence[] = { |
244 | | { &hf_h323_hasSharedRepository, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_NULL }, |
245 | | { &hf_h323_irrFrequency , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL , dissect_h323_INTEGER_1_65535 }, |
246 | | { NULL, 0, 0, NULL } |
247 | | }; |
248 | | |
249 | | static unsigned |
250 | 0 | dissect_h323_Rcf_RD(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
251 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
252 | 0 | ett_h323_Rcf_RD, Rcf_RD_sequence); |
253 | |
|
254 | 0 | return offset; |
255 | 0 | } |
256 | | |
257 | | |
258 | | |
259 | | static unsigned |
260 | 0 | dissect_h323_GloballyUniqueIdentifier(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
261 | 0 | offset = dissect_h225_GloballyUniqueID(tvb, offset, actx, tree, hf_index); |
262 | |
|
263 | 0 | return offset; |
264 | 0 | } |
265 | | |
266 | | |
267 | | static const per_sequence_t Setup_RD_sequence[] = { |
268 | | { &hf_h323_backupCallSignalAddresses, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h323_BackupCallSignalAddresses }, |
269 | | { &hf_h323_hasSharedRepository, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_NULL }, |
270 | | { &hf_h323_endpointGuid , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_GloballyUniqueIdentifier }, |
271 | | { NULL, 0, 0, NULL } |
272 | | }; |
273 | | |
274 | | static unsigned |
275 | 0 | dissect_h323_Setup_RD(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
276 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
277 | 0 | ett_h323_Setup_RD, Setup_RD_sequence); |
278 | |
|
279 | 0 | return offset; |
280 | 0 | } |
281 | | |
282 | | |
283 | | static const per_sequence_t Connect_RD_sequence[] = { |
284 | | { &hf_h323_backupCallSignalAddresses, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h323_BackupCallSignalAddresses }, |
285 | | { &hf_h323_hasSharedRepository, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_NULL }, |
286 | | { &hf_h323_endpointGuid , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_GloballyUniqueIdentifier }, |
287 | | { NULL, 0, 0, NULL } |
288 | | }; |
289 | | |
290 | | static unsigned |
291 | 0 | dissect_h323_Connect_RD(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
292 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
293 | 0 | ett_h323_Connect_RD, Connect_RD_sequence); |
294 | |
|
295 | 0 | return offset; |
296 | 0 | } |
297 | | |
298 | | |
299 | | static const per_sequence_t T_fastStart_sequence_of[1] = { |
300 | | { &hf_h323_fastStart_item , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h323_OCTET_STRING }, |
301 | | }; |
302 | | |
303 | | static unsigned |
304 | 0 | dissect_h323_T_fastStart(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
305 | 0 | offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, |
306 | 0 | ett_h323_T_fastStart, T_fastStart_sequence_of); |
307 | |
|
308 | 0 | return offset; |
309 | 0 | } |
310 | | |
311 | | |
312 | | static const per_sequence_t Status_RD_sequence[] = { |
313 | | { &hf_h323_h245Address , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h225_TransportAddress }, |
314 | | { &hf_h323_fastStart , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_T_fastStart }, |
315 | | { &hf_h323_resetH245 , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL , dissect_h323_NULL }, |
316 | | { NULL, 0, 0, NULL } |
317 | | }; |
318 | | |
319 | | static unsigned |
320 | 0 | dissect_h323_Status_RD(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
321 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
322 | 0 | ett_h323_Status_RD, Status_RD_sequence); |
323 | |
|
324 | 0 | return offset; |
325 | 0 | } |
326 | | |
327 | | |
328 | | static const per_sequence_t StatusInquiry_RD_sequence[] = { |
329 | | { &hf_h323_h245Address , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h225_TransportAddress }, |
330 | | { &hf_h323_timeToLive , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h225_TimeToLive }, |
331 | | { &hf_h323_includeFastStart, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h323_NULL }, |
332 | | { NULL, 0, 0, NULL } |
333 | | }; |
334 | | |
335 | | static unsigned |
336 | 0 | dissect_h323_StatusInquiry_RD(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
337 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
338 | 0 | ett_h323_StatusInquiry_RD, StatusInquiry_RD_sequence); |
339 | |
|
340 | 0 | return offset; |
341 | 0 | } |
342 | | |
343 | | |
344 | | static const value_string h323_T_robustnessData_vals[] = { |
345 | | { 0, "rrqData" }, |
346 | | { 1, "rcfData" }, |
347 | | { 2, "setupData" }, |
348 | | { 3, "connectData" }, |
349 | | { 4, "statusData" }, |
350 | | { 5, "statusInquiryData" }, |
351 | | { 0, NULL } |
352 | | }; |
353 | | |
354 | | static const per_choice_t T_robustnessData_choice[] = { |
355 | | { 0, &hf_h323_rrqData , ASN1_EXTENSION_ROOT , dissect_h323_Rrq_RD }, |
356 | | { 1, &hf_h323_rcfData , ASN1_EXTENSION_ROOT , dissect_h323_Rcf_RD }, |
357 | | { 2, &hf_h323_setupData , ASN1_EXTENSION_ROOT , dissect_h323_Setup_RD }, |
358 | | { 3, &hf_h323_connectData , ASN1_EXTENSION_ROOT , dissect_h323_Connect_RD }, |
359 | | { 4, &hf_h323_statusData , ASN1_EXTENSION_ROOT , dissect_h323_Status_RD }, |
360 | | { 5, &hf_h323_statusInquiryData, ASN1_EXTENSION_ROOT , dissect_h323_StatusInquiry_RD }, |
361 | | { 0, NULL, 0, NULL } |
362 | | }; |
363 | | |
364 | | static unsigned |
365 | 0 | dissect_h323_T_robustnessData(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
366 | 0 | offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, |
367 | 0 | ett_h323_T_robustnessData, T_robustnessData_choice, |
368 | 0 | NULL); |
369 | |
|
370 | 0 | return offset; |
371 | 0 | } |
372 | | |
373 | | |
374 | | static const per_sequence_t RobustnessData_sequence[] = { |
375 | | { &hf_h323_versionID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h323_INTEGER_1_256 }, |
376 | | { &hf_h323_robustnessData , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h323_T_robustnessData }, |
377 | | { NULL, 0, 0, NULL } |
378 | | }; |
379 | | |
380 | | static unsigned |
381 | 0 | dissect_h323_RobustnessData(tvbuff_t *tvb _U_, uint32_t offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
382 | 0 | offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, |
383 | 0 | ett_h323_RobustnessData, RobustnessData_sequence); |
384 | |
|
385 | 0 | return offset; |
386 | 0 | } |
387 | | |
388 | | /*--- PDUs ---*/ |
389 | | |
390 | 0 | static int dissect_RasTunnelledSignallingMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
391 | 0 | unsigned offset = 0; |
392 | 0 | asn1_ctx_t asn1_ctx; |
393 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, true, pinfo); |
394 | 0 | offset = dissect_h323_RasTunnelledSignallingMessage(tvb, offset, &asn1_ctx, tree, hf_h323_RasTunnelledSignallingMessage_PDU); |
395 | 0 | offset += 7; offset >>= 3; |
396 | 0 | return offset; |
397 | 0 | } |
398 | 0 | static int dissect_RobustnessData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { |
399 | 0 | unsigned offset = 0; |
400 | 0 | asn1_ctx_t asn1_ctx; |
401 | 0 | asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, true, pinfo); |
402 | 0 | offset = dissect_h323_RobustnessData(tvb, offset, &asn1_ctx, tree, hf_h323_RobustnessData_PDU); |
403 | 0 | offset += 7; offset >>= 3; |
404 | 0 | return offset; |
405 | 0 | } |
406 | | |
407 | | |
408 | | /*--- proto_register_h323 ----------------------------------------------*/ |
409 | 16 | void proto_register_h323(void) { |
410 | | |
411 | | /* List of fields */ |
412 | 16 | static hf_register_info hf[] = { |
413 | 16 | { &hf_h323_RasTunnelledSignallingMessage_PDU, |
414 | 16 | { "RasTunnelledSignallingMessage", "h323.RasTunnelledSignallingMessage_element", |
415 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
416 | 16 | NULL, HFILL }}, |
417 | 16 | { &hf_h323_RobustnessData_PDU, |
418 | 16 | { "RobustnessData", "h323.RobustnessData_element", |
419 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
420 | 16 | NULL, HFILL }}, |
421 | 16 | { &hf_h323_tunnelledProtocolID, |
422 | 16 | { "tunnelledProtocolID", "h323.tunnelledProtocolID_element", |
423 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
424 | 16 | "TunnelledProtocol", HFILL }}, |
425 | 16 | { &hf_h323_messageContent, |
426 | 16 | { "messageContent", "h323.messageContent", |
427 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
428 | 16 | NULL, HFILL }}, |
429 | 16 | { &hf_h323_messageContent_item, |
430 | 16 | { "messageContent item", "h323.messageContent_item", |
431 | 16 | FT_BYTES, BASE_NONE, NULL, 0, |
432 | 16 | "OCTET_STRING", HFILL }}, |
433 | 16 | { &hf_h323_tunnellingRequired, |
434 | 16 | { "tunnellingRequired", "h323.tunnellingRequired_element", |
435 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
436 | 16 | NULL, HFILL }}, |
437 | 16 | { &hf_h323_nonStandardData, |
438 | 16 | { "nonStandardData", "h323.nonStandardData_element", |
439 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
440 | 16 | "NonStandardParameter", HFILL }}, |
441 | 16 | { &hf_h323_versionID, |
442 | 16 | { "versionID", "h323.versionID", |
443 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
444 | 16 | "INTEGER_1_256", HFILL }}, |
445 | 16 | { &hf_h323_robustnessData, |
446 | 16 | { "robustnessData", "h323.robustnessData", |
447 | 16 | FT_UINT32, BASE_DEC, VALS(h323_T_robustnessData_vals), 0, |
448 | 16 | NULL, HFILL }}, |
449 | 16 | { &hf_h323_rrqData, |
450 | 16 | { "rrqData", "h323.rrqData_element", |
451 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
452 | 16 | "Rrq_RD", HFILL }}, |
453 | 16 | { &hf_h323_rcfData, |
454 | 16 | { "rcfData", "h323.rcfData_element", |
455 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
456 | 16 | "Rcf_RD", HFILL }}, |
457 | 16 | { &hf_h323_setupData, |
458 | 16 | { "setupData", "h323.setupData_element", |
459 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
460 | 16 | "Setup_RD", HFILL }}, |
461 | 16 | { &hf_h323_connectData, |
462 | 16 | { "connectData", "h323.connectData_element", |
463 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
464 | 16 | "Connect_RD", HFILL }}, |
465 | 16 | { &hf_h323_statusData, |
466 | 16 | { "statusData", "h323.statusData_element", |
467 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
468 | 16 | "Status_RD", HFILL }}, |
469 | 16 | { &hf_h323_statusInquiryData, |
470 | 16 | { "statusInquiryData", "h323.statusInquiryData_element", |
471 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
472 | 16 | "StatusInquiry_RD", HFILL }}, |
473 | 16 | { &hf_h323_BackupCallSignalAddresses_item, |
474 | 16 | { "BackupCallSignalAddresses item", "h323.BackupCallSignalAddresses_item", |
475 | 16 | FT_UINT32, BASE_DEC, VALS(h323_BackupCallSignalAddresses_item_vals), 0, |
476 | 16 | NULL, HFILL }}, |
477 | 16 | { &hf_h323_tcp, |
478 | 16 | { "tcp", "h323.tcp", |
479 | 16 | FT_UINT32, BASE_DEC, VALS(h225_TransportAddress_vals), 0, |
480 | 16 | "TransportAddress", HFILL }}, |
481 | 16 | { &hf_h323_alternateTransport, |
482 | 16 | { "alternateTransport", "h323.alternateTransport_element", |
483 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
484 | 16 | "AlternateTransportAddresses", HFILL }}, |
485 | 16 | { &hf_h323_backupCallSignalAddresses, |
486 | 16 | { "backupCallSignalAddresses", "h323.backupCallSignalAddresses", |
487 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
488 | 16 | NULL, HFILL }}, |
489 | 16 | { &hf_h323_hasSharedRepository, |
490 | 16 | { "hasSharedRepository", "h323.hasSharedRepository_element", |
491 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
492 | 16 | NULL, HFILL }}, |
493 | 16 | { &hf_h323_irrFrequency, |
494 | 16 | { "irrFrequency", "h323.irrFrequency", |
495 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
496 | 16 | "INTEGER_1_65535", HFILL }}, |
497 | 16 | { &hf_h323_endpointGuid, |
498 | 16 | { "endpointGuid", "h323.endpointGuid", |
499 | 16 | FT_GUID, BASE_NONE, NULL, 0, |
500 | 16 | "GloballyUniqueIdentifier", HFILL }}, |
501 | 16 | { &hf_h323_h245Address, |
502 | 16 | { "h245Address", "h323.h245Address", |
503 | 16 | FT_UINT32, BASE_DEC, VALS(h225_TransportAddress_vals), 0, |
504 | 16 | "TransportAddress", HFILL }}, |
505 | 16 | { &hf_h323_fastStart, |
506 | 16 | { "fastStart", "h323.fastStart", |
507 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
508 | 16 | NULL, HFILL }}, |
509 | 16 | { &hf_h323_fastStart_item, |
510 | 16 | { "fastStart item", "h323.fastStart_item", |
511 | 16 | FT_BYTES, BASE_NONE, NULL, 0, |
512 | 16 | "OCTET_STRING", HFILL }}, |
513 | 16 | { &hf_h323_resetH245, |
514 | 16 | { "resetH245", "h323.resetH245_element", |
515 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
516 | 16 | NULL, HFILL }}, |
517 | 16 | { &hf_h323_timeToLive, |
518 | 16 | { "timeToLive", "h323.timeToLive", |
519 | 16 | FT_UINT32, BASE_DEC, NULL, 0, |
520 | 16 | NULL, HFILL }}, |
521 | 16 | { &hf_h323_includeFastStart, |
522 | 16 | { "includeFastStart", "h323.includeFastStart_element", |
523 | 16 | FT_NONE, BASE_NONE, NULL, 0, |
524 | 16 | NULL, HFILL }}, |
525 | 16 | }; |
526 | | |
527 | | /* List of subtrees */ |
528 | 16 | static int *ett[] = { |
529 | 16 | &ett_h323_RasTunnelledSignallingMessage, |
530 | 16 | &ett_h323_T_messageContent, |
531 | 16 | &ett_h323_RobustnessData, |
532 | 16 | &ett_h323_T_robustnessData, |
533 | 16 | &ett_h323_BackupCallSignalAddresses, |
534 | 16 | &ett_h323_BackupCallSignalAddresses_item, |
535 | 16 | &ett_h323_Rrq_RD, |
536 | 16 | &ett_h323_Rcf_RD, |
537 | 16 | &ett_h323_Setup_RD, |
538 | 16 | &ett_h323_Connect_RD, |
539 | 16 | &ett_h323_Status_RD, |
540 | 16 | &ett_h323_T_fastStart, |
541 | 16 | &ett_h323_StatusInquiry_RD, |
542 | 16 | }; |
543 | | |
544 | | /* Register protocol */ |
545 | 16 | proto_h323 = proto_register_protocol("H.323", "H.323", "h323"); |
546 | | |
547 | | /* Register fields and subtrees */ |
548 | 16 | proto_register_field_array(proto_h323, hf, array_length(hf)); |
549 | 16 | proto_register_subtree_array(ett, array_length(ett)); |
550 | | |
551 | 16 | } |
552 | | |
553 | | |
554 | | /*--- proto_reg_handoff_h323 -------------------------------------------*/ |
555 | | void proto_reg_handoff_h323(void) |
556 | 16 | { |
557 | 16 | dissector_handle_t q931_handle; |
558 | | |
559 | 16 | q931_handle = find_dissector("q931"); |
560 | | |
561 | | /* H.323, Annex M1, Tunnelling of signalling protocols (QSIG) in H.323 */ |
562 | 16 | dissector_add_string("h225.tp", "1.3.12.9", q931_handle); |
563 | | |
564 | | /* H.323, Annex M4, Tunnelling of narrow-band signalling syntax (NSS) for H.323 */ |
565 | 16 | dissector_add_string("h225.gef.content", "GenericData/1000/1", |
566 | 16 | create_dissector_handle(dissect_RasTunnelledSignallingMessage_PDU, proto_h323)); |
567 | | |
568 | | /* H.323, Annex R, Robustness methods for H.323 entities */ |
569 | 16 | dissector_add_string("h225.gef.content", "GenericData/1/1", |
570 | 16 | create_dissector_handle(dissect_RobustnessData_PDU, proto_h323)); |
571 | 16 | } |
572 | | |