diff options
Diffstat (limited to 'asn1/h450/h450-ros.cnf')
-rw-r--r-- | asn1/h450/h450-ros.cnf | 99 |
1 files changed, 6 insertions, 93 deletions
diff --git a/asn1/h450/h450-ros.cnf b/asn1/h450/h450-ros.cnf index ce7f484676..9f7fd1963c 100644 --- a/asn1/h450/h450-ros.cnf +++ b/asn1/h450/h450-ros.cnf @@ -71,37 +71,9 @@ Invoke/argument TYPE = FT_BYTES DISPLAY = BASE_HEX #.FN_PARS Invoke/argument FN_VARIANT = _pdu TYPE_REF_FN = argument_cb - -#.FN_HDR Invoke - dissector_handle_t arg_handle = NULL; - - arg_next_tvb = NULL; -#.FN_FTR Invoke - actx->rose_ctx->d.pdu = 1; - - if (actx->rose_ctx->d.code == 0) { - arg_handle = dissector_get_port_handle(actx->rose_ctx->arg_local_dissector_table, actx->rose_ctx->d.code_local); - } else if (actx->rose_ctx->d.code == 1) { - arg_handle = dissector_get_string_handle(actx->rose_ctx->arg_global_dissector_table, actx->rose_ctx->d.code_global); - } else { - arg_handle = NULL; - } - - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " INV:"); - if (!arg_handle || - !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { - if (actx->rose_ctx->d.code == 0) - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local); - else if (actx->rose_ctx->d.code == 1) - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global); - } - if (!arg_next_tvb) { /* empty argument */ - arg_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0); - } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); #.END +#.INCLUDE ros-inv.cnf #--- RETURN RESULT --- @@ -112,38 +84,10 @@ ReturnResult/result/result TYPE = FT_BYTES DISPLAY = BASE_HEX FN_VARIANT = _pdu TYPE_REF_FN = result_cb -#.FN_HDR ReturnResult - dissector_handle_t res_handle = NULL; - - res_next_tvb = NULL; -#.FN_FTR ReturnResult - actx->rose_ctx->d.pdu = 2; - - if (actx->rose_ctx->d.code == 0) { - res_handle = dissector_get_port_handle(actx->rose_ctx->res_local_dissector_table, actx->rose_ctx->d.code_local); - } else if (actx->rose_ctx->d.code == 1) { - res_handle = dissector_get_string_handle(actx->rose_ctx->res_global_dissector_table, actx->rose_ctx->d.code_global); - } else { - res_handle = NULL; - } - - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " RES:"); - if (!res_handle || - !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { - if (actx->rose_ctx->d.code == 0) - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local); - else if (actx->rose_ctx->d.code == 1) - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global); - else if (actx->rose_ctx->d.code == -1) /* Code not available */ - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " -"); - } - if (!res_next_tvb) { /* empty result */ - res_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0); - } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); #.END +#.INCLUDE ros-res.cnf + #--- RETURN ERROR --- #.FIELD_ATTR @@ -152,41 +96,10 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_HEX #.FN_PARS ReturnError/parameter FN_VARIANT = _pdu TYPE_REF_FN = error_cb - -#.FN_HDR ReturnError - dissector_handle_t err_handle = NULL; - - err_next_tvb = NULL; -#.FN_FTR ReturnError - actx->rose_ctx->d.pdu = 3; - - if (actx->rose_ctx->d.code == 0) { - err_handle = dissector_get_port_handle(actx->rose_ctx->err_local_dissector_table, actx->rose_ctx->d.code_local); - } else if (actx->rose_ctx->d.code == 1) { - err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global); - } else { - err_handle = NULL; - } - - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " ERR:"); - if (!err_handle || - !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { - if (actx->rose_ctx->d.code == 0) - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local); - else if (actx->rose_ctx->d.code == 1) - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global); - } - if (!err_next_tvb) { /* empty error */ - err_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0); - } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); #.END +#.INCLUDE ros-err.cnf + #--- REJECT --- -#.FN_HDR Reject - problem_str[0] = '\0'; -#.FN_FTR Reject - proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " REJ: %s", problem_str); -#.END +#.INCLUDE ros-rej.cnf |