diff options
author | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-07-20 09:54:47 +0000 |
---|---|---|
committer | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-07-20 09:54:47 +0000 |
commit | f43d6a4ad269eb46d3a6af366e65ca939dac2d9f (patch) | |
tree | f8c4df9b93883649dc11f2339e7d8fff464faf56 /asn1/q932 | |
parent | 3a7da10ed9b15eecc198230e16d2e98fbceb8a47 (diff) |
QSIG fully implemented
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22361 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1/q932')
-rw-r--r-- | asn1/q932/packet-q932-template.c | 2 | ||||
-rw-r--r-- | asn1/q932/q932-ros.cnf | 27 |
2 files changed, 17 insertions, 12 deletions
diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c index 23c8c5c563..911f6935a7 100644 --- a/asn1/q932/packet-q932-template.c +++ b/asn1/q932/packet-q932-template.c @@ -319,6 +319,8 @@ void proto_register_q932(void) { q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE); q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); + q932_rose_ctx.err_global_dissector_table = register_dissector_table("q932.ros.global.err", "Q.932 Error (global opcode)", FT_STRING, BASE_NONE); + q932_rose_ctx.err_local_dissector_table = register_dissector_table("q932.ros.local.err", "Q.932 Error (local opcode)", FT_UINT32, BASE_HEX); } /*--- proto_reg_handoff_q932 ------------------------------------------------*/ diff --git a/asn1/q932/q932-ros.cnf b/asn1/q932/q932-ros.cnf index 8be1c247e9..bdf39ab616 100644 --- a/asn1/q932/q932-ros.cnf +++ b/asn1/q932/q932-ros.cnf @@ -98,10 +98,11 @@ Invoke/argument TYPE = FT_BYTES DISPLAY = BASE_HEX 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) { - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); + 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 @@ -143,10 +144,11 @@ ReturnResult/result/result TYPE = FT_BYTES DISPLAY = BASE_HEX 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) { - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); + 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 #--- RETURN ERROR --- @@ -161,7 +163,7 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_HEX len = tvb_length_remaining(tvb, offset); if (len) proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); - res_next_tvb = tvb_new_subset(tvb, offset, len, len); + err_next_tvb = tvb_new_subset(tvb, offset, len, len); offset += tvb_length_remaining(tvb, offset); @@ -173,9 +175,9 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_HEX 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);*/ + 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);*/ + err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global); } else { err_handle = NULL; } @@ -188,10 +190,11 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_HEX 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) { - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); + 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 #--- REJECT --- |