forked from osmocom/wireshark
improvements in ROS handling in Q.932 and H.450
move common ROS code into ros/ros-*.cnf files svn path=/trunk/; revision=22936
This commit is contained in:
parent
b202080068
commit
138050c4ea
|
@ -605,4 +605,5 @@ FastStart/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
|
|||
ParallelH245Control/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
|
||||
H245Control/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
|
||||
GloballyUniqueID TYPE = FT_GUID DISPLAY = BASE_NONE
|
||||
H323-UU-PDU/h4501SupplementaryService/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
|
||||
#.END
|
||||
|
|
|
@ -15,8 +15,8 @@ generate_dissector: $(DISSECTOR_FILES)
|
|||
$(H450_FILES): ../../tools/asn2wrs.py $(H450_ASN) $(H450_OP_ASN) packet-h450-template.c h450.cnf
|
||||
python ../../tools/asn2wrs.py -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(H450_ASN) $(H450_OP_ASN)
|
||||
|
||||
$(H450_ROS_FILES): ../../tools/asn2wrs.py $(H450_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf
|
||||
python ../../tools/asn2wrs.py -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(H450_ROS_ASN)
|
||||
$(H450_ROS_FILES): ../../tools/asn2wrs.py $(H450_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf ../ros/ros-inv.cnf ../ros/ros-res.cnf ../ros/ros-err.cnf ../ros/ros-rej.cnf
|
||||
python ../../tools/asn2wrs.py -e -p $(PROTOCOL_NAME).ros -I ../ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(H450_ROS_ASN)
|
||||
clean:
|
||||
rm -f parsetab.py $(DISSECTOR_FILES)
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ $(H450_FILES): ../../tools/asn2wrs.py $(H450_ASN) $(H450_OP_ASN) packet-$(PROTOC
|
|||
@exit 1
|
||||
!ENDIF
|
||||
|
||||
$(H450_ROS_FILES): ../../tools/asn2wrs.py $(H450_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf
|
||||
$(H450_ROS_FILES): ../../tools/asn2wrs.py $(H450_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf ../ros/ros-inv.cnf ../ros/ros-res.cnf ../ros/ros-err.cnf ../ros/ros-rej.cnf
|
||||
!IFDEF PYTHON
|
||||
$(PYTHON) "../../tools/asn2wrs.py" -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(H450_ROS_ASN)
|
||||
$(PYTHON) "../../tools/asn2wrs.py" -e -p $(PROTOCOL_NAME).ros -I ../ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(H450_ROS_ASN)
|
||||
!ELSE
|
||||
@echo Error: You need Python to use asn2wrs.py
|
||||
@exit 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Do not modify this file.
|
||||
# It is created automatically by the ASN.1 to Wireshark dissector compiler
|
||||
# .\h450-ros-exp.cnf
|
||||
# ../../tools/asn2wrs.py -e -p h450.ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn
|
||||
# ./h450-ros-exp.cnf
|
||||
# ../../tools/asn2wrs.py -e -p h450.ros -I ../ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn
|
||||
|
||||
#.MODULE
|
||||
Remote-Operations-Information-Objects h450.ros
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,8 +14,8 @@ generate_dissector: $(DISSECTOR_FILES)
|
|||
$(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
|
||||
python ../../tools/asn2wrs.py -b -T -X -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(Q932_ASN)
|
||||
|
||||
$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(Q932_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf
|
||||
python ../../tools/asn2wrs.py -b -T -X -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(Q932_ROS_ASN)
|
||||
$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(Q932_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf ../ros/ros-inv.cnf ../ros/ros-res.cnf ../ros/ros-err.cnf ../ros/ros-rej.cnf
|
||||
python ../../tools/asn2wrs.py -b -T -X -e -p $(PROTOCOL_NAME).ros -I ../ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(Q932_ROS_ASN)
|
||||
|
||||
clean:
|
||||
rm -f parsetab.py $(DISSECTOR_FILES)
|
||||
|
|
|
@ -25,9 +25,9 @@ $(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-templa
|
|||
@exit 1
|
||||
!ENDIF
|
||||
|
||||
$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(Q932_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf
|
||||
$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(Q932_ROS_ASN) packet-$(PROTOCOL_NAME)-ros-template.c $(PROTOCOL_NAME)-ros.cnf ../ros/ros-inv.cnf ../ros/ros-res.cnf ../ros/ros-err.cnf ../ros/ros-rej.cnf
|
||||
!IFDEF PYTHON
|
||||
$(PYTHON) "../../tools/asn2wrs.py" -b -T -X -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(Q932_ROS_ASN)
|
||||
$(PYTHON) "../../tools/asn2wrs.py" -b -T -X -p $(PROTOCOL_NAME).ros -I ../ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(Q932_ROS_ASN)
|
||||
!ELSE
|
||||
@echo Error: You need Python to use asn2wrs.py
|
||||
@exit 1
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <epan/packet.h>
|
||||
#include <epan/prefs.h>
|
||||
#include <epan/strutil.h>
|
||||
#include <epan/emem.h>
|
||||
#include <epan/asn1.h>
|
||||
|
|
|
@ -74,37 +74,9 @@ Invoke/argument TYPE = FT_BYTES DISPLAY = BASE_HEX
|
|||
arg_next_tvb = tvb_new_subset(tvb, offset, len, len);
|
||||
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
|
||||
#.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, 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 ---
|
||||
|
||||
|
@ -121,36 +93,10 @@ ReturnResult/result/result TYPE = FT_BYTES DISPLAY = BASE_HEX
|
|||
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
|
||||
#.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);
|
||||
}
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
res_next_tvb = tvb_new_subset(tvb, offset, 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
|
||||
|
@ -166,41 +112,10 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_HEX
|
|||
err_next_tvb = tvb_new_subset(tvb, offset, len, len);
|
||||
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
|
||||
#.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, 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
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
# ros-err.cnf
|
||||
# ROS ReturnError common code
|
||||
# Copyright 2007 Tomas Kukosa
|
||||
# $Id$
|
||||
|
||||
#.FN_HDR ReturnError
|
||||
dissector_handle_t err_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
err_next_tvb = NULL;
|
||||
#.FN_FTR ReturnError
|
||||
actx->rose_ctx->d.pdu = 3;
|
||||
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) {
|
||||
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) && actx->rose_ctx->err_global_dissector_table) {
|
||||
err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
err_handle = NULL;
|
||||
}
|
||||
|
||||
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)
|
||||
descr = ep_strdup_printf("ERR: %d", actx->rose_ctx->d.code_local);
|
||||
else if (actx->rose_ctx->d.code == 1)
|
||||
descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("ERR:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!err_next_tvb) { /* empty error */
|
||||
err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree);
|
||||
#.END
|
|
@ -0,0 +1,45 @@
|
|||
# ros-inv.cnf
|
||||
# ROS Invoke common code
|
||||
# Copyright 2007 Tomas Kukosa
|
||||
# $Id$
|
||||
|
||||
|
||||
#.FN_HDR Invoke
|
||||
dissector_handle_t arg_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
arg_next_tvb = NULL;
|
||||
#.FN_FTR Invoke
|
||||
actx->rose_ctx->d.pdu = 1;
|
||||
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) {
|
||||
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) && actx->rose_ctx->arg_global_dissector_table) {
|
||||
arg_handle = dissector_get_string_handle(actx->rose_ctx->arg_global_dissector_table, actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
arg_handle = NULL;
|
||||
}
|
||||
|
||||
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)
|
||||
descr = ep_strdup_printf("INV: %d", actx->rose_ctx->d.code_local);
|
||||
else if (actx->rose_ctx->d.code == 1)
|
||||
descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("INV:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!arg_next_tvb) { /* empty argument */
|
||||
arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree);
|
||||
#.END
|
|
@ -0,0 +1,19 @@
|
|||
# ros-rej.cnf
|
||||
# ROS Reject common code
|
||||
# Copyright 2007 Tomas Kukosa
|
||||
# $Id$
|
||||
|
||||
#.FN_HDR Reject
|
||||
const gchar *descr = "";
|
||||
|
||||
problem_str[0] = '\0';
|
||||
#.FN_FTR Reject
|
||||
descr = ep_strdup_printf("REJ: %s", problem_str);
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
#.END
|
|
@ -0,0 +1,44 @@
|
|||
# ros-res.cnf
|
||||
# ROS ReturnResult common code
|
||||
# Copyright 2007 Tomas Kukosa
|
||||
# $Id$
|
||||
|
||||
#.FN_HDR ReturnResult
|
||||
dissector_handle_t res_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
res_next_tvb = NULL;
|
||||
#.FN_FTR ReturnResult
|
||||
actx->rose_ctx->d.pdu = 2;
|
||||
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) {
|
||||
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) && actx->rose_ctx->res_global_dissector_table) {
|
||||
res_handle = dissector_get_string_handle(actx->rose_ctx->res_global_dissector_table, actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
res_handle = NULL;
|
||||
}
|
||||
|
||||
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)
|
||||
descr = ep_strdup_printf("RES: %d", actx->rose_ctx->d.code_local);
|
||||
else if (actx->rose_ctx->d.code == 1)
|
||||
descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("RES:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree);
|
||||
#.END
|
|
@ -141,7 +141,11 @@ typedef struct _rose_ctx_t {
|
|||
dissector_table_t res_local_dissector_table;
|
||||
dissector_table_t err_global_dissector_table;
|
||||
dissector_table_t err_local_dissector_table;
|
||||
/* filling in description into tree, info column, any buffer */
|
||||
int apdu_depth;
|
||||
gboolean fillin_info;
|
||||
gchar *fillin_ptr;
|
||||
gsize fillin_buf_size;
|
||||
struct { /* "dynamic" data */
|
||||
gint pdu;
|
||||
/*
|
||||
|
|
|
@ -7505,7 +7505,7 @@ void proto_register_h225(void) {
|
|||
"h225.T_h4501SupplementaryService", HFILL }},
|
||||
{ &hf_h225_h4501SupplementaryService_item,
|
||||
{ "Item", "h225.h4501SupplementaryService_item",
|
||||
FT_BYTES, BASE_HEX, NULL, 0,
|
||||
FT_UINT32, BASE_DEC, NULL, 0,
|
||||
"h225.T_h4501SupplementaryService_item", HFILL }},
|
||||
{ &hf_h225_h245Tunneling,
|
||||
{ "h245Tunneling", "h225.h245Tunneling",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Do not modify this file. */
|
||||
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
|
||||
/* .\packet-h450-ros.c */
|
||||
/* ../../tools/asn2wrs.py -e -p h450.ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
|
||||
/* ./packet-h450-ros.c */
|
||||
/* ../../tools/asn2wrs.py -e -p h450.ros -I ../ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
|
||||
|
||||
/* Input file: packet-h450-ros-template.c */
|
||||
|
||||
|
@ -208,35 +208,45 @@ static const per_sequence_t Invoke_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 76 "h450-ros.cnf"
|
||||
#line 8 "ros-inv.cnf"
|
||||
dissector_handle_t arg_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
arg_next_tvb = NULL;
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_h450_ros_Invoke, Invoke_sequence);
|
||||
|
||||
#line 80 "h450-ros.cnf"
|
||||
#line 13 "ros-inv.cnf"
|
||||
actx->rose_ctx->d.pdu = 1;
|
||||
|
||||
if (actx->rose_ctx->d.code == 0) {
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) {
|
||||
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) {
|
||||
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->arg_global_dissector_table) {
|
||||
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);
|
||||
descr = ep_strdup_printf("INV: %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);
|
||||
descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("INV:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!arg_next_tvb) { /* empty argument */
|
||||
arg_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0);
|
||||
arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree);
|
||||
|
@ -277,37 +287,45 @@ static const per_sequence_t ReturnResult_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 116 "h450-ros.cnf"
|
||||
#line 7 "ros-res.cnf"
|
||||
dissector_handle_t res_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
res_next_tvb = NULL;
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_h450_ros_ReturnResult, ReturnResult_sequence);
|
||||
|
||||
#line 120 "h450-ros.cnf"
|
||||
#line 12 "ros-res.cnf"
|
||||
actx->rose_ctx->d.pdu = 2;
|
||||
|
||||
if (actx->rose_ctx->d.code == 0) {
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) {
|
||||
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) {
|
||||
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->res_global_dissector_table) {
|
||||
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);
|
||||
descr = ep_strdup_printf("RES: %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), " -");
|
||||
descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("RES:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
res_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0);
|
||||
res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree);
|
||||
|
@ -334,35 +352,45 @@ static const per_sequence_t ReturnError_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 157 "h450-ros.cnf"
|
||||
#line 7 "ros-err.cnf"
|
||||
dissector_handle_t err_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
err_next_tvb = NULL;
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_h450_ros_ReturnError, ReturnError_sequence);
|
||||
|
||||
#line 161 "h450-ros.cnf"
|
||||
#line 12 "ros-err.cnf"
|
||||
actx->rose_ctx->d.pdu = 3;
|
||||
|
||||
if (actx->rose_ctx->d.code == 0) {
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) {
|
||||
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) {
|
||||
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->err_global_dissector_table) {
|
||||
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);
|
||||
descr = ep_strdup_printf("ERR: %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);
|
||||
descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("ERR:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!err_next_tvb) { /* empty error */
|
||||
err_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0);
|
||||
err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree);
|
||||
|
@ -488,14 +516,23 @@ static const per_sequence_t Reject_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_h450_ros_Reject(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 189 "h450-ros.cnf"
|
||||
#line 7 "ros-rej.cnf"
|
||||
const gchar *descr = "";
|
||||
|
||||
problem_str[0] = '\0';
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_h450_ros_Reject, Reject_sequence);
|
||||
|
||||
#line 191 "h450-ros.cnf"
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " REJ: %s", problem_str);
|
||||
#line 11 "ros-rej.cnf"
|
||||
descr = ep_strdup_printf("REJ: %s", problem_str);
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Do not modify this file. */
|
||||
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
|
||||
/* .\packet-h450-ros.h */
|
||||
/* ../../tools/asn2wrs.py -e -p h450.ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
|
||||
/* ./packet-h450-ros.h */
|
||||
/* ../../tools/asn2wrs.py -e -p h450.ros -I ../ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
|
||||
|
||||
/* Input file: packet-h450-ros-template.h */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Do not modify this file. */
|
||||
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
|
||||
/* .\packet-h450.c */
|
||||
/* ./packet-h450.c */
|
||||
/* ../../tools/asn2wrs.py -c h450.cnf -s packet-h450-template H4501-Supplementary-ServiceAPDU-Structure.asn Addressing-Data-Elements.asn H225-generic-parameters-definition.asn Manufacturer-specific-service-extension-definition.asn H4501-General-Error-List.asn Call-Transfer-Operations.asn Call-Diversion-Operations.asn Call-Hold-Operations.asn Call-Park-Pickup-Operations.asn Call-Waiting-Operations.asn Message-Waiting-Indication-Operations.asn Name-Operations.asn Call-Completion-Operations.asn Call-Offer-Operations.asn Call-Intrusion-Operations.asn Common-Information-Operations.asn */
|
||||
|
||||
/* Input file: packet-h450-template.c */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Do not modify this file. */
|
||||
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
|
||||
/* ./packet-q932-ros.c */
|
||||
/* ../../tools/asn2wrs.py -b -T -X -e -p q932.ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template ../ros/Remote-Operations-Information-Objects.asn Facility-Information-Element-Components.asn */
|
||||
/* ../../tools/asn2wrs.py -b -T -X -p q932.ros -I ../ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template ../ros/Remote-Operations-Information-Objects.asn Facility-Information-Element-Components.asn */
|
||||
|
||||
/* Input file: packet-q932-ros-template.c */
|
||||
|
||||
|
@ -38,7 +38,6 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <epan/packet.h>
|
||||
#include <epan/prefs.h>
|
||||
#include <epan/strutil.h>
|
||||
#include <epan/emem.h>
|
||||
#include <epan/asn1.h>
|
||||
|
@ -80,7 +79,7 @@ static int hf_q932_ros_present = -1; /* INTEGER */
|
|||
static int hf_q932_ros_InvokeId_present = -1; /* InvokeId_present */
|
||||
|
||||
/*--- End of included file: packet-q932-ros-hf.c ---*/
|
||||
#line 47 "packet-q932-ros-template.c"
|
||||
#line 46 "packet-q932-ros-template.c"
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
|
||||
|
@ -98,7 +97,7 @@ static gint ett_q932_ros_T_problem = -1;
|
|||
static gint ett_q932_ros_InvokeId = -1;
|
||||
|
||||
/*--- End of included file: packet-q932-ros-ett.c ---*/
|
||||
#line 50 "packet-q932-ros-template.c"
|
||||
#line 49 "packet-q932-ros-template.c"
|
||||
|
||||
/* Preferences */
|
||||
|
||||
|
@ -257,7 +256,6 @@ dissect_q932_ros_InvokeArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
|
|||
offset += tvb_length_remaining(tvb, offset);
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -272,35 +270,45 @@ static const ber_sequence_t Invoke_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 79 "q932-ros.cnf"
|
||||
#line 8 "ros-inv.cnf"
|
||||
dissector_handle_t arg_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
arg_next_tvb = NULL;
|
||||
|
||||
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
|
||||
Invoke_sequence, hf_index, ett_q932_ros_Invoke);
|
||||
|
||||
#line 83 "q932-ros.cnf"
|
||||
#line 13 "ros-inv.cnf"
|
||||
actx->rose_ctx->d.pdu = 1;
|
||||
|
||||
if (actx->rose_ctx->d.code == 0) {
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) {
|
||||
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) {
|
||||
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->arg_global_dissector_table) {
|
||||
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);
|
||||
descr = ep_strdup_printf("INV: %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);
|
||||
descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("INV:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!arg_next_tvb) { /* empty argument */
|
||||
arg_next_tvb = tvb_new_subset(tvb, offset, 0, 0);
|
||||
arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree);
|
||||
|
@ -312,7 +320,7 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
|
|||
|
||||
static int
|
||||
dissect_q932_ros_ResultArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 115 "q932-ros.cnf"
|
||||
#line 87 "q932-ros.cnf"
|
||||
gint len;
|
||||
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
|
@ -351,35 +359,45 @@ static const ber_sequence_t ReturnResult_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 125 "q932-ros.cnf"
|
||||
#line 7 "ros-res.cnf"
|
||||
dissector_handle_t res_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
res_next_tvb = NULL;
|
||||
|
||||
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
|
||||
ReturnResult_sequence, hf_index, ett_q932_ros_ReturnResult);
|
||||
|
||||
#line 129 "q932-ros.cnf"
|
||||
#line 12 "ros-res.cnf"
|
||||
actx->rose_ctx->d.pdu = 2;
|
||||
|
||||
if (actx->rose_ctx->d.code == 0) {
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) {
|
||||
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) {
|
||||
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->res_global_dissector_table) {
|
||||
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);
|
||||
descr = ep_strdup_printf("RES: %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);
|
||||
descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("RES:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
res_next_tvb = tvb_new_subset(tvb, offset, 0, 0);
|
||||
res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree);
|
||||
|
@ -391,7 +409,7 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
|
||||
static int
|
||||
dissect_q932_ros_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 160 "q932-ros.cnf"
|
||||
#line 106 "q932-ros.cnf"
|
||||
|
||||
gint len;
|
||||
|
||||
|
@ -403,7 +421,6 @@ dissect_q932_ros_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
|
|||
offset += tvb_length_remaining(tvb, offset);
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -417,35 +434,45 @@ static const ber_sequence_t ReturnError_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 171 "q932-ros.cnf"
|
||||
#line 7 "ros-err.cnf"
|
||||
dissector_handle_t err_handle = NULL;
|
||||
const gchar *descr = "";
|
||||
|
||||
err_next_tvb = NULL;
|
||||
|
||||
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
|
||||
ReturnError_sequence, hf_index, ett_q932_ros_ReturnError);
|
||||
|
||||
#line 175 "q932-ros.cnf"
|
||||
#line 12 "ros-err.cnf"
|
||||
actx->rose_ctx->d.pdu = 3;
|
||||
|
||||
if (actx->rose_ctx->d.code == 0) {
|
||||
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) {
|
||||
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) {
|
||||
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->err_global_dissector_table) {
|
||||
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);
|
||||
descr = ep_strdup_printf("ERR: %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);
|
||||
descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global);
|
||||
} else {
|
||||
descr = ep_strdup_printf("ERR:");
|
||||
}
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!err_next_tvb) { /* empty error */
|
||||
err_next_tvb = tvb_new_subset(tvb, offset, 0, 0);
|
||||
err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
}
|
||||
actx->pinfo->private_data = actx->rose_ctx;
|
||||
call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree);
|
||||
|
@ -575,14 +602,23 @@ static const ber_sequence_t Reject_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_q932_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 203 "q932-ros.cnf"
|
||||
#line 7 "ros-rej.cnf"
|
||||
const gchar *descr = "";
|
||||
|
||||
problem_str[0] = '\0';
|
||||
|
||||
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
|
||||
Reject_sequence, hf_index, ett_q932_ros_Reject);
|
||||
|
||||
#line 205 "q932-ros.cnf"
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " REJ: %s", problem_str);
|
||||
#line 11 "ros-rej.cnf"
|
||||
descr = ep_strdup_printf("REJ: %s", problem_str);
|
||||
|
||||
if (actx->rose_ctx->apdu_depth >= 0)
|
||||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
|
||||
if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -630,7 +666,7 @@ static int dissect_ROS_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree
|
|||
|
||||
|
||||
/*--- End of included file: packet-q932-ros-fn.c ---*/
|
||||
#line 65 "packet-q932-ros-template.c"
|
||||
#line 64 "packet-q932-ros-template.c"
|
||||
|
||||
/*--- dissect_q932_ros -----------------------------------------------------*/
|
||||
static int dissect_q932_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
|
@ -745,7 +781,7 @@ void proto_register_q932_ros(void) {
|
|||
"q932_ros.InvokeId_present", HFILL }},
|
||||
|
||||
/*--- End of included file: packet-q932-ros-hfarr.c ---*/
|
||||
#line 79 "packet-q932-ros-template.c"
|
||||
#line 78 "packet-q932-ros-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -765,7 +801,7 @@ void proto_register_q932_ros(void) {
|
|||
&ett_q932_ros_InvokeId,
|
||||
|
||||
/*--- End of included file: packet-q932-ros-ettarr.c ---*/
|
||||
#line 84 "packet-q932-ros-template.c"
|
||||
#line 83 "packet-q932-ros-template.c"
|
||||
};
|
||||
|
||||
/* Register protocol and dissector */
|
||||
|
|
|
@ -725,6 +725,7 @@ report_open_failure
|
|||
report_read_failure
|
||||
reset_tap_listeners
|
||||
reset_tcp_reassembly
|
||||
rose_ctx_clean_data
|
||||
rose_ctx_init
|
||||
rpc_init_proc_table
|
||||
rpc_init_prog
|
||||
|
|
Loading…
Reference in New Issue