diff options
author | gal <graeme.lunt@smhs.co.uk> | 2015-02-03 15:55:05 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-02-04 12:34:15 +0000 |
commit | 0a6d1f9821b0d5c0de789f5d70bc58a8ead1cd9a (patch) | |
tree | 862b0df7c70c9a376a131ea412434222df7f4e78 | |
parent | 987518153bfdce82b314c1d931104c5e8a24850c (diff) | |
download | wireshark-0a6d1f9821b0d5c0de789f5d70bc58a8ead1cd9a.tar.gz wireshark-0a6d1f9821b0d5c0de789f5d70bc58a8ead1cd9a.tar.bz2 wireshark-0a6d1f9821b0d5c0de789f5d70bc58a8ead1cd9a.zip |
Support for P3 over RTSE.
Resolve mixed space/tab issue in the RTSE and BER dissectors and included modelines in both templates.
Change-Id: I4b75bad94ed111d0faee205e026b2322b7dafbd1
Reviewed-on: https://code.wireshark.org/review/6932
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | asn1/p1/packet-p1-template.c | 282 | ||||
-rw-r--r-- | asn1/rtse/packet-rtse-template.c | 354 | ||||
-rw-r--r-- | epan/dissectors/packet-ber.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-p1.c | 273 | ||||
-rw-r--r-- | epan/dissectors/packet-rtse.c | 360 |
5 files changed, 675 insertions, 599 deletions
diff --git a/asn1/p1/packet-p1-template.c b/asn1/p1/packet-p1-template.c index 8b41a55b97..49b4fee2dc 100644 --- a/asn1/p1/packet-p1-template.c +++ b/asn1/p1/packet-p1-template.c @@ -87,62 +87,62 @@ static dissector_table_t p1_tokendata_dissector_table; #include "packet-p1-table.c" /* operation and error codes */ typedef struct p1_address_ctx { - gboolean do_address; - const char *content_type_id; - gboolean report_unknown_content_type; - wmem_strbuf_t* oraddress; + gboolean do_address; + const char *content_type_id; + gboolean report_unknown_content_type; + wmem_strbuf_t* oraddress; } p1_address_ctx_t; static void set_do_address(asn1_ctx_t* actx, gboolean do_address) { - p1_address_ctx_t* ctx; + p1_address_ctx_t* ctx; - if (actx->subtree.tree_ctx == NULL) { - actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); - } + if (actx->subtree.tree_ctx == NULL) { + actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); + } - ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - ctx->do_address = do_address; + ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + ctx->do_address = do_address; } static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx) { - p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - if (ctx && ctx->do_address) { - if (addr) { - wmem_strbuf_append(ctx->oraddress, addr); - } - if (tvb_string) { - wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); - } - } + if (ctx && ctx->do_address) { + if (addr) { + wmem_strbuf_append(ctx->oraddress, addr); + } + if (tvb_string) { + wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); + } + } } static void do_address_str(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx) { - wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; - p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; + p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - do_address(addr, tvb_string, actx); + do_address(addr, tvb_string, actx); - if (ctx && ctx->do_address && ddatype && tvb_string) - wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); + if (ctx && ctx->do_address && ddatype && tvb_string) + wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); } static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx, proto_tree* tree) { - wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; - p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; + p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - do_address(addr, tvb_string, actx); + do_address(addr, tvb_string, actx); - if (ctx && ctx->do_address && tvb_string && ddatype) { - if (wmem_strbuf_get_len(ddatype) > 0) { - proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); - } - } + if (ctx && ctx->do_address && tvb_string && ddatype) { + if (wmem_strbuf_get_len(ddatype) > 0) { + proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); + } + } } #include "packet-p1-fn.c" @@ -162,32 +162,32 @@ static const ros_info_t p3_ros_info = { void p1_initialize_content_globals (asn1_ctx_t* actx, proto_tree *tree, gboolean report_unknown_cont_type) { - p1_address_ctx_t* ctx; + p1_address_ctx_t* ctx; - if (actx->subtree.tree_ctx == NULL) { - actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); - } + if (actx->subtree.tree_ctx == NULL) { + actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); + } - ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - actx->subtree.top_tree = tree; - actx->external.direct_reference = NULL; - ctx->content_type_id = NULL; - ctx->report_unknown_content_type = report_unknown_cont_type; + actx->subtree.top_tree = tree; + actx->external.direct_reference = NULL; + ctx->content_type_id = NULL; + ctx->report_unknown_content_type = report_unknown_cont_type; } const char* p1_get_last_oraddress (asn1_ctx_t* actx) { - p1_address_ctx_t* ctx; + p1_address_ctx_t* ctx; - if ((actx == NULL) || (actx->subtree.tree_ctx == NULL)) - return ""; + if ((actx == NULL) || (actx->subtree.tree_ctx == NULL)) + return ""; - ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - if (wmem_strbuf_get_len(ctx->oraddress) <= 0) - return ""; + ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + if (wmem_strbuf_get_len(ctx->oraddress) <= 0) + return ""; - return wmem_strbuf_get_str(ctx->oraddress); + return wmem_strbuf_get_str(ctx->oraddress); } /* @@ -196,24 +196,24 @@ const char* p1_get_last_oraddress (asn1_ctx_t* actx) void dissect_p1_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) { - proto_item *item=NULL; - proto_tree *tree=NULL; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + proto_item *item=NULL; + proto_tree *tree=NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - /* save parent_tree so subdissectors can create new top nodes */ - p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); + /* save parent_tree so subdissectors can create new top nodes */ + p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); - if(parent_tree){ - item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_p1); - } + if(parent_tree){ + item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_p1); + } - col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); - col_set_str(pinfo->cinfo, COL_INFO, "Transfer"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); + col_set_str(pinfo->cinfo, COL_INFO, "Transfer"); - dissect_p1_MTS_APDU (FALSE, tvb, 0, &asn1_ctx, tree, hf_p1_MTS_APDU_PDU); - p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); + dissect_p1_MTS_APDU (FALSE, tvb, 0, &asn1_ctx, tree, hf_p1_MTS_APDU_PDU); + p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); } /* @@ -222,74 +222,76 @@ dissect_p1_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) static int dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { - int offset = 0; - int old_offset; - proto_item *item; - proto_tree *tree; - struct SESSION_DATA_STRUCTURE* session; - int (*p1_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) = NULL; - const char *p1_op_name; - int hf_p1_index = -1; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - /* do we have operation information from the ROS dissector? */ - if (data == NULL) - return 0; - session = (struct SESSION_DATA_STRUCTURE*)data; - - /* save parent_tree so subdissectors can create new top nodes */ - p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); - - asn1_ctx.private_data = session; - - item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_p1); - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); - col_clear(pinfo->cinfo, COL_INFO); - - switch(session->ros_op & ROS_OP_MASK) { - case (ROS_OP_BIND | ROS_OP_ARGUMENT): /* BindInvoke */ - p1_dissector = dissect_p1_MTABindArgument; - p1_op_name = "Bind-Argument"; - hf_p1_index = hf_p1_MTABindArgument_PDU; - break; - case (ROS_OP_BIND | ROS_OP_RESULT): /* BindResult */ - p1_dissector = dissect_p1_MTABindResult; - p1_op_name = "Bind-Result"; - hf_p1_index = hf_p1_MTABindResult_PDU; - break; - case (ROS_OP_BIND | ROS_OP_ERROR): /* BindError */ - p1_dissector = dissect_p1_MTABindError; - p1_op_name = "Bind-Error"; - hf_p1_index = hf_p1_MTABindError_PDU; - break; - case (ROS_OP_INVOKE | ROS_OP_ARGUMENT): /* Invoke Argument */ - p1_dissector = dissect_p1_MTS_APDU; - p1_op_name = "Transfer"; - hf_p1_index = hf_p1_MTS_APDU_PDU; - break; - default: - proto_tree_add_expert(tree, pinfo, &ei_p1_unsupported_pdu, tvb, offset, -1); - return tvb_captured_length(tvb); - } - - col_set_str(pinfo->cinfo, COL_INFO, p1_op_name); - - while (tvb_reported_length_remaining(tvb, offset) > 0){ - old_offset=offset; - offset=(*p1_dissector)(FALSE, tvb, offset, &asn1_ctx , tree, hf_p1_index); - if(offset == old_offset){ - proto_tree_add_expert(tree, pinfo, &ei_p1_zero_pdu, tvb, offset, -1); - break; - } - } - p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); - return tvb_captured_length(tvb); + int offset = 0; + int old_offset; + proto_item *item; + proto_tree *tree; + struct SESSION_DATA_STRUCTURE* session; + int (*p1_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) = NULL; + const char *p1_op_name; + int hf_p1_index = -1; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + + /* do we have operation information from the ROS dissector? */ + if (data == NULL) + return 0; + session = (struct SESSION_DATA_STRUCTURE*)data; + + /* save parent_tree so subdissectors can create new top nodes */ + p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); + + asn1_ctx.private_data = session; + + item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_p1); + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); + col_clear(pinfo->cinfo, COL_INFO); + + switch(session->ros_op & ROS_OP_MASK) { + case (ROS_OP_BIND | ROS_OP_ARGUMENT): /* BindInvoke */ + p1_dissector = dissect_p1_MTABindArgument; + p1_op_name = "Bind-Argument"; + hf_p1_index = hf_p1_MTABindArgument_PDU; + break; + case (ROS_OP_BIND | ROS_OP_RESULT): /* BindResult */ + p1_dissector = dissect_p1_MTABindResult; + p1_op_name = "Bind-Result"; + hf_p1_index = hf_p1_MTABindResult_PDU; + break; + case (ROS_OP_BIND | ROS_OP_ERROR): /* BindError */ + p1_dissector = dissect_p1_MTABindError; + p1_op_name = "Bind-Error"; + hf_p1_index = hf_p1_MTABindError_PDU; + break; + case (ROS_OP_INVOKE | ROS_OP_ARGUMENT): /* Invoke Argument */ + p1_dissector = dissect_p1_MTS_APDU; + p1_op_name = "Transfer"; + hf_p1_index = hf_p1_MTS_APDU_PDU; + break; + default: + proto_tree_add_expert(tree, pinfo, &ei_p1_unsupported_pdu, tvb, offset, -1); + return tvb_captured_length(tvb); + } + + col_set_str(pinfo->cinfo, COL_INFO, p1_op_name); + + while (tvb_reported_length_remaining(tvb, offset) > 0){ + old_offset=offset; + offset=(*p1_dissector)(FALSE, tvb, offset, &asn1_ctx , tree, hf_p1_index); + if(offset == old_offset){ + proto_tree_add_expert(tree, pinfo, &ei_p1_zero_pdu, tvb, offset, -1); + break; + } + } + p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); + return tvb_captured_length(tvb); } + + /*--- proto_register_p1 -------------------------------------------*/ void proto_register_p1(void) { @@ -363,9 +365,9 @@ void proto_register_p1(void) { p1_module = prefs_register_protocol_subtree("OSI/X.400", proto_p1, prefs_register_p1); prefs_register_uint_preference(p1_module, "tcp.port", "P1 TCP Port", - "Set the port for P1 operations (if other" - " than the default of 102)", - 10, &global_p1_tcp_port); + "Set the port for P1 operations (if other" + " than the default of 102)", + 10, &global_p1_tcp_port); register_ber_syntax_dissector("P1 Message", proto_p1, dissect_p1_mts_apdu); #include "packet-p1-syn-reg.c" @@ -388,9 +390,14 @@ void proto_reg_handoff_p1(void) { register_rtse_oid_dissector_handle("2.6.0.2.12", p1_handle, 0, "id-as-mta-rtse", TRUE); register_rtse_oid_dissector_handle("2.6.0.2.7", p1_handle, 0, "id-as-mtse", FALSE); + register_rtse_oid_dissector_handle("applicationProtocol.1", p1_handle, 0, "mts-transfer-protocol-1984", FALSE); register_rtse_oid_dissector_handle("applicationProtocol.12", p1_handle, 0, "mta-transfer-protocol", FALSE); + /* the ROS dissector will use the registered P3 ros info */ + register_rtse_oid_dissector_handle(id_as_mts_rtse, NULL, 0, "id-as-mts-rtse", TRUE); + register_rtse_oid_dissector_handle(id_as_msse, NULL, 0, "id-as-msse", TRUE); + /* remember the tpkt handler for change in preferences */ tpkt_handle = find_dissector("tpkt"); @@ -403,6 +410,7 @@ void proto_reg_handoff_p1(void) { /* Register P3 with ROS */ + register_ros_protocol_info(id_as_msse, &p3_ros_info, 0, "id-as-msse", FALSE); register_ros_protocol_info(id_as_mdse_88, &p3_ros_info, 0, "id-as-mdse-88", FALSE); @@ -412,6 +420,7 @@ void proto_reg_handoff_p1(void) { register_ros_protocol_info(id_as_mase_94, &p3_ros_info, 0, "id-as-mase-94", FALSE); register_ros_protocol_info(id_as_mts, &p3_ros_info, 0, "id-as-mts", FALSE); + register_ros_protocol_info(id_as_mts_rtse, &p3_ros_info, 0, "id-as-mts-rtse", TRUE); } @@ -432,3 +441,16 @@ prefs_register_p1(void) dissector_add_uint("tcp.port", tcp_port, tpkt_handle); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c index ef81ed0410..1ec56ca684 100644 --- a/asn1/rtse/packet-rtse-template.c +++ b/asn1/rtse/packet-rtse-template.c @@ -85,26 +85,26 @@ static gint ett_rtse_fragment = -1; static gint ett_rtse_fragments = -1; static const fragment_items rtse_frag_items = { - /* Fragment subtrees */ - &ett_rtse_fragment, - &ett_rtse_fragments, - /* Fragment fields */ - &hf_rtse_fragments, - &hf_rtse_fragment, - &hf_rtse_fragment_overlap, - &hf_rtse_fragment_overlap_conflicts, - &hf_rtse_fragment_multiple_tails, - &hf_rtse_fragment_too_long_fragment, - &hf_rtse_fragment_error, - &hf_rtse_fragment_count, - /* Reassembled in field */ - &hf_rtse_reassembled_in, - /* Reassembled length field */ - &hf_rtse_reassembled_length, - /* Reassembled data field */ - NULL, - /* Tag */ - "RTSE fragments" + /* Fragment subtrees */ + &ett_rtse_fragment, + &ett_rtse_fragments, + /* Fragment fields */ + &hf_rtse_fragments, + &hf_rtse_fragment, + &hf_rtse_fragment_overlap, + &hf_rtse_fragment_overlap_conflicts, + &hf_rtse_fragment_multiple_tails, + &hf_rtse_fragment_too_long_fragment, + &hf_rtse_fragment_error, + &hf_rtse_fragment_count, + /* Reassembled in field */ + &hf_rtse_reassembled_in, + /* Reassembled length field */ + &hf_rtse_reassembled_length, + /* Reassembled data field */ + NULL, + /* Tag */ + "RTSE fragments" }; void @@ -131,7 +131,8 @@ register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector dissector_add_string("rtse.oid", oid, ros_handle); /* and then tell ROS how to dissect the AS*/ - register_ros_oid_dissector_handle(oid, dissector, proto, name, TRUE); + if(dissector != NULL) + register_ros_oid_dissector_handle(oid, dissector, proto, name, TRUE); } else { /* otherwise we just remember how to dissect the AS */ @@ -142,43 +143,47 @@ register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector static int call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data) { - tvbuff_t *next_tvb; - int len; + tvbuff_t *next_tvb; + int len; - next_tvb = tvb_new_subset_remaining(tvb, offset); + next_tvb = tvb_new_subset_remaining(tvb, offset); - if((len = dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)) == 0) { - proto_item *item; - proto_tree *next_tree; + if((len = dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)) == 0) { + proto_item *item; + proto_tree *next_tree; - next_tree = proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_rtse_unknown, &item, - "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); + next_tree = proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_rtse_unknown, &item, + "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); - expert_add_info_format(pinfo, item, &ei_rtse_dissector_oid_not_implemented, + expert_add_info_format(pinfo, item, &ei_rtse_dissector_oid_not_implemented, "RTSE: Dissector for OID %s not implemented", oid); - len = dissect_unknown_ber(pinfo, next_tvb, offset, next_tree); - } + len = dissect_unknown_ber(pinfo, next_tvb, offset, next_tree); + } - offset += len; + offset += len; - return offset; + return offset; } static int call_rtse_external_type_callback(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { - const char *oid = NULL; + const char *oid = NULL; if (actx->external.indirect_ref_present) { - oid = (const char *)find_oid_by_pres_ctx_id(actx->pinfo, actx->external.indirect_reference); - } else if (actx->external.direct_ref_present) { - oid = actx->external.direct_reference; - } - if (oid) + oid = (const char *)find_oid_by_pres_ctx_id(actx->pinfo, actx->external.indirect_reference); + + if(!oid) + proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "Unable to determine abstract syntax for indirect reference: %d.", actx->external.indirect_reference); + } else if (actx->external.direct_ref_present) { + oid = actx->external.direct_reference; + } + + if (oid) offset = call_rtse_oid_callback(oid, tvb, offset, actx->pinfo, top_tree ? top_tree : tree, actx->private_data); - return offset; + return offset; } #include "packet-rtse-fn.c" @@ -189,119 +194,119 @@ call_rtse_external_type_callback(gboolean implicit_tag _U_, tvbuff_t *tvb, int o static int dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { - int offset = 0; - int old_offset; - proto_item *item; - proto_tree *tree; - proto_tree *next_tree=NULL; - tvbuff_t *next_tvb = NULL; - tvbuff_t *data_tvb = NULL; - fragment_head *frag_msg = NULL; - guint32 fragment_length; - guint32 rtse_id = 0; - gboolean data_handled = FALSE; - struct SESSION_DATA_STRUCTURE* session; - conversation_t *conversation = NULL; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - /* do we have application context from the acse dissector? */ - if (data == NULL) - return 0; - session = (struct SESSION_DATA_STRUCTURE*)data; - - /* save parent_tree so subdissectors can create new top nodes */ - top_tree=parent_tree; - - asn1_ctx.private_data = session; - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTSE"); - col_clear(pinfo->cinfo, COL_INFO); - - if (rtse_reassemble && - ((session->spdu_type == SES_DATA_TRANSFER) || - (session->spdu_type == SES_MAJOR_SYNC_POINT))) { - /* Use conversation index as fragment id */ - conversation = find_conversation (pinfo->fd->num, - &pinfo->src, &pinfo->dst, pinfo->ptype, - pinfo->srcport, pinfo->destport, 0); - if (conversation != NULL) { - rtse_id = conversation->index; - } - session->rtse_reassemble = TRUE; - } - if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { - frag_msg = fragment_end_seq_next (&rtse_reassembly_table, - pinfo, rtse_id, NULL); - next_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled RTSE", - frag_msg, &rtse_frag_items, NULL, parent_tree); - } - - item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_rtse); - - if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) { - /* strip off the OCTET STRING encoding - including any CONSTRUCTED OCTET STRING */ - dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hf_rtse_segment_data, &data_tvb); - - if (data_tvb) { - fragment_length = tvb_captured_length_remaining (data_tvb, 0); - proto_item_append_text(asn1_ctx.created_item, " (%u byte%s)", fragment_length, - plurality(fragment_length, "", "s")); - frag_msg = fragment_add_seq_next (&rtse_reassembly_table, - data_tvb, 0, pinfo, - rtse_id, NULL, - fragment_length, TRUE); - if (frag_msg && pinfo->fd->num != frag_msg->reassembled_in) { - /* Add a "Reassembled in" link if not reassembled in this frame */ - proto_tree_add_uint (tree, *(rtse_frag_items.hf_reassembled_in), - data_tvb, 0, 0, frag_msg->reassembled_in); - } - pinfo->fragmented = TRUE; - data_handled = TRUE; - } else { - fragment_length = tvb_captured_length_remaining (tvb, offset); - } - - col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", - fragment_length, plurality(fragment_length, "", "s")); - } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { - if (next_tvb) { - /* ROS won't do this for us */ - session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT); - /*offset=*/dissect_ber_external_type(FALSE, tree, next_tvb, 0, &asn1_ctx, -1, call_rtse_external_type_callback); - top_tree = NULL; - /* Return other than 0 to indicate that we handled this packet */ - return 1; - } else { - offset = tvb_captured_length (tvb); - } - pinfo->fragmented = FALSE; - data_handled = TRUE; - } - - if (!data_handled) { - while (tvb_reported_length_remaining(tvb, offset) > 0){ - old_offset=offset; - offset=dissect_rtse_RTSE_apdus(TRUE, tvb, offset, &asn1_ctx, tree, -1); - if(offset == old_offset){ - next_tree = proto_tree_add_subtree(tree, tvb, offset, -1, - ett_rtse_unknown, &item, "Unknown RTSE PDU"); - expert_add_info (pinfo, item, &ei_rtse_unknown_rtse_pdu); - dissect_unknown_ber(pinfo, tvb, offset, next_tree); - break; - } - } - } - - top_tree = NULL; - return tvb_captured_length(tvb); + int offset = 0; + int old_offset; + proto_item *item; + proto_tree *tree; + proto_tree *next_tree=NULL; + tvbuff_t *next_tvb = NULL; + tvbuff_t *data_tvb = NULL; + fragment_head *frag_msg = NULL; + guint32 fragment_length; + guint32 rtse_id = 0; + gboolean data_handled = FALSE; + struct SESSION_DATA_STRUCTURE* session; + conversation_t *conversation = NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + + /* do we have application context from the acse dissector? */ + if (data == NULL) + return 0; + session = (struct SESSION_DATA_STRUCTURE*)data; + + /* save parent_tree so subdissectors can create new top nodes */ + top_tree=parent_tree; + + asn1_ctx.private_data = session; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTSE"); + col_clear(pinfo->cinfo, COL_INFO); + + if (rtse_reassemble && + ((session->spdu_type == SES_DATA_TRANSFER) || + (session->spdu_type == SES_MAJOR_SYNC_POINT))) { + /* Use conversation index as fragment id */ + conversation = find_conversation (pinfo->fd->num, + &pinfo->src, &pinfo->dst, pinfo->ptype, + pinfo->srcport, pinfo->destport, 0); + if (conversation != NULL) { + rtse_id = conversation->index; + } + session->rtse_reassemble = TRUE; + } + if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { + frag_msg = fragment_end_seq_next (&rtse_reassembly_table, + pinfo, rtse_id, NULL); + next_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled RTSE", + frag_msg, &rtse_frag_items, NULL, parent_tree); + } + + item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_rtse); + + if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) { + /* strip off the OCTET STRING encoding - including any CONSTRUCTED OCTET STRING */ + dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hf_rtse_segment_data, &data_tvb); + + if (data_tvb) { + fragment_length = tvb_captured_length_remaining (data_tvb, 0); + proto_item_append_text(asn1_ctx.created_item, " (%u byte%s)", fragment_length, + plurality(fragment_length, "", "s")); + frag_msg = fragment_add_seq_next (&rtse_reassembly_table, + data_tvb, 0, pinfo, + rtse_id, NULL, + fragment_length, TRUE); + if (frag_msg && pinfo->fd->num != frag_msg->reassembled_in) { + /* Add a "Reassembled in" link if not reassembled in this frame */ + proto_tree_add_uint (tree, *(rtse_frag_items.hf_reassembled_in), + data_tvb, 0, 0, frag_msg->reassembled_in); + } + pinfo->fragmented = TRUE; + data_handled = TRUE; + } else { + fragment_length = tvb_captured_length_remaining (tvb, offset); + } + + col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", + fragment_length, plurality(fragment_length, "", "s")); + } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { + if (next_tvb) { + /* ROS won't do this for us */ + session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT); + /*offset=*/dissect_ber_external_type(FALSE, tree, next_tvb, 0, &asn1_ctx, -1, call_rtse_external_type_callback); + top_tree = NULL; + /* Return other than 0 to indicate that we handled this packet */ + return 1; + } else { + offset = tvb_captured_length (tvb); + } + pinfo->fragmented = FALSE; + data_handled = TRUE; + } + + if (!data_handled) { + while (tvb_reported_length_remaining(tvb, offset) > 0){ + old_offset=offset; + offset=dissect_rtse_RTSE_apdus(TRUE, tvb, offset, &asn1_ctx, tree, -1); + if(offset == old_offset){ + next_tree = proto_tree_add_subtree(tree, tvb, offset, -1, + ett_rtse_unknown, &item, "Unknown RTSE PDU"); + expert_add_info (pinfo, item, &ei_rtse_unknown_rtse_pdu); + dissect_unknown_ber(pinfo, tvb, offset, next_tree); + break; + } + } + } + + top_tree = NULL; + return tvb_captured_length(tvb); } static void rtse_reassemble_init (void) { - reassembly_table_init (&rtse_reassembly_table, - &addresses_reassembly_table_functions); + reassembly_table_init (&rtse_reassembly_table, + &addresses_reassembly_table_functions); } /*--- proto_register_rtse -------------------------------------------*/ @@ -313,39 +318,39 @@ void proto_register_rtse(void) { /* Fragment entries */ { &hf_rtse_segment_data, { "RTSE segment data", "rtse.segment", FT_NONE, BASE_NONE, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragments, { "RTSE fragments", "rtse.fragments", FT_NONE, BASE_NONE, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment, { "RTSE fragment", "rtse.fragment", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment_overlap, { "RTSE fragment overlap", "rtse.fragment.overlap", FT_BOOLEAN, - BASE_NONE, NULL, 0x0, NULL, HFILL } }, + BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_overlap_conflicts, { "RTSE fragment overlapping with conflicting data", - "rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL } }, + "rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_multiple_tails, { "RTSE has multiple tail fragments", - "rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL } }, + "rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_too_long_fragment, { "RTSE fragment too long", "rtse.fragment.too_long_fragment", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_error, { "RTSE defragmentation error", "rtse.fragment.error", FT_FRAMENUM, - BASE_NONE, NULL, 0x00, NULL, HFILL } }, + BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment_count, { "RTSE fragment count", "rtse.fragment.count", FT_UINT32, BASE_DEC, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_reassembled_in, { "Reassembled RTSE in frame", "rtse.reassembled.in", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } }, + NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } }, { &hf_rtse_reassembled_length, { "Reassembled RTSE length", "rtse.reassembled.length", FT_UINT32, BASE_DEC, - NULL, 0x00, "The total length of the reassembled payload", HFILL } }, + NULL, 0x00, "The total length of the reassembled payload", HFILL } }, #include "packet-rtse-hfarr.c" }; @@ -379,11 +384,11 @@ void proto_register_rtse(void) { rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL); prefs_register_bool_preference(rtse_module, "reassemble", - "Reassemble segmented RTSE datagrams", - "Whether segmented RTSE datagrams should be reassembled." - " To use this option, you must also enable" - " \"Allow subdissectors to reassemble TCP streams\"" - " in the TCP protocol settings.", &rtse_reassemble); + "Reassemble segmented RTSE datagrams", + "Whether segmented RTSE datagrams should be reassembled." + " To use this option, you must also enable" + " \"Allow subdissectors to reassemble TCP streams\"" + " in the TCP protocol settings.", &rtse_reassemble); rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE); oid_table=g_hash_table_new(g_str_hash, g_str_equal); @@ -397,3 +402,16 @@ void proto_reg_handoff_rtse(void) { } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index 09679f238f..7869e00d03 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -4164,6 +4164,11 @@ dissect_ber_external_U(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ct { offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, external_U_sequence, hf_index, ett_ber_EXTERNAL); + + if (actx->external.u.ber.ber_callback) { + offset = actx->external.u.ber.ber_callback(FALSE, tvb, offset, actx, tree, hf_index); + } + return offset; } diff --git a/epan/dissectors/packet-p1.c b/epan/dissectors/packet-p1.c index 38c32c694b..17bec5c4b8 100644 --- a/epan/dissectors/packet-p1.c +++ b/epan/dissectors/packet-p1.c @@ -895,62 +895,62 @@ static const value_string p3_err_code_string_vals[] = { #line 88 "../../asn1/p1/packet-p1-template.c" typedef struct p1_address_ctx { - gboolean do_address; - const char *content_type_id; - gboolean report_unknown_content_type; - wmem_strbuf_t* oraddress; + gboolean do_address; + const char *content_type_id; + gboolean report_unknown_content_type; + wmem_strbuf_t* oraddress; } p1_address_ctx_t; static void set_do_address(asn1_ctx_t* actx, gboolean do_address) { - p1_address_ctx_t* ctx; + p1_address_ctx_t* ctx; - if (actx->subtree.tree_ctx == NULL) { - actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); - } + if (actx->subtree.tree_ctx == NULL) { + actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); + } - ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - ctx->do_address = do_address; + ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + ctx->do_address = do_address; } static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx) { - p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - if (ctx && ctx->do_address) { - if (addr) { - wmem_strbuf_append(ctx->oraddress, addr); - } - if (tvb_string) { - wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); - } - } + if (ctx && ctx->do_address) { + if (addr) { + wmem_strbuf_append(ctx->oraddress, addr); + } + if (tvb_string) { + wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); + } + } } static void do_address_str(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx) { - wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; - p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; + p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - do_address(addr, tvb_string, actx); + do_address(addr, tvb_string, actx); - if (ctx && ctx->do_address && ddatype && tvb_string) - wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); + if (ctx && ctx->do_address && ddatype && tvb_string) + wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); } static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx, proto_tree* tree) { - wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; - p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr; + p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - do_address(addr, tvb_string, actx); + do_address(addr, tvb_string, actx); - if (ctx && ctx->do_address && tvb_string && ddatype) { - if (wmem_strbuf_get_len(ddatype) > 0) { - proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); - } - } + if (ctx && ctx->do_address && tvb_string && ddatype) { + if (wmem_strbuf_get_len(ddatype) > 0) { + proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string))); + } + } } @@ -8509,32 +8509,32 @@ static const ros_info_t p3_ros_info = { void p1_initialize_content_globals (asn1_ctx_t* actx, proto_tree *tree, gboolean report_unknown_cont_type) { - p1_address_ctx_t* ctx; + p1_address_ctx_t* ctx; - if (actx->subtree.tree_ctx == NULL) { - actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); - } + if (actx->subtree.tree_ctx == NULL) { + actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t); + } - ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - actx->subtree.top_tree = tree; - actx->external.direct_reference = NULL; - ctx->content_type_id = NULL; - ctx->report_unknown_content_type = report_unknown_cont_type; + actx->subtree.top_tree = tree; + actx->external.direct_reference = NULL; + ctx->content_type_id = NULL; + ctx->report_unknown_content_type = report_unknown_cont_type; } const char* p1_get_last_oraddress (asn1_ctx_t* actx) { - p1_address_ctx_t* ctx; + p1_address_ctx_t* ctx; - if ((actx == NULL) || (actx->subtree.tree_ctx == NULL)) - return ""; + if ((actx == NULL) || (actx->subtree.tree_ctx == NULL)) + return ""; - ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; - if (wmem_strbuf_get_len(ctx->oraddress) <= 0) - return ""; + ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx; + if (wmem_strbuf_get_len(ctx->oraddress) <= 0) + return ""; - return wmem_strbuf_get_str(ctx->oraddress); + return wmem_strbuf_get_str(ctx->oraddress); } /* @@ -8543,24 +8543,24 @@ const char* p1_get_last_oraddress (asn1_ctx_t* actx) void dissect_p1_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) { - proto_item *item=NULL; - proto_tree *tree=NULL; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + proto_item *item=NULL; + proto_tree *tree=NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - /* save parent_tree so subdissectors can create new top nodes */ - p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); + /* save parent_tree so subdissectors can create new top nodes */ + p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); - if(parent_tree){ - item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_p1); - } + if(parent_tree){ + item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_p1); + } - col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); - col_set_str(pinfo->cinfo, COL_INFO, "Transfer"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); + col_set_str(pinfo->cinfo, COL_INFO, "Transfer"); - dissect_p1_MTS_APDU (FALSE, tvb, 0, &asn1_ctx, tree, hf_p1_MTS_APDU_PDU); - p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); + dissect_p1_MTS_APDU (FALSE, tvb, 0, &asn1_ctx, tree, hf_p1_MTS_APDU_PDU); + p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); } /* @@ -8569,71 +8569,71 @@ dissect_p1_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) static int dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { - int offset = 0; - int old_offset; - proto_item *item; - proto_tree *tree; - struct SESSION_DATA_STRUCTURE* session; - int (*p1_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) = NULL; - const char *p1_op_name; - int hf_p1_index = -1; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - /* do we have operation information from the ROS dissector? */ - if (data == NULL) - return 0; - session = (struct SESSION_DATA_STRUCTURE*)data; - - /* save parent_tree so subdissectors can create new top nodes */ - p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); - - asn1_ctx.private_data = session; - - item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_p1); - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); - col_clear(pinfo->cinfo, COL_INFO); - - switch(session->ros_op & ROS_OP_MASK) { - case (ROS_OP_BIND | ROS_OP_ARGUMENT): /* BindInvoke */ - p1_dissector = dissect_p1_MTABindArgument; - p1_op_name = "Bind-Argument"; - hf_p1_index = hf_p1_MTABindArgument_PDU; - break; - case (ROS_OP_BIND | ROS_OP_RESULT): /* BindResult */ - p1_dissector = dissect_p1_MTABindResult; - p1_op_name = "Bind-Result"; - hf_p1_index = hf_p1_MTABindResult_PDU; - break; - case (ROS_OP_BIND | ROS_OP_ERROR): /* BindError */ - p1_dissector = dissect_p1_MTABindError; - p1_op_name = "Bind-Error"; - hf_p1_index = hf_p1_MTABindError_PDU; - break; - case (ROS_OP_INVOKE | ROS_OP_ARGUMENT): /* Invoke Argument */ - p1_dissector = dissect_p1_MTS_APDU; - p1_op_name = "Transfer"; - hf_p1_index = hf_p1_MTS_APDU_PDU; - break; - default: - proto_tree_add_expert(tree, pinfo, &ei_p1_unsupported_pdu, tvb, offset, -1); - return tvb_captured_length(tvb); - } - - col_set_str(pinfo->cinfo, COL_INFO, p1_op_name); - - while (tvb_reported_length_remaining(tvb, offset) > 0){ - old_offset=offset; - offset=(*p1_dissector)(FALSE, tvb, offset, &asn1_ctx , tree, hf_p1_index); - if(offset == old_offset){ - proto_tree_add_expert(tree, pinfo, &ei_p1_zero_pdu, tvb, offset, -1); - break; - } - } - p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); - return tvb_captured_length(tvb); + int offset = 0; + int old_offset; + proto_item *item; + proto_tree *tree; + struct SESSION_DATA_STRUCTURE* session; + int (*p1_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) = NULL; + const char *p1_op_name; + int hf_p1_index = -1; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + + /* do we have operation information from the ROS dissector? */ + if (data == NULL) + return 0; + session = (struct SESSION_DATA_STRUCTURE*)data; + + /* save parent_tree so subdissectors can create new top nodes */ + p1_initialize_content_globals (&asn1_ctx, parent_tree, TRUE); + + asn1_ctx.private_data = session; + + item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_p1); + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1"); + col_clear(pinfo->cinfo, COL_INFO); + + switch(session->ros_op & ROS_OP_MASK) { + case (ROS_OP_BIND | ROS_OP_ARGUMENT): /* BindInvoke */ + p1_dissector = dissect_p1_MTABindArgument; + p1_op_name = "Bind-Argument"; + hf_p1_index = hf_p1_MTABindArgument_PDU; + break; + case (ROS_OP_BIND | ROS_OP_RESULT): /* BindResult */ + p1_dissector = dissect_p1_MTABindResult; + p1_op_name = "Bind-Result"; + hf_p1_index = hf_p1_MTABindResult_PDU; + break; + case (ROS_OP_BIND | ROS_OP_ERROR): /* BindError */ + p1_dissector = dissect_p1_MTABindError; + p1_op_name = "Bind-Error"; + hf_p1_index = hf_p1_MTABindError_PDU; + break; + case (ROS_OP_INVOKE | ROS_OP_ARGUMENT): /* Invoke Argument */ + p1_dissector = dissect_p1_MTS_APDU; + p1_op_name = "Transfer"; + hf_p1_index = hf_p1_MTS_APDU_PDU; + break; + default: + proto_tree_add_expert(tree, pinfo, &ei_p1_unsupported_pdu, tvb, offset, -1); + return tvb_captured_length(tvb); + } + + col_set_str(pinfo->cinfo, COL_INFO, p1_op_name); + + while (tvb_reported_length_remaining(tvb, offset) > 0){ + old_offset=offset; + offset=(*p1_dissector)(FALSE, tvb, offset, &asn1_ctx , tree, hf_p1_index); + if(offset == old_offset){ + proto_tree_add_expert(tree, pinfo, &ei_p1_zero_pdu, tvb, offset, -1); + break; + } + } + p1_initialize_content_globals (&asn1_ctx, NULL, FALSE); + return tvb_captured_length(tvb); } @@ -11157,9 +11157,9 @@ void proto_register_p1(void) { p1_module = prefs_register_protocol_subtree("OSI/X.400", proto_p1, prefs_register_p1); prefs_register_uint_preference(p1_module, "tcp.port", "P1 TCP Port", - "Set the port for P1 operations (if other" - " than the default of 102)", - 10, &global_p1_tcp_port); + "Set the port for P1 operations (if other" + " than the default of 102)", + 10, &global_p1_tcp_port); register_ber_syntax_dissector("P1 Message", proto_p1, dissect_p1_mts_apdu); @@ -11392,3 +11392,16 @@ prefs_register_p1(void) dissector_add_uint("tcp.port", tcp_port, tpkt_handle); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index 9bf69266cc..b28b3977b1 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -135,26 +135,26 @@ static gint ett_rtse_fragment = -1; static gint ett_rtse_fragments = -1; static const fragment_items rtse_frag_items = { - /* Fragment subtrees */ - &ett_rtse_fragment, - &ett_rtse_fragments, - /* Fragment fields */ - &hf_rtse_fragments, - &hf_rtse_fragment, - &hf_rtse_fragment_overlap, - &hf_rtse_fragment_overlap_conflicts, - &hf_rtse_fragment_multiple_tails, - &hf_rtse_fragment_too_long_fragment, - &hf_rtse_fragment_error, - &hf_rtse_fragment_count, - /* Reassembled in field */ - &hf_rtse_reassembled_in, - /* Reassembled length field */ - &hf_rtse_reassembled_length, - /* Reassembled data field */ - NULL, - /* Tag */ - "RTSE fragments" + /* Fragment subtrees */ + &ett_rtse_fragment, + &ett_rtse_fragments, + /* Fragment fields */ + &hf_rtse_fragments, + &hf_rtse_fragment, + &hf_rtse_fragment_overlap, + &hf_rtse_fragment_overlap_conflicts, + &hf_rtse_fragment_multiple_tails, + &hf_rtse_fragment_too_long_fragment, + &hf_rtse_fragment_error, + &hf_rtse_fragment_count, + /* Reassembled in field */ + &hf_rtse_reassembled_in, + /* Reassembled length field */ + &hf_rtse_reassembled_length, + /* Reassembled data field */ + NULL, + /* Tag */ + "RTSE fragments" }; void @@ -181,7 +181,8 @@ register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector dissector_add_string("rtse.oid", oid, ros_handle); /* and then tell ROS how to dissect the AS*/ - register_ros_oid_dissector_handle(oid, dissector, proto, name, TRUE); + if(dissector != NULL) + register_ros_oid_dissector_handle(oid, dissector, proto, name, TRUE); } else { /* otherwise we just remember how to dissect the AS */ @@ -192,43 +193,47 @@ register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector static int call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data) { - tvbuff_t *next_tvb; - int len; + tvbuff_t *next_tvb; + int len; - next_tvb = tvb_new_subset_remaining(tvb, offset); + next_tvb = tvb_new_subset_remaining(tvb, offset); - if((len = dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)) == 0) { - proto_item *item; - proto_tree *next_tree; + if((len = dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)) == 0) { + proto_item *item; + proto_tree *next_tree; - next_tree = proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_rtse_unknown, &item, - "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); + next_tree = proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_rtse_unknown, &item, + "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); - expert_add_info_format(pinfo, item, &ei_rtse_dissector_oid_not_implemented, + expert_add_info_format(pinfo, item, &ei_rtse_dissector_oid_not_implemented, "RTSE: Dissector for OID %s not implemented", oid); - len = dissect_unknown_ber(pinfo, next_tvb, offset, next_tree); - } + len = dissect_unknown_ber(pinfo, next_tvb, offset, next_tree); + } - offset += len; + offset += len; - return offset; + return offset; } static int call_rtse_external_type_callback(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { - const char *oid = NULL; + const char *oid = NULL; if (actx->external.indirect_ref_present) { - oid = (const char *)find_oid_by_pres_ctx_id(actx->pinfo, actx->external.indirect_reference); - } else if (actx->external.direct_ref_present) { - oid = actx->external.direct_reference; - } - if (oid) + oid = (const char *)find_oid_by_pres_ctx_id(actx->pinfo, actx->external.indirect_reference); + + if(!oid) + proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "Unable to determine abstract syntax for indirect reference: %d.", actx->external.indirect_reference); + } else if (actx->external.direct_ref_present) { + oid = actx->external.direct_reference; + } + + if (oid) offset = call_rtse_oid_callback(oid, tvb, offset, actx->pinfo, top_tree ? top_tree : tree, actx->private_data); - return offset; + return offset; } @@ -728,7 +733,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset /*--- End of included file: packet-rtse-fn.c ---*/ -#line 185 "../../asn1/rtse/packet-rtse-template.c" +#line 190 "../../asn1/rtse/packet-rtse-template.c" /* * Dissect RTSE PDUs inside a PPDU. @@ -736,119 +741,119 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { - int offset = 0; - int old_offset; - proto_item *item; - proto_tree *tree; - proto_tree *next_tree=NULL; - tvbuff_t *next_tvb = NULL; - tvbuff_t *data_tvb = NULL; - fragment_head *frag_msg = NULL; - guint32 fragment_length; - guint32 rtse_id = 0; - gboolean data_handled = FALSE; - struct SESSION_DATA_STRUCTURE* session; - conversation_t *conversation = NULL; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - - /* do we have application context from the acse dissector? */ - if (data == NULL) - return 0; - session = (struct SESSION_DATA_STRUCTURE*)data; - - /* save parent_tree so subdissectors can create new top nodes */ - top_tree=parent_tree; - - asn1_ctx.private_data = session; - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTSE"); - col_clear(pinfo->cinfo, COL_INFO); - - if (rtse_reassemble && - ((session->spdu_type == SES_DATA_TRANSFER) || - (session->spdu_type == SES_MAJOR_SYNC_POINT))) { - /* Use conversation index as fragment id */ - conversation = find_conversation (pinfo->fd->num, - &pinfo->src, &pinfo->dst, pinfo->ptype, - pinfo->srcport, pinfo->destport, 0); - if (conversation != NULL) { - rtse_id = conversation->index; - } - session->rtse_reassemble = TRUE; - } - if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { - frag_msg = fragment_end_seq_next (&rtse_reassembly_table, - pinfo, rtse_id, NULL); - next_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled RTSE", - frag_msg, &rtse_frag_items, NULL, parent_tree); - } - - item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_rtse); - - if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) { - /* strip off the OCTET STRING encoding - including any CONSTRUCTED OCTET STRING */ - dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hf_rtse_segment_data, &data_tvb); - - if (data_tvb) { - fragment_length = tvb_captured_length_remaining (data_tvb, 0); - proto_item_append_text(asn1_ctx.created_item, " (%u byte%s)", fragment_length, - plurality(fragment_length, "", "s")); - frag_msg = fragment_add_seq_next (&rtse_reassembly_table, - data_tvb, 0, pinfo, - rtse_id, NULL, - fragment_length, TRUE); - if (frag_msg && pinfo->fd->num != frag_msg->reassembled_in) { - /* Add a "Reassembled in" link if not reassembled in this frame */ - proto_tree_add_uint (tree, *(rtse_frag_items.hf_reassembled_in), - data_tvb, 0, 0, frag_msg->reassembled_in); - } - pinfo->fragmented = TRUE; - data_handled = TRUE; - } else { - fragment_length = tvb_captured_length_remaining (tvb, offset); - } - - col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", - fragment_length, plurality(fragment_length, "", "s")); - } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { - if (next_tvb) { - /* ROS won't do this for us */ - session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT); - /*offset=*/dissect_ber_external_type(FALSE, tree, next_tvb, 0, &asn1_ctx, -1, call_rtse_external_type_callback); - top_tree = NULL; - /* Return other than 0 to indicate that we handled this packet */ - return 1; - } else { - offset = tvb_captured_length (tvb); - } - pinfo->fragmented = FALSE; - data_handled = TRUE; - } - - if (!data_handled) { - while (tvb_reported_length_remaining(tvb, offset) > 0){ - old_offset=offset; - offset=dissect_rtse_RTSE_apdus(TRUE, tvb, offset, &asn1_ctx, tree, -1); - if(offset == old_offset){ - next_tree = proto_tree_add_subtree(tree, tvb, offset, -1, - ett_rtse_unknown, &item, "Unknown RTSE PDU"); - expert_add_info (pinfo, item, &ei_rtse_unknown_rtse_pdu); - dissect_unknown_ber(pinfo, tvb, offset, next_tree); - break; - } - } - } - - top_tree = NULL; - return tvb_captured_length(tvb); + int offset = 0; + int old_offset; + proto_item *item; + proto_tree *tree; + proto_tree *next_tree=NULL; + tvbuff_t *next_tvb = NULL; + tvbuff_t *data_tvb = NULL; + fragment_head *frag_msg = NULL; + guint32 fragment_length; + guint32 rtse_id = 0; + gboolean data_handled = FALSE; + struct SESSION_DATA_STRUCTURE* session; + conversation_t *conversation = NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + + /* do we have application context from the acse dissector? */ + if (data == NULL) + return 0; + session = (struct SESSION_DATA_STRUCTURE*)data; + + /* save parent_tree so subdissectors can create new top nodes */ + top_tree=parent_tree; + + asn1_ctx.private_data = session; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTSE"); + col_clear(pinfo->cinfo, COL_INFO); + + if (rtse_reassemble && + ((session->spdu_type == SES_DATA_TRANSFER) || + (session->spdu_type == SES_MAJOR_SYNC_POINT))) { + /* Use conversation index as fragment id */ + conversation = find_conversation (pinfo->fd->num, + &pinfo->src, &pinfo->dst, pinfo->ptype, + pinfo->srcport, pinfo->destport, 0); + if (conversation != NULL) { + rtse_id = conversation->index; + } + session->rtse_reassemble = TRUE; + } + if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { + frag_msg = fragment_end_seq_next (&rtse_reassembly_table, + pinfo, rtse_id, NULL); + next_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled RTSE", + frag_msg, &rtse_frag_items, NULL, parent_tree); + } + + item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_rtse); + + if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) { + /* strip off the OCTET STRING encoding - including any CONSTRUCTED OCTET STRING */ + dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hf_rtse_segment_data, &data_tvb); + + if (data_tvb) { + fragment_length = tvb_captured_length_remaining (data_tvb, 0); + proto_item_append_text(asn1_ctx.created_item, " (%u byte%s)", fragment_length, + plurality(fragment_length, "", "s")); + frag_msg = fragment_add_seq_next (&rtse_reassembly_table, + data_tvb, 0, pinfo, + rtse_id, NULL, + fragment_length, TRUE); + if (frag_msg && pinfo->fd->num != frag_msg->reassembled_in) { + /* Add a "Reassembled in" link if not reassembled in this frame */ + proto_tree_add_uint (tree, *(rtse_frag_items.hf_reassembled_in), + data_tvb, 0, 0, frag_msg->reassembled_in); + } + pinfo->fragmented = TRUE; + data_handled = TRUE; + } else { + fragment_length = tvb_captured_length_remaining (tvb, offset); + } + + col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", + fragment_length, plurality(fragment_length, "", "s")); + } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { + if (next_tvb) { + /* ROS won't do this for us */ + session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT); + /*offset=*/dissect_ber_external_type(FALSE, tree, next_tvb, 0, &asn1_ctx, -1, call_rtse_external_type_callback); + top_tree = NULL; + /* Return other than 0 to indicate that we handled this packet */ + return 1; + } else { + offset = tvb_captured_length (tvb); + } + pinfo->fragmented = FALSE; + data_handled = TRUE; + } + + if (!data_handled) { + while (tvb_reported_length_remaining(tvb, offset) > 0){ + old_offset=offset; + offset=dissect_rtse_RTSE_apdus(TRUE, tvb, offset, &asn1_ctx, tree, -1); + if(offset == old_offset){ + next_tree = proto_tree_add_subtree(tree, tvb, offset, -1, + ett_rtse_unknown, &item, "Unknown RTSE PDU"); + expert_add_info (pinfo, item, &ei_rtse_unknown_rtse_pdu); + dissect_unknown_ber(pinfo, tvb, offset, next_tree); + break; + } + } + } + + top_tree = NULL; + return tvb_captured_length(tvb); } static void rtse_reassemble_init (void) { - reassembly_table_init (&rtse_reassembly_table, - &addresses_reassembly_table_functions); + reassembly_table_init (&rtse_reassembly_table, + &addresses_reassembly_table_functions); } /*--- proto_register_rtse -------------------------------------------*/ @@ -860,39 +865,39 @@ void proto_register_rtse(void) { /* Fragment entries */ { &hf_rtse_segment_data, { "RTSE segment data", "rtse.segment", FT_NONE, BASE_NONE, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragments, { "RTSE fragments", "rtse.fragments", FT_NONE, BASE_NONE, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment, { "RTSE fragment", "rtse.fragment", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment_overlap, { "RTSE fragment overlap", "rtse.fragment.overlap", FT_BOOLEAN, - BASE_NONE, NULL, 0x0, NULL, HFILL } }, + BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_overlap_conflicts, { "RTSE fragment overlapping with conflicting data", - "rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL } }, + "rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_multiple_tails, { "RTSE has multiple tail fragments", - "rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL } }, + "rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_too_long_fragment, { "RTSE fragment too long", "rtse.fragment.too_long_fragment", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_error, { "RTSE defragmentation error", "rtse.fragment.error", FT_FRAMENUM, - BASE_NONE, NULL, 0x00, NULL, HFILL } }, + BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment_count, { "RTSE fragment count", "rtse.fragment.count", FT_UINT32, BASE_DEC, - NULL, 0x00, NULL, HFILL } }, + NULL, 0x00, NULL, HFILL } }, { &hf_rtse_reassembled_in, { "Reassembled RTSE in frame", "rtse.reassembled.in", FT_FRAMENUM, BASE_NONE, - NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } }, + NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } }, { &hf_rtse_reassembled_length, { "Reassembled RTSE length", "rtse.reassembled.length", FT_UINT32, BASE_DEC, - NULL, 0x00, "The total length of the reassembled payload", HFILL } }, + NULL, 0x00, "The total length of the reassembled payload", HFILL } }, /*--- Included file: packet-rtse-hfarr.c ---*/ @@ -995,7 +1000,7 @@ void proto_register_rtse(void) { NULL, HFILL }}, /*--- End of included file: packet-rtse-hfarr.c ---*/ -#line 351 "../../asn1/rtse/packet-rtse-template.c" +#line 356 "../../asn1/rtse/packet-rtse-template.c" }; /* List of subtrees */ @@ -1017,7 +1022,7 @@ void proto_register_rtse(void) { &ett_rtse_CallingSSuserReference, /*--- End of included file: packet-rtse-ettarr.c ---*/ -#line 360 "../../asn1/rtse/packet-rtse-template.c" +#line 365 "../../asn1/rtse/packet-rtse-template.c" }; static ei_register_info ei[] = { @@ -1040,11 +1045,11 @@ void proto_register_rtse(void) { rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL); prefs_register_bool_preference(rtse_module, "reassemble", - "Reassemble segmented RTSE datagrams", - "Whether segmented RTSE datagrams should be reassembled." - " To use this option, you must also enable" - " \"Allow subdissectors to reassemble TCP streams\"" - " in the TCP protocol settings.", &rtse_reassemble); + "Reassemble segmented RTSE datagrams", + "Whether segmented RTSE datagrams should be reassembled." + " To use this option, you must also enable" + " \"Allow subdissectors to reassemble TCP streams\"" + " in the TCP protocol settings.", &rtse_reassemble); rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE); oid_table=g_hash_table_new(g_str_hash, g_str_equal); @@ -1058,3 +1063,16 @@ void proto_reg_handoff_rtse(void) { } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ |