diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-09-04 09:00:01 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-09-04 09:00:01 +0000 |
commit | bc4b6481b473f64f20cb5d1c013b79eced4ddef5 (patch) | |
tree | 152a1b64148ecf3fcafc4ba2c62b3d2995bb278e /asn1/acse/packet-acse-template.c | |
parent | 60eb171f7a761439d460096853dcb0a9d91b535a (diff) |
From Graeme Lunt:
Basically the changes are:
a) [pres] make the find_oid_by_[pres_]ctx_id (I changed the name to make it more specific) non-static so it can be called from other dissectors (see acse.cnf changes). I also call it from RTSE and ROS dissectors
b) [acse] remove (#ifdef NOT_NEEDED) the oid lookup table and any reference to acse_handle - as these are no longer needed
c) [acse] register the acse dissector on 2.2.1.0.1
with some modifications: -#ifdef:ed code removed
- renamed aco -> pco
svn path=/trunk/; revision=15678
Diffstat (limited to 'asn1/acse/packet-acse-template.c')
-rw-r--r-- | asn1/acse/packet-acse-template.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/asn1/acse/packet-acse-template.c b/asn1/acse/packet-acse-template.c index ad51c59bd9..abda0486de 100644 --- a/asn1/acse/packet-acse-template.c +++ b/asn1/acse/packet-acse-template.c @@ -49,6 +49,7 @@ #include "packet-ber.h" #include "packet-acse.h" #include "packet-ses.h" +#include "packet-pres.h" #include "packet-x509if.h" #define PNAME "ACSE" @@ -72,6 +73,7 @@ static guint32 indir_ref=0; static proto_tree *top_tree=NULL; +#if NOT_NEEDED /* to keep track of presentation context identifiers and protocol-oids */ typedef struct _acse_ctx_oid_t { /* XXX here we should keep track of ADDRESS/PORT as well */ @@ -134,6 +136,7 @@ find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx) return NULL; } +# endif /* NOT_NEEDED */ #include "packet-acse-fn.c" @@ -182,14 +185,14 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) /* data pdu is not ACSE pdu and has to go directly to app dissector */ switch(session->spdu_type){ case SES_CONNECTION_REQUEST: /* AARQ */ - case SES_CONNECTION_ACCEPT: /* AARE */ - case SES_REFUSE: /* RLRE */ - case SES_DISCONNECT: /* RLRQ */ - case SES_FINISH: /* RLRE */ - case SES_ABORT: /* ABRT */ + case SES_CONNECTION_ACCEPT: /* AARE */ + case SES_REFUSE: /* RLRE */ + case SES_DISCONNECT: /* RLRQ */ + case SES_FINISH: /* RLRE */ + case SES_ABORT: /* ABRT */ break; case SES_DATA_TRANSFER: - oid=find_oid_by_ctx_id(pinfo, indir_ref); + oid=find_oid_by_pres_ctx_id(pinfo, indir_ref); if(oid){ call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree); } else { @@ -223,18 +226,6 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } } - switch(session->spdu_type){ - case SES_CONNECTION_REQUEST: /* AARQ */ - case SES_CONNECTION_ACCEPT: /* AARE */ - /* these two functions are used to set up the association - between a presentation identifier (indir_ref) and - a protocol identified by a oid. - it is ugly to handle it with global variables but - better than nothing. - */ - register_ctx_id_and_oid(pinfo, indir_ref, object_identifier_id); - break; - } } /*--- proto_register_acse ----------------------------------------------*/ @@ -259,14 +250,16 @@ void proto_register_acse(void) { proto_register_field_array(proto_acse, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - register_init_routine(acse_init); } /*--- proto_reg_handoff_acse -------------------------------------------*/ void proto_reg_handoff_acse(void) { /*#include "packet-acse-dis-tab.c"*/ - register_ber_oid_dissector("2.2.3.1.1", dissect_acse, proto_acse, "acse"); + + register_ber_oid_name("2.2.3.1.1","aCSE-id"); register_ber_oid_dissector("2.2.1.0.1", dissect_acse, proto_acse, "acse-as-id"); + + } |