1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-h450-ros.c */
4 /* ../../tools/asn2wrs.py -p h450.ros -c ./h450-ros.cnf -s ./packet-h450-ros-template -D . -O ../../epan/dissectors ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
6 /* Input file: packet-h450-ros-template.c */
8 #line 1 "../../asn1/h450-ros/packet-h450-ros-template.c"
10 * Routines for H.450 packet dissection
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
36 #include <epan/packet.h>
37 #include <epan/strutil.h>
38 #include <epan/asn1.h>
39 #include <epan/expert.h>
40 #include <epan/wmem/wmem.h>
42 #include "packet-per.h"
44 #define PNAME "H.450 Remote Operations Apdus"
45 #define PSNAME "H450.ROS"
46 #define PFNAME "h450.ros"
48 /* Initialize the protocol and registered fields */
49 static int proto_h450_ros
= -1;
51 /*--- Included file: packet-h450-ros-hf.c ---*/
52 #line 1 "../../asn1/h450-ros/packet-h450-ros-hf.c"
53 static int hf_h450_ros_local
= -1; /* T_local */
54 static int hf_h450_ros_global
= -1; /* T_global */
55 static int hf_h450_ros_invoke
= -1; /* Invoke */
56 static int hf_h450_ros_returnResult
= -1; /* ReturnResult */
57 static int hf_h450_ros_returnError
= -1; /* ReturnError */
58 static int hf_h450_ros_reject
= -1; /* Reject */
59 static int hf_h450_ros_invokeIdConstrained
= -1; /* T_invokeIdConstrained */
60 static int hf_h450_ros_linkedId
= -1; /* InvokeId */
61 static int hf_h450_ros_opcode
= -1; /* Code */
62 static int hf_h450_ros_argument
= -1; /* InvokeArgument */
63 static int hf_h450_ros_invokeId
= -1; /* InvokeId */
64 static int hf_h450_ros_result
= -1; /* T_result */
65 static int hf_h450_ros_resultArgument
= -1; /* ResultArgument */
66 static int hf_h450_ros_errcode
= -1; /* Code */
67 static int hf_h450_ros_parameter
= -1; /* T_parameter */
68 static int hf_h450_ros_problem
= -1; /* T_problem */
69 static int hf_h450_ros_general
= -1; /* GeneralProblem */
70 static int hf_h450_ros_invokeProblem
= -1; /* InvokeProblem */
71 static int hf_h450_ros_returnResultProblem
= -1; /* ReturnResultProblem */
72 static int hf_h450_ros_returnErrorProblem
= -1; /* ReturnErrorProblem */
74 /*--- End of included file: packet-h450-ros-hf.c ---*/
75 #line 43 "../../asn1/h450-ros/packet-h450-ros-template.c"
77 /* Initialize the subtree pointers */
79 /*--- Included file: packet-h450-ros-ett.c ---*/
80 #line 1 "../../asn1/h450-ros/packet-h450-ros-ett.c"
81 static gint ett_h450_ros_Code
= -1;
82 static gint ett_h450_ros_ROS
= -1;
83 static gint ett_h450_ros_Invoke
= -1;
84 static gint ett_h450_ros_ReturnResult
= -1;
85 static gint ett_h450_ros_T_result
= -1;
86 static gint ett_h450_ros_ReturnError
= -1;
87 static gint ett_h450_ros_Reject
= -1;
88 static gint ett_h450_ros_T_problem
= -1;
90 /*--- End of included file: packet-h450-ros-ett.c ---*/
91 #line 46 "../../asn1/h450-ros/packet-h450-ros-template.c"
93 static expert_field ei_ros_undecoded
= EI_INIT
;
98 static dissector_handle_t data_handle
= NULL
;
100 /* Gloabl variables */
101 static gint32 problem_val
;
102 static gchar problem_str
[64];
103 static tvbuff_t
*arg_next_tvb
, *res_next_tvb
, *err_next_tvb
;
106 argument_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
) {
111 result_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
) {
116 error_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
) {
121 /*--- Included file: packet-h450-ros-fn.c ---*/
122 #line 1 "../../asn1/h450-ros/packet-h450-ros-fn.c"
126 dissect_h450_ros_T_local(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
127 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &actx
->rose_ctx
->d
.code_local
);
135 dissect_h450_ros_T_global(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
136 offset
= dissect_per_object_identifier_str(tvb
, offset
, actx
, tree
, hf_index
, &actx
->rose_ctx
->d
.code_global
);
142 static const value_string h450_ros_Code_vals
[] = {
148 static const per_choice_t Code_choice
[] = {
149 { 0, &hf_h450_ros_local
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_T_local
},
150 { 1, &hf_h450_ros_global
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_T_global
},
155 dissect_h450_ros_Code(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
156 offset
= dissect_per_choice(tvb
, offset
, actx
, tree
, hf_index
,
157 ett_h450_ros_Code
, Code_choice
,
158 &actx
->rose_ctx
->d
.code
);
160 #line 41 "../../asn1/h450-ros/h450-ros.cnf"
161 actx
->rose_ctx
->d
.code_item
= actx
->created_item
;
169 dissect_h450_ros_InvokeId(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
170 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, NULL
);
178 dissect_h450_ros_T_invokeIdConstrained(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
179 #line 69 "../../asn1/h450-ros/h450-ros.cnf"
180 offset
= dissect_per_constrained_integer(tvb
, offset
, actx
, tree
, hf_index
,
181 0U, 65535U, NULL
, TRUE
);
190 dissect_h450_ros_InvokeArgument(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
191 offset
= dissect_per_open_type_pdu(tvb
, offset
, actx
, tree
, hf_index
, argument_cb
);
197 static const per_sequence_t Invoke_sequence
[] = {
198 { &hf_h450_ros_invokeIdConstrained
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_T_invokeIdConstrained
},
199 { &hf_h450_ros_linkedId
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_InvokeId
},
200 { &hf_h450_ros_opcode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_Code
},
201 { &hf_h450_ros_argument
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_InvokeArgument
},
206 dissect_h450_ros_Invoke(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
207 #line 8 "../../asn1/ros/ros-inv.cnf"
208 dissector_handle_t arg_handle
= NULL
;
209 const gchar
*descr
= "";
213 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
214 ett_h450_ros_Invoke
, Invoke_sequence
);
216 #line 13 "../../asn1/ros/ros-inv.cnf"
217 actx
->rose_ctx
->d
.pdu
= 1;
219 if ((actx
->rose_ctx
->d
.code
== 0) && actx
->rose_ctx
->arg_local_dissector_table
) {
220 arg_handle
= dissector_get_uint_handle(actx
->rose_ctx
->arg_local_dissector_table
, actx
->rose_ctx
->d
.code_local
);
221 } else if ((actx
->rose_ctx
->d
.code
== 1) && actx
->rose_ctx
->arg_global_dissector_table
) {
222 arg_handle
= dissector_get_string_handle(actx
->rose_ctx
->arg_global_dissector_table
, actx
->rose_ctx
->d
.code_global
);
228 !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle
)))) {
229 if (actx
->rose_ctx
->d
.code
== 0)
230 descr
= wmem_strdup_printf(wmem_packet_scope(), "INV: %d", actx
->rose_ctx
->d
.code_local
);
231 else if (actx
->rose_ctx
->d
.code
== 1)
232 descr
= wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx
->rose_ctx
->d
.code_global
);
234 descr
= wmem_strdup_printf(wmem_packet_scope(), "INV:");
237 if (actx
->rose_ctx
->apdu_depth
>= 0)
238 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
239 if (actx
->rose_ctx
->fillin_info
)
240 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
241 if (actx
->rose_ctx
->fillin_ptr
)
242 g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
244 if (!arg_next_tvb
) { /* empty argument */
245 arg_next_tvb
= tvb_new_subset(tvb
, (actx
->encoding
==ASN1_ENC_PER
)?offset
>>3:offset
, 0, 0);
248 call_dissector_with_data((arg_handle
)?arg_handle
:data_handle
, arg_next_tvb
, actx
->pinfo
, tree
, actx
->rose_ctx
);
250 expert_add_info_format(actx
->pinfo
, tree
, &ei_ros_undecoded
, "Undecoded %s", descr
);
259 dissect_h450_ros_ResultArgument(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
260 offset
= dissect_per_open_type_pdu(tvb
, offset
, actx
, tree
, hf_index
, result_cb
);
266 static const per_sequence_t T_result_sequence
[] = {
267 { &hf_h450_ros_opcode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_Code
},
268 { &hf_h450_ros_resultArgument
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_ResultArgument
},
273 dissect_h450_ros_T_result(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
274 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
275 ett_h450_ros_T_result
, T_result_sequence
);
281 static const per_sequence_t ReturnResult_sequence
[] = {
282 { &hf_h450_ros_invokeId
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_InvokeId
},
283 { &hf_h450_ros_result
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_T_result
},
288 dissect_h450_ros_ReturnResult(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
289 #line 7 "../../asn1/ros/ros-res.cnf"
290 dissector_handle_t res_handle
= NULL
;
291 const gchar
*descr
= "";
293 actx
->rose_ctx
->d
.code
= -1;
296 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
297 ett_h450_ros_ReturnResult
, ReturnResult_sequence
);
299 #line 13 "../../asn1/ros/ros-res.cnf"
300 actx
->rose_ctx
->d
.pdu
= 2;
302 if ((actx
->rose_ctx
->d
.code
== 0) && actx
->rose_ctx
->res_local_dissector_table
) {
303 res_handle
= dissector_get_uint_handle(actx
->rose_ctx
->res_local_dissector_table
, actx
->rose_ctx
->d
.code_local
);
304 } else if ((actx
->rose_ctx
->d
.code
== 1) && actx
->rose_ctx
->res_global_dissector_table
) {
305 res_handle
= dissector_get_string_handle(actx
->rose_ctx
->res_global_dissector_table
, actx
->rose_ctx
->d
.code_global
);
311 !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle
)))) {
312 if (actx
->rose_ctx
->d
.code
== 0)
313 descr
= wmem_strdup_printf(wmem_packet_scope(), "RES: %d", actx
->rose_ctx
->d
.code_local
);
314 else if (actx
->rose_ctx
->d
.code
== 1)
315 descr
= wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx
->rose_ctx
->d
.code_global
);
317 descr
= wmem_strdup_printf(wmem_packet_scope(), "RES:");
320 if (actx
->rose_ctx
->apdu_depth
>= 0)
321 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
322 if (actx
->rose_ctx
->fillin_info
)
323 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
324 if (actx
->rose_ctx
->fillin_ptr
)
325 g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
327 if (actx
->rose_ctx
->d
.code
!= -1) {
328 if (!res_next_tvb
) { /* empty result */
329 res_next_tvb
= tvb_new_subset(tvb
, (actx
->encoding
==ASN1_ENC_PER
)?offset
>>3:offset
, 0, 0);
332 call_dissector_with_data((res_handle
)?res_handle
:data_handle
, res_next_tvb
, actx
->pinfo
, tree
, actx
->rose_ctx
);
334 expert_add_info_format(actx
->pinfo
, tree
, &ei_ros_undecoded
, "Undecoded %s", descr
);
344 dissect_h450_ros_T_parameter(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
345 offset
= dissect_per_open_type_pdu(tvb
, offset
, actx
, tree
, hf_index
, error_cb
);
351 static const per_sequence_t ReturnError_sequence
[] = {
352 { &hf_h450_ros_invokeId
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_InvokeId
},
353 { &hf_h450_ros_errcode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_Code
},
354 { &hf_h450_ros_parameter
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_T_parameter
},
359 dissect_h450_ros_ReturnError(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
360 #line 7 "../../asn1/ros/ros-err.cnf"
361 dissector_handle_t err_handle
= NULL
;
362 const gchar
*descr
= "";
366 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
367 ett_h450_ros_ReturnError
, ReturnError_sequence
);
369 #line 12 "../../asn1/ros/ros-err.cnf"
370 actx
->rose_ctx
->d
.pdu
= 3;
372 if ((actx
->rose_ctx
->d
.code
== 0) && actx
->rose_ctx
->err_local_dissector_table
) {
373 err_handle
= dissector_get_uint_handle(actx
->rose_ctx
->err_local_dissector_table
, actx
->rose_ctx
->d
.code_local
);
374 } else if ((actx
->rose_ctx
->d
.code
== 1) && actx
->rose_ctx
->err_global_dissector_table
) {
375 err_handle
= dissector_get_string_handle(actx
->rose_ctx
->err_global_dissector_table
, actx
->rose_ctx
->d
.code_global
);
381 !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle
)))) {
382 if (actx
->rose_ctx
->d
.code
== 0)
383 descr
= wmem_strdup_printf(wmem_packet_scope(), "ERR: %d", actx
->rose_ctx
->d
.code_local
);
384 else if (actx
->rose_ctx
->d
.code
== 1)
385 descr
= wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx
->rose_ctx
->d
.code_global
);
387 descr
= wmem_strdup_printf(wmem_packet_scope(), "ERR:");
390 if (actx
->rose_ctx
->apdu_depth
>= 0)
391 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
392 if (actx
->rose_ctx
->fillin_info
)
393 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
394 if (actx
->rose_ctx
->fillin_ptr
)
395 g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
397 if (!err_next_tvb
) { /* empty error */
398 err_next_tvb
= tvb_new_subset(tvb
, (actx
->encoding
==ASN1_ENC_PER
)?offset
>>3:offset
, 0, 0);
401 call_dissector_with_data((err_handle
)?err_handle
:data_handle
, err_next_tvb
, actx
->pinfo
, tree
, actx
->rose_ctx
);
403 expert_add_info_format(actx
->pinfo
, tree
, &ei_ros_undecoded
, "Undecoded %s", descr
);
410 static const value_string h450_ros_GeneralProblem_vals
[] = {
411 { 0, "unrecognizedComponent" },
412 { 1, "mistypedComponent" },
413 { 2, "badlyStructuredComponent" },
419 dissect_h450_ros_GeneralProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
420 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
422 #line 52 "../../asn1/h450-ros/h450-ros.cnf"
423 g_strlcpy(problem_str
, val_to_str(problem_val
, VALS(h450_ros_GeneralProblem_vals
), ""), 64);
424 problem_str
[64-1] = '\0';
430 static const value_string h450_ros_InvokeProblem_vals
[] = {
431 { 0, "duplicateInvocation" },
432 { 1, "unrecognizedOperation" },
433 { 2, "mistypedArgument" },
434 { 3, "resourceLimitation" },
435 { 4, "releaseInProgress" },
436 { 5, "unrecognizedLinkedId" },
437 { 6, "linkedResponseUnexpected" },
438 { 7, "unexpectedLinkedOperation" },
444 dissect_h450_ros_InvokeProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
445 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
447 #line 55 "../../asn1/h450-ros/h450-ros.cnf"
448 g_strlcpy(problem_str
, val_to_str(problem_val
, VALS(h450_ros_InvokeProblem_vals
), ""), 64);
449 problem_str
[64-1] = '\0';
455 static const value_string h450_ros_ReturnResultProblem_vals
[] = {
456 { 0, "unrecognizedInvocation" },
457 { 1, "resultResponseUnexpected" },
458 { 2, "mistypedResult" },
464 dissect_h450_ros_ReturnResultProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
465 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
467 #line 58 "../../asn1/h450-ros/h450-ros.cnf"
468 g_strlcpy(problem_str
, val_to_str(problem_val
, VALS(h450_ros_ReturnResultProblem_vals
), ""), 64);
469 problem_str
[64-1] = '\0';
475 static const value_string h450_ros_ReturnErrorProblem_vals
[] = {
476 { 0, "unrecognizedInvocation" },
477 { 1, "errorResponseUnexpected" },
478 { 2, "unrecognizedError" },
479 { 3, "unexpectedError" },
480 { 4, "mistypedParameter" },
486 dissect_h450_ros_ReturnErrorProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
487 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
489 #line 61 "../../asn1/h450-ros/h450-ros.cnf"
490 g_strlcpy(problem_str
, val_to_str(problem_val
, VALS(h450_ros_ReturnErrorProblem_vals
), ""), 64);
491 problem_str
[64-1] = '\0';
497 static const value_string h450_ros_T_problem_vals
[] = {
500 { 2, "returnResult" },
501 { 3, "returnError" },
505 static const per_choice_t T_problem_choice
[] = {
506 { 0, &hf_h450_ros_general
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_GeneralProblem
},
507 { 1, &hf_h450_ros_invokeProblem
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_InvokeProblem
},
508 { 2, &hf_h450_ros_returnResultProblem
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnResultProblem
},
509 { 3, &hf_h450_ros_returnErrorProblem
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnErrorProblem
},
514 dissect_h450_ros_T_problem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
515 offset
= dissect_per_choice(tvb
, offset
, actx
, tree
, hf_index
,
516 ett_h450_ros_T_problem
, T_problem_choice
,
523 static const per_sequence_t Reject_sequence
[] = {
524 { &hf_h450_ros_invokeId
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_InvokeId
},
525 { &hf_h450_ros_problem
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_T_problem
},
530 dissect_h450_ros_Reject(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
531 #line 7 "../../asn1/ros/ros-rej.cnf"
532 const gchar
*descr
= "";
534 problem_str
[0] = '\0';
536 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
537 ett_h450_ros_Reject
, Reject_sequence
);
539 #line 11 "../../asn1/ros/ros-rej.cnf"
540 descr
= wmem_strdup_printf(wmem_packet_scope(), "REJ: %s", problem_str
);
542 if (actx
->rose_ctx
->apdu_depth
>= 0)
543 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
544 if (actx
->rose_ctx
->fillin_info
)
545 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
546 if (actx
->rose_ctx
->fillin_ptr
)
547 g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
553 const value_string h450_ros_ROS_vals
[] = {
555 { 2, "returnResult" },
556 { 3, "returnError" },
561 static const per_choice_t ROS_choice
[] = {
562 { 1, &hf_h450_ros_invoke
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_Invoke
},
563 { 2, &hf_h450_ros_returnResult
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnResult
},
564 { 3, &hf_h450_ros_returnError
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnError
},
565 { 4, &hf_h450_ros_reject
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_Reject
},
570 dissect_h450_ros_ROS(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
571 #line 30 "../../asn1/h450-ros/h450-ros.cnf"
572 DISSECTOR_ASSERT(actx
->rose_ctx
);
573 rose_ctx_clean_data(actx
->rose_ctx
);
575 offset
= dissect_per_choice(tvb
, offset
, actx
, tree
, hf_index
,
576 ett_h450_ros_ROS
, ROS_choice
,
583 /*--- End of included file: packet-h450-ros-fn.c ---*/
584 #line 75 "../../asn1/h450-ros/packet-h450-ros-template.c"
586 /*--- proto_register_h450_ros -----------------------------------------------*/
587 void proto_register_h450_ros(void) {
590 static hf_register_info hf
[] = {
592 /*--- Included file: packet-h450-ros-hfarr.c ---*/
593 #line 1 "../../asn1/h450-ros/packet-h450-ros-hfarr.c"
594 { &hf_h450_ros_local
,
595 { "local", "h450.ros.local",
596 FT_INT32
, BASE_DEC
, NULL
, 0,
598 { &hf_h450_ros_global
,
599 { "global", "h450.ros.global",
600 FT_OID
, BASE_NONE
, NULL
, 0,
602 { &hf_h450_ros_invoke
,
603 { "invoke", "h450.ros.invoke_element",
604 FT_NONE
, BASE_NONE
, NULL
, 0,
606 { &hf_h450_ros_returnResult
,
607 { "returnResult", "h450.ros.returnResult_element",
608 FT_NONE
, BASE_NONE
, NULL
, 0,
610 { &hf_h450_ros_returnError
,
611 { "returnError", "h450.ros.returnError_element",
612 FT_NONE
, BASE_NONE
, NULL
, 0,
614 { &hf_h450_ros_reject
,
615 { "reject", "h450.ros.reject_element",
616 FT_NONE
, BASE_NONE
, NULL
, 0,
618 { &hf_h450_ros_invokeIdConstrained
,
619 { "invokeId", "h450.ros.invokeId",
620 FT_INT32
, BASE_DEC
, NULL
, 0,
621 "T_invokeIdConstrained", HFILL
}},
622 { &hf_h450_ros_linkedId
,
623 { "linkedId", "h450.ros.linkedId",
624 FT_INT32
, BASE_DEC
, NULL
, 0,
625 "InvokeId", HFILL
}},
626 { &hf_h450_ros_opcode
,
627 { "opcode", "h450.ros.opcode",
628 FT_UINT32
, BASE_DEC
, VALS(h450_ros_Code_vals
), 0,
630 { &hf_h450_ros_argument
,
631 { "argument", "h450.ros.argument",
632 FT_BYTES
, BASE_NONE
, NULL
, 0,
633 "InvokeArgument", HFILL
}},
634 { &hf_h450_ros_invokeId
,
635 { "invokeId", "h450.ros.invokeId",
636 FT_INT32
, BASE_DEC
, NULL
, 0,
638 { &hf_h450_ros_result
,
639 { "result", "h450.ros.result_element",
640 FT_NONE
, BASE_NONE
, NULL
, 0,
642 { &hf_h450_ros_resultArgument
,
643 { "result", "h450.ros.result",
644 FT_BYTES
, BASE_NONE
, NULL
, 0,
645 "ResultArgument", HFILL
}},
646 { &hf_h450_ros_errcode
,
647 { "errcode", "h450.ros.errcode",
648 FT_UINT32
, BASE_DEC
, VALS(h450_ros_Code_vals
), 0,
650 { &hf_h450_ros_parameter
,
651 { "parameter", "h450.ros.parameter",
652 FT_BYTES
, BASE_NONE
, NULL
, 0,
654 { &hf_h450_ros_problem
,
655 { "problem", "h450.ros.problem",
656 FT_UINT32
, BASE_DEC
, VALS(h450_ros_T_problem_vals
), 0,
658 { &hf_h450_ros_general
,
659 { "general", "h450.ros.general",
660 FT_INT32
, BASE_DEC
, VALS(h450_ros_GeneralProblem_vals
), 0,
661 "GeneralProblem", HFILL
}},
662 { &hf_h450_ros_invokeProblem
,
663 { "invoke", "h450.ros.invoke",
664 FT_INT32
, BASE_DEC
, VALS(h450_ros_InvokeProblem_vals
), 0,
665 "InvokeProblem", HFILL
}},
666 { &hf_h450_ros_returnResultProblem
,
667 { "returnResult", "h450.ros.returnResult",
668 FT_INT32
, BASE_DEC
, VALS(h450_ros_ReturnResultProblem_vals
), 0,
669 "ReturnResultProblem", HFILL
}},
670 { &hf_h450_ros_returnErrorProblem
,
671 { "returnError", "h450.ros.returnError",
672 FT_INT32
, BASE_DEC
, VALS(h450_ros_ReturnErrorProblem_vals
), 0,
673 "ReturnErrorProblem", HFILL
}},
675 /*--- End of included file: packet-h450-ros-hfarr.c ---*/
676 #line 82 "../../asn1/h450-ros/packet-h450-ros-template.c"
679 /* List of subtrees */
680 static gint
*ett
[] = {
682 /*--- Included file: packet-h450-ros-ettarr.c ---*/
683 #line 1 "../../asn1/h450-ros/packet-h450-ros-ettarr.c"
686 &ett_h450_ros_Invoke
,
687 &ett_h450_ros_ReturnResult
,
688 &ett_h450_ros_T_result
,
689 &ett_h450_ros_ReturnError
,
690 &ett_h450_ros_Reject
,
691 &ett_h450_ros_T_problem
,
693 /*--- End of included file: packet-h450-ros-ettarr.c ---*/
694 #line 87 "../../asn1/h450-ros/packet-h450-ros-template.c"
697 static ei_register_info ei
[] = {
698 { &ei_ros_undecoded
, { "h450.ros.undecoded", PI_UNDECODED
, PI_WARN
, "Undecoded", EXPFILL
}},
701 expert_module_t
* expert_h450_ros
;
703 /* Register protocol and dissector */
704 proto_h450_ros
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
705 proto_set_cant_toggle(proto_h450_ros
);
707 /* Register fields and subtrees */
708 proto_register_field_array(proto_h450_ros
, hf
, array_length(hf
));
709 proto_register_subtree_array(ett
, array_length(ett
));
710 expert_h450_ros
= expert_register_protocol(proto_h450_ros
);
711 expert_register_field_array(expert_h450_ros
, ei
, array_length(ei
));
714 /*--- proto_reg_handoff_h450_ros --------------------------------------------*/
715 void proto_reg_handoff_h450_ros(void) {
716 data_handle
= find_dissector("data");
719 /*---------------------------------------------------------------------------*/