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
This commit is contained in:
Ronnie Sahlberg 2005-06-22 08:15:18 +00:00
parent acddab0452
commit 5a3ff9906c
8 changed files with 46 additions and 72 deletions

View File

@ -13,7 +13,5 @@ clean:
rm -f parsetab.py $(DISSECTOR_FILES)
copy_files: generate_dissector
# cp $(DISSECTOR_FILES) ../../epan/dissectors
echo "Dont use this dissector yet, there are two bugs in it you will"
echo "have to fix manually first. See packet-acse.c comment at top "
cp $(DISSECTOR_FILES) ../../epan/dissectors

View File

@ -18,7 +18,10 @@ IMPORTS
-- ITU-T Rec. X.501 | ISO/IEC 9594-2.
-- Workaround for bug in ASN2ETH in the .cnf file
-- to handle the lack of support for tagged assignments.
-- remove that workaround once asn2eth learns how to handle
-- tagged assignments.
EXTERNAL ::= [UNIVERSAL 8] IMPLICIT SEQUENCE
{
direct-reference OBJECT IDENTIFIER OPTIONAL,

View File

@ -23,6 +23,21 @@ AARQ-apdu/aSO-context-name AARQ_aSO_context_name
AARE-apdu/aSO-context-name AARE_aSO_context_name
ACRQ-apdu/aSO-context-name ACRQ_aSO_context_name
#.FN_BODY EXTERNAL
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);
#.FN_BODY Authentication-value-other/other-mechanism-name
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
hf_index, object_identifier_id);

View File

@ -1,25 +1,9 @@
/*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
@ -299,9 +283,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);
}

View File

@ -177,12 +177,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 */
/*XXX remove this later when ACSE is converted to ASN2ETH */
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");
}

View File

@ -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);
}

View File

@ -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");
}

View File

@ -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");
}