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 /* asn2wrs.py -q -L -p h450.ros -c ./h450-ros.cnf -s ./packet-h450-ros-template -D . -O ../.. ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
7 * Routines for H.450 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/strutil.h>
21 #include <epan/asn1.h>
22 #include <epan/expert.h>
23 #include <wsutil/array.h>
25 #include "packet-per.h"
26 #include "packet-h450-ros.h"
28 #define PNAME "H.450 Remote Operations Apdus"
29 #define PSNAME "H450.ROS"
30 #define PFNAME "h450.ros"
32 void proto_register_h450_ros(void);
33 void proto_reg_handoff_h450_ros(void);
35 /* Initialize the protocol and registered fields */
36 static int proto_h450_ros
;
37 static int hf_h450_ros_local
; /* T_local */
38 static int hf_h450_ros_global
; /* T_global */
39 static int hf_h450_ros_invoke
; /* Invoke */
40 static int hf_h450_ros_returnResult
; /* ReturnResult */
41 static int hf_h450_ros_returnError
; /* ReturnError */
42 static int hf_h450_ros_reject
; /* Reject */
43 static int hf_h450_ros_invokeIdConstrained
; /* T_invokeIdConstrained */
44 static int hf_h450_ros_linkedId
; /* InvokeId */
45 static int hf_h450_ros_opcode
; /* Code */
46 static int hf_h450_ros_argument
; /* InvokeArgument */
47 static int hf_h450_ros_invokeId
; /* InvokeId */
48 static int hf_h450_ros_result
; /* T_result */
49 static int hf_h450_ros_resultArgument
; /* ResultArgument */
50 static int hf_h450_ros_errcode
; /* Code */
51 static int hf_h450_ros_parameter
; /* T_parameter */
52 static int hf_h450_ros_problem
; /* T_problem */
53 static int hf_h450_ros_general
; /* GeneralProblem */
54 static int hf_h450_ros_invokeProblem
; /* InvokeProblem */
55 static int hf_h450_ros_returnResultProblem
; /* ReturnResultProblem */
56 static int hf_h450_ros_returnErrorProblem
; /* ReturnErrorProblem */
58 /* Initialize the subtree pointers */
59 static int ett_h450_ros_Code
;
60 static int ett_h450_ros_ROS
;
61 static int ett_h450_ros_Invoke
;
62 static int ett_h450_ros_ReturnResult
;
63 static int ett_h450_ros_T_result
;
64 static int ett_h450_ros_ReturnError
;
65 static int ett_h450_ros_Reject
;
66 static int ett_h450_ros_T_problem
;
68 static expert_field ei_ros_undecoded
;
73 static dissector_handle_t data_handle
;
75 /* Global variables */
76 static int32_t problem_val
;
77 static char problem_str
[64];
78 static tvbuff_t
*arg_next_tvb
, *res_next_tvb
, *err_next_tvb
;
81 argument_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
) {
83 return tvb_captured_length(tvb
);
87 result_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
) {
89 return tvb_captured_length(tvb
);
93 error_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
) {
95 return tvb_captured_length(tvb
);
101 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_
) {
102 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &actx
->rose_ctx
->d
.code_local
);
110 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_
) {
111 offset
= dissect_per_object_identifier_str(tvb
, offset
, actx
, tree
, hf_index
, &actx
->rose_ctx
->d
.code_global
);
117 static const value_string h450_ros_Code_vals
[] = {
123 static const per_choice_t Code_choice
[] = {
124 { 0, &hf_h450_ros_local
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_T_local
},
125 { 1, &hf_h450_ros_global
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_T_global
},
130 dissect_h450_ros_Code(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
131 offset
= dissect_per_choice(tvb
, offset
, actx
, tree
, hf_index
,
132 ett_h450_ros_Code
, Code_choice
,
133 &actx
->rose_ctx
->d
.code
);
135 actx
->rose_ctx
->d
.code_item
= actx
->created_item
;
142 dissect_h450_ros_InvokeId(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
143 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, NULL
);
151 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_
) {
152 offset
= dissect_per_constrained_integer(tvb
, offset
, actx
, tree
, hf_index
,
153 0U, 65535U, NULL
, true);
161 dissect_h450_ros_InvokeArgument(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
162 offset
= dissect_per_open_type_pdu_new(tvb
, offset
, actx
, tree
, hf_index
, argument_cb
);
168 static const per_sequence_t Invoke_sequence
[] = {
169 { &hf_h450_ros_invokeIdConstrained
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_T_invokeIdConstrained
},
170 { &hf_h450_ros_linkedId
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_InvokeId
},
171 { &hf_h450_ros_opcode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_Code
},
172 { &hf_h450_ros_argument
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_InvokeArgument
},
177 dissect_h450_ros_Invoke(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
178 dissector_handle_t arg_handle
= NULL
;
179 const char *descr
= "";
182 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
183 ett_h450_ros_Invoke
, Invoke_sequence
);
185 actx
->rose_ctx
->d
.pdu
= 1;
187 if ((actx
->rose_ctx
->d
.code
== 0) && actx
->rose_ctx
->arg_local_dissector_table
) {
188 arg_handle
= dissector_get_uint_handle(actx
->rose_ctx
->arg_local_dissector_table
, actx
->rose_ctx
->d
.code_local
);
189 } else if ((actx
->rose_ctx
->d
.code
== 1) && actx
->rose_ctx
->arg_global_dissector_table
) {
190 arg_handle
= dissector_get_string_handle(actx
->rose_ctx
->arg_global_dissector_table
, actx
->rose_ctx
->d
.code_global
);
196 !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle
)))) {
197 if (actx
->rose_ctx
->d
.code
== 0)
198 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "INV: %d", actx
->rose_ctx
->d
.code_local
);
199 else if (actx
->rose_ctx
->d
.code
== 1)
200 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "INV: %s", actx
->rose_ctx
->d
.code_global
);
202 descr
= wmem_strdup(actx
->pinfo
->pool
, "INV:");
205 if (actx
->rose_ctx
->apdu_depth
>= 0)
206 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
207 if (actx
->rose_ctx
->fillin_info
)
208 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
209 if (actx
->rose_ctx
->fillin_ptr
)
210 (void) g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
212 if (!arg_next_tvb
) { /* empty argument */
213 arg_next_tvb
= tvb_new_subset_length_caplen(tvb
, (actx
->encoding
==ASN1_ENC_PER
)?offset
>>3:offset
, 0, 0);
216 call_dissector_with_data((arg_handle
)?arg_handle
:data_handle
, arg_next_tvb
, actx
->pinfo
, tree
, actx
->rose_ctx
);
218 expert_add_info_format(actx
->pinfo
, tree
, &ei_ros_undecoded
, "Undecoded %s", descr
);
226 dissect_h450_ros_ResultArgument(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
227 offset
= dissect_per_open_type_pdu_new(tvb
, offset
, actx
, tree
, hf_index
, result_cb
);
233 static const per_sequence_t T_result_sequence
[] = {
234 { &hf_h450_ros_opcode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_Code
},
235 { &hf_h450_ros_resultArgument
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_ResultArgument
},
240 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_
) {
241 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
242 ett_h450_ros_T_result
, T_result_sequence
);
248 static const per_sequence_t ReturnResult_sequence
[] = {
249 { &hf_h450_ros_invokeId
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_InvokeId
},
250 { &hf_h450_ros_result
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_T_result
},
255 dissect_h450_ros_ReturnResult(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
256 dissector_handle_t res_handle
= NULL
;
257 const char *descr
= "";
259 actx
->rose_ctx
->d
.code
= -1;
261 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
262 ett_h450_ros_ReturnResult
, ReturnResult_sequence
);
264 actx
->rose_ctx
->d
.pdu
= 2;
266 if ((actx
->rose_ctx
->d
.code
== 0) && actx
->rose_ctx
->res_local_dissector_table
) {
267 res_handle
= dissector_get_uint_handle(actx
->rose_ctx
->res_local_dissector_table
, actx
->rose_ctx
->d
.code_local
);
268 } else if ((actx
->rose_ctx
->d
.code
== 1) && actx
->rose_ctx
->res_global_dissector_table
) {
269 res_handle
= dissector_get_string_handle(actx
->rose_ctx
->res_global_dissector_table
, actx
->rose_ctx
->d
.code_global
);
275 !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle
)))) {
276 if (actx
->rose_ctx
->d
.code
== 0)
277 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "RES: %d", actx
->rose_ctx
->d
.code_local
);
278 else if (actx
->rose_ctx
->d
.code
== 1)
279 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "RES: %s", actx
->rose_ctx
->d
.code_global
);
281 descr
= wmem_strdup(actx
->pinfo
->pool
, "RES:");
284 if (actx
->rose_ctx
->apdu_depth
>= 0)
285 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
286 if (actx
->rose_ctx
->fillin_info
)
287 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
288 if (actx
->rose_ctx
->fillin_ptr
)
289 (void) g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
291 if (actx
->rose_ctx
->d
.code
!= -1) {
292 if (!res_next_tvb
) { /* empty result */
293 res_next_tvb
= tvb_new_subset_length_caplen(tvb
, (actx
->encoding
==ASN1_ENC_PER
)?offset
>>3:offset
, 0, 0);
296 call_dissector_with_data((res_handle
)?res_handle
:data_handle
, res_next_tvb
, actx
->pinfo
, tree
, actx
->rose_ctx
);
298 expert_add_info_format(actx
->pinfo
, tree
, &ei_ros_undecoded
, "Undecoded %s", descr
);
307 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_
) {
308 offset
= dissect_per_open_type_pdu_new(tvb
, offset
, actx
, tree
, hf_index
, error_cb
);
314 static const per_sequence_t ReturnError_sequence
[] = {
315 { &hf_h450_ros_invokeId
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_InvokeId
},
316 { &hf_h450_ros_errcode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_Code
},
317 { &hf_h450_ros_parameter
, ASN1_NO_EXTENSIONS
, ASN1_OPTIONAL
, dissect_h450_ros_T_parameter
},
322 dissect_h450_ros_ReturnError(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
323 dissector_handle_t err_handle
= NULL
;
324 const char *descr
= "";
327 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
328 ett_h450_ros_ReturnError
, ReturnError_sequence
);
330 actx
->rose_ctx
->d
.pdu
= 3;
332 if ((actx
->rose_ctx
->d
.code
== 0) && actx
->rose_ctx
->err_local_dissector_table
) {
333 err_handle
= dissector_get_uint_handle(actx
->rose_ctx
->err_local_dissector_table
, actx
->rose_ctx
->d
.code_local
);
334 } else if ((actx
->rose_ctx
->d
.code
== 1) && actx
->rose_ctx
->err_global_dissector_table
) {
335 err_handle
= dissector_get_string_handle(actx
->rose_ctx
->err_global_dissector_table
, actx
->rose_ctx
->d
.code_global
);
341 !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle
)))) {
342 if (actx
->rose_ctx
->d
.code
== 0)
343 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "ERR: %d", actx
->rose_ctx
->d
.code_local
);
344 else if (actx
->rose_ctx
->d
.code
== 1)
345 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "ERR: %s", actx
->rose_ctx
->d
.code_global
);
347 descr
= wmem_strdup(actx
->pinfo
->pool
, "ERR:");
350 if (actx
->rose_ctx
->apdu_depth
>= 0)
351 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
352 if (actx
->rose_ctx
->fillin_info
)
353 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
354 if (actx
->rose_ctx
->fillin_ptr
)
355 (void) g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
357 if (!err_next_tvb
) { /* empty error */
358 err_next_tvb
= tvb_new_subset_length_caplen(tvb
, (actx
->encoding
==ASN1_ENC_PER
)?offset
>>3:offset
, 0, 0);
361 call_dissector_with_data((err_handle
)?err_handle
:data_handle
, err_next_tvb
, actx
->pinfo
, tree
, actx
->rose_ctx
);
363 expert_add_info_format(actx
->pinfo
, tree
, &ei_ros_undecoded
, "Undecoded %s", descr
);
369 static const value_string h450_ros_GeneralProblem_vals
[] = {
370 { 0, "unrecognizedComponent" },
371 { 1, "mistypedComponent" },
372 { 2, "badlyStructuredComponent" },
378 dissect_h450_ros_GeneralProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
379 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
381 (void) g_strlcpy(problem_str
, val_to_str_const(problem_val
, VALS(h450_ros_GeneralProblem_vals
), ""), 64);
382 problem_str
[64-1] = '\0';
387 static const value_string h450_ros_InvokeProblem_vals
[] = {
388 { 0, "duplicateInvocation" },
389 { 1, "unrecognizedOperation" },
390 { 2, "mistypedArgument" },
391 { 3, "resourceLimitation" },
392 { 4, "releaseInProgress" },
393 { 5, "unrecognizedLinkedId" },
394 { 6, "linkedResponseUnexpected" },
395 { 7, "unexpectedLinkedOperation" },
401 dissect_h450_ros_InvokeProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
402 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
404 (void) g_strlcpy(problem_str
, val_to_str_const(problem_val
, VALS(h450_ros_InvokeProblem_vals
), ""), 64);
405 problem_str
[64-1] = '\0';
410 static const value_string h450_ros_ReturnResultProblem_vals
[] = {
411 { 0, "unrecognizedInvocation" },
412 { 1, "resultResponseUnexpected" },
413 { 2, "mistypedResult" },
419 dissect_h450_ros_ReturnResultProblem(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 (void) g_strlcpy(problem_str
, val_to_str_const(problem_val
, VALS(h450_ros_ReturnResultProblem_vals
), ""), 64);
423 problem_str
[64-1] = '\0';
428 static const value_string h450_ros_ReturnErrorProblem_vals
[] = {
429 { 0, "unrecognizedInvocation" },
430 { 1, "errorResponseUnexpected" },
431 { 2, "unrecognizedError" },
432 { 3, "unexpectedError" },
433 { 4, "mistypedParameter" },
439 dissect_h450_ros_ReturnErrorProblem(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
440 offset
= dissect_per_integer(tvb
, offset
, actx
, tree
, hf_index
, &problem_val
);
442 (void) g_strlcpy(problem_str
, val_to_str_const(problem_val
, VALS(h450_ros_ReturnErrorProblem_vals
), ""), 64);
443 problem_str
[64-1] = '\0';
448 static const value_string h450_ros_T_problem_vals
[] = {
451 { 2, "returnResult" },
452 { 3, "returnError" },
456 static const per_choice_t T_problem_choice
[] = {
457 { 0, &hf_h450_ros_general
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_GeneralProblem
},
458 { 1, &hf_h450_ros_invokeProblem
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_InvokeProblem
},
459 { 2, &hf_h450_ros_returnResultProblem
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnResultProblem
},
460 { 3, &hf_h450_ros_returnErrorProblem
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnErrorProblem
},
465 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_
) {
466 offset
= dissect_per_choice(tvb
, offset
, actx
, tree
, hf_index
,
467 ett_h450_ros_T_problem
, T_problem_choice
,
474 static const per_sequence_t Reject_sequence
[] = {
475 { &hf_h450_ros_invokeId
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_InvokeId
},
476 { &hf_h450_ros_problem
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_h450_ros_T_problem
},
481 dissect_h450_ros_Reject(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
484 problem_str
[0] = '\0';
485 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
486 ett_h450_ros_Reject
, Reject_sequence
);
488 descr
= wmem_strdup_printf(actx
->pinfo
->pool
, "REJ: %s", problem_str
);
490 if (actx
->rose_ctx
->apdu_depth
>= 0)
491 proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree
), actx
->rose_ctx
->apdu_depth
), " %s", descr
);
492 if (actx
->rose_ctx
->fillin_info
)
493 col_append_str(actx
->pinfo
->cinfo
, COL_INFO
, descr
);
494 if (actx
->rose_ctx
->fillin_ptr
)
495 (void) g_strlcat(actx
->rose_ctx
->fillin_ptr
, descr
, actx
->rose_ctx
->fillin_buf_size
);
500 const value_string h450_ros_ROS_vals
[] = {
502 { 2, "returnResult" },
503 { 3, "returnError" },
508 static const per_choice_t ROS_choice
[] = {
509 { 1, &hf_h450_ros_invoke
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_Invoke
},
510 { 2, &hf_h450_ros_returnResult
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnResult
},
511 { 3, &hf_h450_ros_returnError
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_ReturnError
},
512 { 4, &hf_h450_ros_reject
, ASN1_NO_EXTENSIONS
, dissect_h450_ros_Reject
},
517 dissect_h450_ros_ROS(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
518 DISSECTOR_ASSERT(actx
->rose_ctx
);
519 rose_ctx_clean_data(actx
->rose_ctx
);
520 offset
= dissect_per_choice(tvb
, offset
, actx
, tree
, hf_index
,
521 ett_h450_ros_ROS
, ROS_choice
,
528 /*--- proto_register_h450_ros -----------------------------------------------*/
529 void proto_register_h450_ros(void) {
532 static hf_register_info hf
[] = {
533 { &hf_h450_ros_local
,
534 { "local", "h450.ros.local",
535 FT_INT32
, BASE_DEC
, NULL
, 0,
537 { &hf_h450_ros_global
,
538 { "global", "h450.ros.global",
539 FT_OID
, BASE_NONE
, NULL
, 0,
541 { &hf_h450_ros_invoke
,
542 { "invoke", "h450.ros.invoke_element",
543 FT_NONE
, BASE_NONE
, NULL
, 0,
545 { &hf_h450_ros_returnResult
,
546 { "returnResult", "h450.ros.returnResult_element",
547 FT_NONE
, BASE_NONE
, NULL
, 0,
549 { &hf_h450_ros_returnError
,
550 { "returnError", "h450.ros.returnError_element",
551 FT_NONE
, BASE_NONE
, NULL
, 0,
553 { &hf_h450_ros_reject
,
554 { "reject", "h450.ros.reject_element",
555 FT_NONE
, BASE_NONE
, NULL
, 0,
557 { &hf_h450_ros_invokeIdConstrained
,
558 { "invokeId", "h450.ros.invokeId",
559 FT_INT32
, BASE_DEC
, NULL
, 0,
560 "T_invokeIdConstrained", HFILL
}},
561 { &hf_h450_ros_linkedId
,
562 { "linkedId", "h450.ros.linkedId",
563 FT_INT32
, BASE_DEC
, NULL
, 0,
564 "InvokeId", HFILL
}},
565 { &hf_h450_ros_opcode
,
566 { "opcode", "h450.ros.opcode",
567 FT_UINT32
, BASE_DEC
, VALS(h450_ros_Code_vals
), 0,
569 { &hf_h450_ros_argument
,
570 { "argument", "h450.ros.argument",
571 FT_BYTES
, BASE_NONE
, NULL
, 0,
572 "InvokeArgument", HFILL
}},
573 { &hf_h450_ros_invokeId
,
574 { "invokeId", "h450.ros.invokeId",
575 FT_INT32
, BASE_DEC
, NULL
, 0,
577 { &hf_h450_ros_result
,
578 { "result", "h450.ros.result_element",
579 FT_NONE
, BASE_NONE
, NULL
, 0,
581 { &hf_h450_ros_resultArgument
,
582 { "result", "h450.ros.result",
583 FT_BYTES
, BASE_NONE
, NULL
, 0,
584 "ResultArgument", HFILL
}},
585 { &hf_h450_ros_errcode
,
586 { "errcode", "h450.ros.errcode",
587 FT_UINT32
, BASE_DEC
, VALS(h450_ros_Code_vals
), 0,
589 { &hf_h450_ros_parameter
,
590 { "parameter", "h450.ros.parameter",
591 FT_BYTES
, BASE_NONE
, NULL
, 0,
593 { &hf_h450_ros_problem
,
594 { "problem", "h450.ros.problem",
595 FT_UINT32
, BASE_DEC
, VALS(h450_ros_T_problem_vals
), 0,
597 { &hf_h450_ros_general
,
598 { "general", "h450.ros.general",
599 FT_INT32
, BASE_DEC
, VALS(h450_ros_GeneralProblem_vals
), 0,
600 "GeneralProblem", HFILL
}},
601 { &hf_h450_ros_invokeProblem
,
602 { "invoke", "h450.ros.invoke",
603 FT_INT32
, BASE_DEC
, VALS(h450_ros_InvokeProblem_vals
), 0,
604 "InvokeProblem", HFILL
}},
605 { &hf_h450_ros_returnResultProblem
,
606 { "returnResult", "h450.ros.returnResult",
607 FT_INT32
, BASE_DEC
, VALS(h450_ros_ReturnResultProblem_vals
), 0,
608 "ReturnResultProblem", HFILL
}},
609 { &hf_h450_ros_returnErrorProblem
,
610 { "returnError", "h450.ros.returnError",
611 FT_INT32
, BASE_DEC
, VALS(h450_ros_ReturnErrorProblem_vals
), 0,
612 "ReturnErrorProblem", HFILL
}},
615 /* List of subtrees */
616 static int *ett
[] = {
619 &ett_h450_ros_Invoke
,
620 &ett_h450_ros_ReturnResult
,
621 &ett_h450_ros_T_result
,
622 &ett_h450_ros_ReturnError
,
623 &ett_h450_ros_Reject
,
624 &ett_h450_ros_T_problem
,
627 static ei_register_info ei
[] = {
628 { &ei_ros_undecoded
, { "h450.ros.undecoded", PI_UNDECODED
, PI_WARN
, "Undecoded", EXPFILL
}},
631 expert_module_t
* expert_h450_ros
;
633 /* Register protocol and dissector */
634 proto_h450_ros
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
635 proto_set_cant_toggle(proto_h450_ros
);
637 /* Register fields and subtrees */
638 proto_register_field_array(proto_h450_ros
, hf
, array_length(hf
));
639 proto_register_subtree_array(ett
, array_length(ett
));
640 expert_h450_ros
= expert_register_protocol(proto_h450_ros
);
641 expert_register_field_array(expert_h450_ros
, ei
, array_length(ei
));
644 /*--- proto_reg_handoff_h450_ros --------------------------------------------*/
645 void proto_reg_handoff_h450_ros(void) {
646 data_handle
= find_dissector("data");
649 /*---------------------------------------------------------------------------*/