aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-06-22 08:15:18 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-06-22 08:15:18 +0000
commit5a3ff9906cf446fce4baba794528cc9c8e9f07ff (patch)
treec0fa56a949e0d2e9557f7ab2f7e310303b79ed21 /epan
parentacddab045269992561ae5c0d99ce919f46c89710 (diff)
remove a dissector table we no longer use from ACSE
and also from the CMIP and FTAM dissectors that tried to register against it. Implement a workaround for the asn2eth bug (can not yet handle tagged assignments) to the conformance file and remove the warnings from the template file. Since workaround is implemented in conformance file, make make copy_files install the dissector instead of printing a warning message. svn path=/trunk/; revision=14725
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-acse.c49
-rw-r--r--epan/dissectors/packet-cmip.c5
-rw-r--r--epan/dissectors/packet-ftam.c7
3 files changed, 22 insertions, 39 deletions
diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c
index f0c569e2fa..9cb93c829f 100644
--- a/epan/dissectors/packet-acse.c
+++ b/epan/dissectors/packet-acse.c
@@ -6,33 +6,19 @@
/* Input file: packet-acse-template.c */
/*XXX
- there is a bug in the generated code
- static const ber_sequence_t Association_data_sequence_of[1] = {
- { BER_CLASS_UNI, 8, BER_FLAGS_NOOWNTAG, dissect_Association_data_item },
- };
- must be changed into
- static const ber_sequence_t Association_data_sequence_of[1] = {
- { BER_CLASS_UNI, 8, NULL, dissect_Association_data_item },
- };
+ There is a bug in asn2eth that it can not yet handle tagged assignments such
+ as EXTERNAL ::= [UNIVERSAL 8] IMPLICIT SEQUENCE {
- and
- static int dissect_Association_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- int ret;
- ret=dissect_acse_EXTERNAL(FALSE, tvb, offset, pinfo, tree, hf_acse_Association_data_item);
- return ret;
- }
- must be changed into
- static int dissect_Association_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- int ret;
- ret=dissect_acse_EXTERNAL(TRUE, tvb, offset, pinfo, tree, hf_acse_Association_data_item);
- return ret;
- }
+ This bug is workedaround by some .cnf magic but this should be cleaned up
+ once asn2eth learns how to deal with tagged assignments
*/
/* packet-acse.c
* Routines for ACSE packet dissection
* Ronnie Sahlberg 2005
- * dissect_acse() from original handwritten dissector by Sid
+ * dissect_acse() based original handwritten dissector by Sid
+ * Yuriy Sidelnikov <YSidelnikov@hotmail.com>
+ *
*
* $Id$
*
@@ -455,13 +441,25 @@ static const ber_sequence_t EXTERNAL_sequence[] = {
static int
dissect_acse_EXTERNAL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ gint8 class;
+ gboolean pc, ind_field;
+ gint32 tag;
+ gint32 len1;
+
+ /* XXX asn2eth can not yet handle tagged assignment so for the
+ * time being just remove this tag manually inside the EXTERNAL
+ * dissector.
+ */
+ offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
+ offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
EXTERNAL_sequence, hf_index, ett_acse_EXTERNAL);
+
return offset;
}
static int dissect_Association_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_EXTERNAL(TRUE, tvb, offset, pinfo, tree, hf_acse_Association_data_item);
+ return dissect_acse_EXTERNAL(FALSE, tvb, offset, pinfo, tree, hf_acse_Association_data_item);
}
static int dissect_external_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_acse_EXTERNAL(TRUE, tvb, offset, pinfo, tree, hf_acse_external);
@@ -1065,7 +1063,7 @@ static int dissect_calling_asoi_tag_impl(packet_info *pinfo, proto_tree *tree, t
}
static const ber_sequence_t Association_data_sequence_of[1] = {
- { BER_CLASS_UNI, 8, NULL, dissect_Association_data_item },
+ { BER_CLASS_UNI, 8, BER_FLAGS_NOOWNTAG, dissect_Association_data_item },
};
static int
@@ -2387,9 +2385,6 @@ void proto_register_acse(void) {
proto_register_field_array(proto_acse, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
-/*XXX remove later just to keep the other dissectors happy */
-register_dissector_table("acse.application_context", "Application context OID", FT_STRING, BASE_NONE);
-
register_init_routine(acse_init);
}
diff --git a/epan/dissectors/packet-cmip.c b/epan/dissectors/packet-cmip.c
index 234d219e23..82af0bb4ac 100644
--- a/epan/dissectors/packet-cmip.c
+++ b/epan/dissectors/packet-cmip.c
@@ -3153,11 +3153,6 @@ void proto_register_cmip(void) {
/*--- proto_reg_handoff_cmip -------------------------------------------*/
void proto_reg_handoff_cmip(void) {
- dissector_handle_t cmip_handle;
-
- /*XXX this to be removed later and shoved into the conformance file */
- cmip_handle = create_dissector_handle(dissect_cmip,proto_cmip);
- dissector_add_string("acse.application_context", "2.9.0.0.2", cmip_handle);
register_ber_oid_dissector("2.9.0.0.2", dissect_cmip, proto_cmip, "cmip");
}
diff --git a/epan/dissectors/packet-ftam.c b/epan/dissectors/packet-ftam.c
index 8b6953aba1..02a4bc6109 100644
--- a/epan/dissectors/packet-ftam.c
+++ b/epan/dissectors/packet-ftam.c
@@ -3810,15 +3810,8 @@ proto_register_ftam(void)
void
proto_reg_handoff_ftam(void)
{
- dissector_handle_t ftam_handle;
-
/* find data dissector */
data_handle = find_dissector("data");
- ftam_handle = create_dissector_handle(dissect_ftam,proto_ftam);
- /* Register in acse oid table */
- /* remove this when ACSE is replaced later */
- dissector_add_string("acse.application_context", "1.0.8571.1.1", ftam_handle);
-
register_ber_oid_dissector("1.0.8571.1.1", dissect_ftam, proto_ftam, "ftam");
}