aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-31 20:20:56 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-31 20:20:56 +0000
commiteaa4730d00bf2a4676338983182caf1047e9c983 (patch)
tree79724962824779630df52ad30aa5d0d8ca168170
parent1e892297d9f72d223780207ad44c392b6f791a0e (diff)
Upadte to call Data dissector from PRES based on OID in Presentation Context,
based on the code in ACSE. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15643 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--asn1/acse/acse.cnf32
-rw-r--r--asn1/acse/packet-acse-template.c19
-rw-r--r--asn1/cmip/packet-cmip-template.c1
-rw-r--r--asn1/pres/packet-pres-template.c120
-rw-r--r--asn1/pres/pres.cnf33
-rw-r--r--epan/dissectors/packet-acse.c171
-rw-r--r--epan/dissectors/packet-cmip.c1
-rw-r--r--epan/dissectors/packet-pres.c263
-rw-r--r--epan/dissectors/packet-pres.h2
9 files changed, 398 insertions, 244 deletions
diff --git a/asn1/acse/acse.cnf b/asn1/acse/acse.cnf
index f6b2fd90bc..92d038e7d7 100644
--- a/asn1/acse/acse.cnf
+++ b/asn1/acse/acse.cnf
@@ -13,22 +13,26 @@ AE-invocation-identifier
#.TYPE_RENAME
AARQ-apdu/protocol-version T_AARQ_protocol_version
AARE-apdu/protocol-version T_AARE_protocol_version
+AARQ-apdu/aSO-context-name T_AARQ_aSO_context_name
+AARE-apdu/aSO-context-name T_AARE_aSO_context_name
+ACRQ-apdu/aSO-context-name T_ACRQ_aSO_context_name
+ACRP-apdu/aSO-context-name T_ACRP_aSO_context_name
#.FIELD_RENAME
-AARQ-apdu/user-information AARQ_user_information
-AARE-apdu/user-information AARE_user_information
-ABRT-apdu/user-information ABRT_user_information
-RLRE-apdu/user-information RLRE_user_information
-RLRQ-apdu/user-information RLRQ_user_information
-AARE-apdu/result AARE_result
-P-context-result-list/_item/result Pcontext_result
-RLRE-apdu/reason RLRE_reason
-RLRQ-apdu/reason RLRQ_reason
-AARQ-apdu/protocol-version AARQ_protocol_version
-AARE-apdu/protocol-version AARE_protocol_version
-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
+AARQ-apdu/user-information aARQ_user_information
+AARE-apdu/user-information aARE_user_information
+ABRT-apdu/user-information aBRT_user_information
+RLRE-apdu/user-information rLRE_user_information
+RLRQ-apdu/user-information rLRQ_user_information
+AARE-apdu/result aARE_result
+P-context-result-list/_item/result pcontext_result
+RLRE-apdu/reason rLRE_reason
+RLRQ-apdu/reason rLRQ_reason
+AARQ-apdu/protocol-version aARQ_protocol_version
+AARE-apdu/protocol-version aARE_protocol_version
+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;
diff --git a/asn1/acse/packet-acse-template.c b/asn1/acse/packet-acse-template.c
index f13834eba1..ad51c59bd9 100644
--- a/asn1/acse/packet-acse-template.c
+++ b/asn1/acse/packet-acse-template.c
@@ -182,11 +182,11 @@ 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);
@@ -225,7 +225,7 @@ 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 */
+ 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.
@@ -266,10 +266,7 @@ void proto_register_acse(void) {
/*--- proto_reg_handoff_acse -------------------------------------------*/
void proto_reg_handoff_acse(void) {
/*#include "packet-acse-dis-tab.c"*/
-
- register_ber_oid_name("2.2.3.1.1","aCSE-id");
- register_ber_oid_name("2.2.1.0.1","acse-as-id");
-
-
+ register_ber_oid_dissector("2.2.3.1.1", dissect_acse, proto_acse, "acse");
+ register_ber_oid_dissector("2.2.1.0.1", dissect_acse, proto_acse, "acse-as-id");
}
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index 8316584f50..20453fb28b 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -249,6 +249,7 @@ void proto_register_cmip(void) {
/*--- proto_reg_handoff_cmip -------------------------------------------*/
void proto_reg_handoff_cmip(void) {
register_ber_oid_dissector("2.9.0.0.2", dissect_cmip, proto_cmip, "cmip");
+ register_ber_oid_dissector("2.9.1.1.4", dissect_cmip, proto_cmip, "joint-iso-itu-t(2) ms(9) cmip(1) cmip-pci(1) abstractSyntax(4)");
register_ber_oid_dissector("2.9.3.2.7.35", dissect_cmip_attribute_35, proto_cmip, "smi2AttributeID (7) operationalState(35)");
register_ber_oid_dissector("2.9.3.2.7.55", dissect_cmip_attribute_55, proto_cmip, "smi2AttributeID (7) destination(55)");
register_ber_oid_dissector("2.9.3.2.7.56", dissect_cmip_attribute_56, proto_cmip, "smi2AttributeID (7) discriminatorConstruct(56)");
diff --git a/asn1/pres/packet-pres-template.c b/asn1/pres/packet-pres-template.c
index 39202beb6b..82b5e4aae2 100644
--- a/asn1/pres/packet-pres-template.c
+++ b/asn1/pres/packet-pres-template.c
@@ -31,6 +31,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
+#include <epan/emem.h>
#include <stdio.h>
#include <string.h>
@@ -56,6 +57,17 @@ packet_info *global_pinfo = NULL;
static dissector_handle_t data_handle;
static dissector_handle_t acse_handle;
+static char abstract_syntax_name_oid[BER_MAX_OID_STR_LEN];
+static guint32 presentation_context_identifier;
+
+/* to keep track of presentation context identifiers and protocol-oids */
+typedef struct _pres_ctx_oid_t {
+ /* XXX here we should keep track of ADDRESS/PORT as well */
+ guint32 ctx_id;
+ char *oid;
+} pres_ctx_oid_t;
+static GHashTable *pres_ctx_oid_table = NULL;
+
#include "packet-pres-hf.c"
/* Initialize the subtree pointers */
@@ -63,8 +75,65 @@ static gint ett_pres = -1;
#include "packet-pres-ett.c"
+
+static guint
+pres_ctx_oid_hash(gconstpointer k)
+{
+ pres_ctx_oid_t *aco=(pres_ctx_oid_t *)k;
+ return aco->ctx_id;
+}
+/* XXX this one should be made ADDRESS/PORT aware */
+static gint
+pres_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
+{
+ pres_ctx_oid_t *aco1=(pres_ctx_oid_t *)k1;
+ pres_ctx_oid_t *aco2=(pres_ctx_oid_t *)k2;
+ return aco1->ctx_id==aco2->ctx_id;
+}
+
+static void
+pres_init(void)
+{
+ if( pres_ctx_oid_table ){
+ g_hash_table_destroy(pres_ctx_oid_table);
+ pres_ctx_oid_table = NULL;
+ }
+ pres_ctx_oid_table = g_hash_table_new(pres_ctx_oid_hash,
+ pres_ctx_oid_equal);
+
+}
+
+static void
+register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid)
+{
+ pres_ctx_oid_t *aco, *tmpaco;
+ aco=se_alloc(sizeof(pres_ctx_oid_t));
+ aco->ctx_id=idx;
+ aco->oid=se_strdup(oid);
+
+ /* if this ctx already exists, remove the old one first */
+ tmpaco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, aco);
+ if(tmpaco){
+ g_hash_table_remove(pres_ctx_oid_table, tmpaco);
+ }
+ g_hash_table_insert(pres_ctx_oid_table, aco, aco);
+}
+static char *
+find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx)
+{
+ pres_ctx_oid_t aco, *tmpaco;
+ aco.ctx_id=idx;
+ tmpaco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, &aco);
+ if(tmpaco){
+ return tmpaco->oid;
+ }
+ return NULL;
+}
+
+
#include "packet-pres-fn.c"
+
/*
* Dissect an PPDU.
*/
@@ -75,43 +144,35 @@ dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
proto_tree *pres_tree = NULL;
guint s_type;
/* do we have spdu type from the session dissector? */
- if( !pinfo->private_data )
- {
- if(tree)
- {
- proto_tree_add_text(tree, tvb, offset, -1,
- "Internal error:can't get spdu type from session dissector.");
- return FALSE;
- }
- }
- else
- {
- session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
- if(session->spdu_type == 0 )
- {
- if(tree)
- {
- proto_tree_add_text(tree, tvb, offset, -1,
- "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
- return FALSE;
- }
- }
- }
+ if( !pinfo->private_data ){
+ if(tree){
+ proto_tree_add_text(tree, tvb, offset, -1,
+ "Internal error:can't get spdu type from session dissector.");
+ return FALSE;
+ }
+ }else{
+ session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
+ if(session->spdu_type == 0 ){
+ if(tree){
+ proto_tree_add_text(tree, tvb, offset, -1,
+ "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
+ return FALSE;
+ }
+ }
+ }
/* get type of tag */
s_type = tvb_get_guint8(tvb, offset);
/* set up type of Ppdu */
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(session->spdu_type, ses_vals, "Unknown Ppdu type (0x%02x)"));
- if (tree)
- {
- ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
+ if (tree){
+ ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
FALSE);
- pres_tree = proto_item_add_subtree(ti, ett_pres);
- }
+ pres_tree = proto_item_add_subtree(ti, ett_pres);
+ }
- switch(session->spdu_type)
- {
+ switch(session->spdu_type){
case SES_REFUSE:
break;
case SES_CONNECTION_REQUEST:
@@ -188,6 +249,7 @@ void proto_register_pres(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_pres, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ register_init_routine(pres_init);
}
diff --git a/asn1/pres/pres.cnf b/asn1/pres/pres.cnf
index 8bfbef9390..6daf4a42d2 100644
--- a/asn1/pres/pres.cnf
+++ b/asn1/pres/pres.cnf
@@ -12,8 +12,21 @@
#.NO_EMIT
#.TYPE_RENAME
+CPA-PPDU/normal-mode-parameters T_CPA_PPDU_normal_mode_parameters
+CPR-PPDU/normal-mode-parameters T_CPR_PPDU_normal_mode_parameters
+ARU-PPDU/normal-mode-parameters T_ARU_PPDU_normal_mode_parameters
#.FIELD_RENAME
+ARU-PPDU/normal-mode-parameters aRU_PPDU_normal_mode_parameters
+CPA-PPDU/normal-mode-parameters cPU_PPDU_normal_mode_parameters
+CPR-PPDU/normal-mode-parameters cPR_PPDU_normal_mode_parameters
+
+ARU-PPDU/x400-mode-parameters aRU_PPDU_x400_mode_parameters
+CPR-PPDU/x400-mode-parameters cPU_PPDU_x400_mode_parameters
+CPA-PPDU/x410-mode-parameters cPR_PPDU_x400_mode_parameters
+
+ARP-PPDU/provider-reason aRU_PPDU_provider-reason
+CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
#.FN_BODY OPEN
/* FIX ME*/
@@ -21,12 +34,24 @@
#.FN_BODY PDV-list/presentation-data-values/single-ASN1-type
tvbuff_t *next_tvb;
+ char *oid;
- if(!acse_handle){
-%(DEFAULT_BODY)s
- }else{
+ oid=find_oid_by_ctx_id(pinfo, presentation_context_identifier);
+ if(oid){
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
- call_dissector(acse_handle, next_tvb, pinfo, global_tree);
+ call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
+ } else {
+ proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
+ %(DEFAULT_BODY)s
}
+
+#.FN_PARS Abstract_syntax_name
+ VAL_PTR = abstract_syntax_name_oid
+
+#.FN_PARS Presentation_context_identifier
+ VAL_PTR = &presentation_context_identifier
+
+#.FN_FTR Context-list/_item
+ register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
#.END
diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c
index 01141d722d..c3707ff6f1 100644
--- a/epan/dissectors/packet-acse.c
+++ b/epan/dissectors/packet-acse.c
@@ -82,8 +82,8 @@ static int hf_acse_abrt = -1; /* ABRT_apdu */
static int hf_acse_adt = -1; /* A_DT_apdu */
static int hf_acse_acrq = -1; /* ACRQ_apdu */
static int hf_acse_acrp = -1; /* ACRP_apdu */
-static int hf_acse_AARQ_protocol_version = -1; /* T_AARQ_protocol_version */
-static int hf_acse_AARQ_aSO_context_name = -1; /* T_aSO_context_name */
+static int hf_acse_aARQ_protocol_version = -1; /* T_AARQ_protocol_version */
+static int hf_acse_aARQ_aSO_context_name = -1; /* T_AARQ_aSO_context_name */
static int hf_acse_called_AP_title = -1; /* AP_title */
static int hf_acse_called_AE_qualifier = -1; /* AE_qualifier */
static int hf_acse_called_AP_invocation_identifier = -1; /* AP_invocation_identifier */
@@ -100,10 +100,10 @@ static int hf_acse_implementation_information = -1; /* Implementation_data */
static int hf_acse_p_context_definition_list = -1; /* Syntactic_context_list */
static int hf_acse_called_asoi_tag = -1; /* ASOI_tag */
static int hf_acse_calling_asoi_tag = -1; /* ASOI_tag */
-static int hf_acse_AARQ_user_information = -1; /* Association_data */
-static int hf_acse_AARE_protocol_version = -1; /* T_AARE_protocol_version */
-static int hf_acse_AARE_aSO_context_name = -1; /* T_aSO_context_name1 */
-static int hf_acse_AARE_result = -1; /* Associate_result */
+static int hf_acse_aARQ_user_information = -1; /* Association_data */
+static int hf_acse_aARE_protocol_version = -1; /* T_AARE_protocol_version */
+static int hf_acse_aARE_aSO_context_name = -1; /* T_AARE_aSO_context_name */
+static int hf_acse_aARE_result = -1; /* Associate_result */
static int hf_acse_result_source_diagnostic = -1; /* Associate_source_diagnostic */
static int hf_acse_responding_AP_title = -1; /* AP_title */
static int hf_acse_responding_AE_qualifier = -1; /* AE_qualifier */
@@ -112,20 +112,20 @@ static int hf_acse_responding_AE_invocation_identifier = -1; /* AE_invocation_i
static int hf_acse_responder_acse_requirements = -1; /* ACSE_requirements */
static int hf_acse_responding_authentication_value = -1; /* Authentication_value */
static int hf_acse_p_context_result_list = -1; /* P_context_result_list */
-static int hf_acse_AARE_user_information = -1; /* Association_data */
-static int hf_acse_RLRQ_reason = -1; /* Release_request_reason */
+static int hf_acse_aARE_user_information = -1; /* Association_data */
+static int hf_acse_rLRQ_reason = -1; /* Release_request_reason */
static int hf_acse_aso_qualifier = -1; /* ASO_qualifier */
static int hf_acse_asoi_identifier = -1; /* ASOI_identifier */
-static int hf_acse_RLRQ_user_information = -1; /* Association_data */
-static int hf_acse_RLRE_reason = -1; /* Release_response_reason */
-static int hf_acse_RLRE_user_information = -1; /* Association_data */
+static int hf_acse_rLRQ_user_information = -1; /* Association_data */
+static int hf_acse_rLRE_reason = -1; /* Release_response_reason */
+static int hf_acse_rLRE_user_information = -1; /* Association_data */
static int hf_acse_abort_source = -1; /* ABRT_source */
static int hf_acse_abort_diagnostic = -1; /* ABRT_diagnostic */
-static int hf_acse_ABRT_user_information = -1; /* Association_data */
+static int hf_acse_aBRT_user_information = -1; /* Association_data */
static int hf_acse_a_user_data = -1; /* User_Data */
-static int hf_acse_ACRQ_aSO_context_name = -1; /* T_aSO_context_name2 */
+static int hf_acse_aCRQ_aSO_context_name = -1; /* T_ACRQ_aSO_context_name */
static int hf_acse_user_information = -1; /* User_information */
-static int hf_acse_aSO_context_name = -1; /* T_aSO_context_name3 */
+static int hf_acse_aSO_context_name = -1; /* T_ACRP_aSO_context_name */
static int hf_acse_ap_title_form1 = -1; /* AP_title_form1 */
static int hf_acse_ap_title_form2 = -1; /* AP_title_form2 */
static int hf_acse_ap_title_form3 = -1; /* AP_title_form3 */
@@ -149,7 +149,7 @@ static int hf_acse_Default_Context_List_item = -1; /* Default_Context_List_item
static int hf_acse_abstract_syntax_name = -1; /* Abstract_syntax_name */
static int hf_acse_transfer_syntax_name = -1; /* TransferSyntaxName */
static int hf_acse_P_context_result_list_item = -1; /* P_context_result_list_item */
-static int hf_acse_Pcontext_result = -1; /* Result */
+static int hf_acse_pcontext_result = -1; /* Result */
static int hf_acse_concrete_syntax_name = -1; /* Concrete_syntax_name */
static int hf_acse_provider_reason = -1; /* T_provider_reason */
static int hf_acse_acse_service_user = -1; /* T_acse_service_user */
@@ -460,8 +460,8 @@ dissect_acse_T_AARQ_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, i
return offset;
}
-static int dissect_AARQ_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_T_AARQ_protocol_version(TRUE, tvb, offset, pinfo, tree, hf_acse_AARQ_protocol_version);
+static int dissect_aARQ_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_T_AARQ_protocol_version(TRUE, tvb, offset, pinfo, tree, hf_acse_aARQ_protocol_version);
}
@@ -480,15 +480,15 @@ static int dissect_ASO_context_name_list_item(packet_info *pinfo, proto_tree *tr
static int
-dissect_acse_T_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_acse_T_AARQ_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
hf_index, object_identifier_id);
return offset;
}
-static int dissect_AARQ_aSO_context_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_T_aSO_context_name(FALSE, tvb, offset, pinfo, tree, hf_acse_AARQ_aSO_context_name);
+static int dissect_aARQ_aSO_context_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_T_AARQ_aSO_context_name(FALSE, tvb, offset, pinfo, tree, hf_acse_aARQ_aSO_context_name);
}
@@ -1078,26 +1078,26 @@ dissect_acse_Association_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
return offset;
}
-static int dissect_AARQ_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_AARQ_user_information);
+static int dissect_aARQ_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_aARQ_user_information);
}
-static int dissect_AARE_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_AARE_user_information);
+static int dissect_aARE_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_aARE_user_information);
}
-static int dissect_RLRQ_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_RLRQ_user_information);
+static int dissect_rLRQ_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRQ_user_information);
}
-static int dissect_RLRE_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_RLRE_user_information);
+static int dissect_rLRE_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRE_user_information);
}
-static int dissect_ABRT_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_ABRT_user_information);
+static int dissect_aBRT_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_aBRT_user_information);
}
static const ber_sequence_t AARQ_apdu_sequence[] = {
- { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_AARQ_protocol_version_impl },
- { BER_CLASS_CON, 1, 0, dissect_AARQ_aSO_context_name },
+ { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARQ_protocol_version_impl },
+ { BER_CLASS_CON, 1, 0, dissect_aARQ_aSO_context_name },
{ BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_called_AP_title },
{ BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_called_AE_qualifier },
{ BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_called_AP_invocation_identifier },
@@ -1114,7 +1114,7 @@ static const ber_sequence_t AARQ_apdu_sequence[] = {
{ BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_p_context_definition_list },
{ BER_CLASS_CON, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_asoi_tag_impl },
{ BER_CLASS_CON, 16, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_asoi_tag_impl },
- { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_AARQ_user_information_impl },
+ { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARQ_user_information_impl },
{ 0, 0, 0, NULL }
};
@@ -1143,22 +1143,22 @@ dissect_acse_T_AARE_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, i
return offset;
}
-static int dissect_AARE_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_T_AARE_protocol_version(TRUE, tvb, offset, pinfo, tree, hf_acse_AARE_protocol_version);
+static int dissect_aARE_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_T_AARE_protocol_version(TRUE, tvb, offset, pinfo, tree, hf_acse_aARE_protocol_version);
}
static int
-dissect_acse_T_aSO_context_name1(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_acse_T_AARE_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
hf_index, object_identifier_id);
return offset;
}
-static int dissect_AARE_aSO_context_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_T_aSO_context_name1(FALSE, tvb, offset, pinfo, tree, hf_acse_AARE_aSO_context_name);
+static int dissect_aARE_aSO_context_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_T_AARE_aSO_context_name(FALSE, tvb, offset, pinfo, tree, hf_acse_aARE_aSO_context_name);
}
@@ -1177,8 +1177,8 @@ dissect_acse_Associate_result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
return offset;
}
-static int dissect_AARE_result(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Associate_result(FALSE, tvb, offset, pinfo, tree, hf_acse_AARE_result);
+static int dissect_aARE_result(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Associate_result(FALSE, tvb, offset, pinfo, tree, hf_acse_aARE_result);
}
@@ -1274,8 +1274,8 @@ dissect_acse_Result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet
return offset;
}
-static int dissect_Pcontext_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Result(TRUE, tvb, offset, pinfo, tree, hf_acse_Pcontext_result);
+static int dissect_pcontext_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Result(TRUE, tvb, offset, pinfo, tree, hf_acse_pcontext_result);
}
@@ -1313,7 +1313,7 @@ static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tv
static const ber_sequence_t P_context_result_list_item_sequence[] = {
- { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_Pcontext_result_impl },
+ { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pcontext_result_impl },
{ BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_concrete_syntax_name_impl },
{ BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
{ 0, 0, 0, NULL }
@@ -1348,9 +1348,9 @@ static int dissect_p_context_result_list_impl(packet_info *pinfo, proto_tree *tr
static const ber_sequence_t AARE_apdu_sequence[] = {
- { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_AARE_protocol_version_impl },
- { BER_CLASS_CON, 1, 0, dissect_AARE_aSO_context_name },
- { BER_CLASS_CON, 2, 0, dissect_AARE_result },
+ { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARE_protocol_version_impl },
+ { BER_CLASS_CON, 1, 0, dissect_aARE_aSO_context_name },
+ { BER_CLASS_CON, 2, 0, dissect_aARE_result },
{ BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_result_source_diagnostic },
{ BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_responding_AP_title },
{ BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_responding_AE_qualifier },
@@ -1364,7 +1364,7 @@ static const ber_sequence_t AARE_apdu_sequence[] = {
{ BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p_context_result_list_impl },
{ BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_asoi_tag_impl },
{ BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_asoi_tag_impl },
- { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_AARE_user_information_impl },
+ { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARE_user_information_impl },
{ 0, 0, 0, NULL }
};
@@ -1395,16 +1395,16 @@ dissect_acse_Release_request_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, in
return offset;
}
-static int dissect_RLRQ_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Release_request_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_RLRQ_reason);
+static int dissect_rLRQ_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Release_request_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRQ_reason);
}
static const ber_sequence_t RLRQ_apdu_sequence[] = {
- { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_RLRQ_reason_impl },
+ { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRQ_reason_impl },
{ BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
{ BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
- { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_RLRQ_user_information_impl },
+ { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRQ_user_information_impl },
{ 0, 0, 0, NULL }
};
@@ -1435,16 +1435,16 @@ dissect_acse_Release_response_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, i
return offset;
}
-static int dissect_RLRE_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_Release_response_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_RLRE_reason);
+static int dissect_rLRE_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_Release_response_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRE_reason);
}
static const ber_sequence_t RLRE_apdu_sequence[] = {
- { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_RLRE_reason_impl },
+ { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRE_reason_impl },
{ BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
{ BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
- { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_RLRE_user_information_impl },
+ { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRE_user_information_impl },
{ 0, 0, 0, NULL }
};
@@ -1507,7 +1507,7 @@ static const ber_sequence_t ABRT_apdu_sequence[] = {
{ BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_abort_diagnostic_impl },
{ BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
{ BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
- { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_ABRT_user_information_impl },
+ { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aBRT_user_information_impl },
{ 0, 0, 0, NULL }
};
@@ -1658,22 +1658,22 @@ static int dissect_adt_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
static int
-dissect_acse_T_aSO_context_name2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_acse_T_ACRQ_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
hf_index, object_identifier_id);
return offset;
}
-static int dissect_ACRQ_aSO_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_T_aSO_context_name2(TRUE, tvb, offset, pinfo, tree, hf_acse_ACRQ_aSO_context_name);
+static int dissect_aCRQ_aSO_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_acse_T_ACRQ_aSO_context_name(TRUE, tvb, offset, pinfo, tree, hf_acse_aCRQ_aSO_context_name);
}
static const ber_sequence_t ACRQ_apdu_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
{ BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
- { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_ACRQ_aSO_context_name_impl },
+ { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aCRQ_aSO_context_name_impl },
{ BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aSO_context_name_list_impl },
{ BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_p_context_definition_list },
{ BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_information_impl },
@@ -1694,7 +1694,7 @@ static int dissect_acrq_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb
static int
-dissect_acse_T_aSO_context_name3(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_acse_T_ACRP_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
hf_index, object_identifier_id);
@@ -1702,7 +1702,7 @@ dissect_acse_T_aSO_context_name3(gboolean implicit_tag _U_, tvbuff_t *tvb, int o
return offset;
}
static int dissect_aSO_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_acse_T_aSO_context_name3(TRUE, tvb, offset, pinfo, tree, hf_acse_aSO_context_name);
+ return dissect_acse_T_ACRP_aSO_context_name(TRUE, tvb, offset, pinfo, tree, hf_acse_aSO_context_name);
}
@@ -1874,11 +1874,11 @@ 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);
@@ -1917,7 +1917,7 @@ 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 */
+ 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.
@@ -1997,11 +1997,11 @@ void proto_register_acse(void) {
{ "acrp", "acse.acrp",
FT_NONE, BASE_NONE, NULL, 0,
"ACSE-apdu/acrp", HFILL }},
- { &hf_acse_AARQ_protocol_version,
+ { &hf_acse_aARQ_protocol_version,
{ "protocol-version", "acse.protocol_version",
FT_BYTES, BASE_HEX, NULL, 0,
"AARQ-apdu/protocol-version", HFILL }},
- { &hf_acse_AARQ_aSO_context_name,
+ { &hf_acse_aARQ_aSO_context_name,
{ "aSO-context-name", "acse.aSO_context_name",
FT_STRING, BASE_NONE, NULL, 0,
"AARQ-apdu/aSO-context-name", HFILL }},
@@ -2069,19 +2069,19 @@ void proto_register_acse(void) {
{ "calling-asoi-tag", "acse.calling_asoi_tag",
FT_UINT32, BASE_DEC, NULL, 0,
"", HFILL }},
- { &hf_acse_AARQ_user_information,
+ { &hf_acse_aARQ_user_information,
{ "user-information", "acse.user_information",
FT_UINT32, BASE_DEC, NULL, 0,
"AARQ-apdu/user-information", HFILL }},
- { &hf_acse_AARE_protocol_version,
+ { &hf_acse_aARE_protocol_version,
{ "protocol-version", "acse.protocol_version",
FT_BYTES, BASE_HEX, NULL, 0,
"AARE-apdu/protocol-version", HFILL }},
- { &hf_acse_AARE_aSO_context_name,
+ { &hf_acse_aARE_aSO_context_name,
{ "aSO-context-name", "acse.aSO_context_name",
FT_STRING, BASE_NONE, NULL, 0,
"AARE-apdu/aSO-context-name", HFILL }},
- { &hf_acse_AARE_result,
+ { &hf_acse_aARE_result,
{ "result", "acse.result",
FT_UINT32, BASE_DEC, VALS(acse_Associate_result_vals), 0,
"AARE-apdu/result", HFILL }},
@@ -2117,11 +2117,11 @@ void proto_register_acse(void) {
{ "p-context-result-list", "acse.p_context_result_list",
FT_UINT32, BASE_DEC, NULL, 0,
"", HFILL }},
- { &hf_acse_AARE_user_information,
+ { &hf_acse_aARE_user_information,
{ "user-information", "acse.user_information",
FT_UINT32, BASE_DEC, NULL, 0,
"AARE-apdu/user-information", HFILL }},
- { &hf_acse_RLRQ_reason,
+ { &hf_acse_rLRQ_reason,
{ "reason", "acse.reason",
FT_INT32, BASE_DEC, VALS(acse_Release_request_reason_vals), 0,
"RLRQ-apdu/reason", HFILL }},
@@ -2133,15 +2133,15 @@ void proto_register_acse(void) {
{ "asoi-identifier", "acse.asoi_identifier",
FT_UINT32, BASE_DEC, NULL, 0,
"", HFILL }},
- { &hf_acse_RLRQ_user_information,
+ { &hf_acse_rLRQ_user_information,
{ "user-information", "acse.user_information",
FT_UINT32, BASE_DEC, NULL, 0,
"RLRQ-apdu/user-information", HFILL }},
- { &hf_acse_RLRE_reason,
+ { &hf_acse_rLRE_reason,
{ "reason", "acse.reason",
FT_INT32, BASE_DEC, VALS(acse_Release_response_reason_vals), 0,
"RLRE-apdu/reason", HFILL }},
- { &hf_acse_RLRE_user_information,
+ { &hf_acse_rLRE_user_information,
{ "user-information", "acse.user_information",
FT_UINT32, BASE_DEC, NULL, 0,
"RLRE-apdu/user-information", HFILL }},
@@ -2153,7 +2153,7 @@ void proto_register_acse(void) {
{ "abort-diagnostic", "acse.abort_diagnostic",
FT_UINT32, BASE_DEC, VALS(acse_ABRT_diagnostic_vals), 0,
"ABRT-apdu/abort-diagnostic", HFILL }},
- { &hf_acse_ABRT_user_information,
+ { &hf_acse_aBRT_user_information,
{ "user-information", "acse.user_information",
FT_UINT32, BASE_DEC, NULL, 0,
"ABRT-apdu/user-information", HFILL }},
@@ -2161,7 +2161,7 @@ void proto_register_acse(void) {
{ "a-user-data", "acse.a_user_data",
FT_UINT32, BASE_DEC, VALS(acse_User_Data_vals), 0,
"A-DT-apdu/a-user-data", HFILL }},
- { &hf_acse_ACRQ_aSO_context_name,
+ { &hf_acse_aCRQ_aSO_context_name,
{ "aSO-context-name", "acse.aSO_context_name",
FT_STRING, BASE_NONE, NULL, 0,
"ACRQ-apdu/aSO-context-name", HFILL }},
@@ -2265,7 +2265,7 @@ void proto_register_acse(void) {
{ "Item", "acse.P_context_result_list_item",
FT_NONE, BASE_NONE, NULL, 0,
"P-context-result-list/_item", HFILL }},
- { &hf_acse_Pcontext_result,
+ { &hf_acse_pcontext_result,
{ "result", "acse.result",
FT_INT32, BASE_DEC, VALS(acse_Result_vals), 0,
"P-context-result-list/_item/result", HFILL }},
@@ -2423,10 +2423,7 @@ void proto_register_acse(void) {
/*--- proto_reg_handoff_acse -------------------------------------------*/
void proto_reg_handoff_acse(void) {
/*#include "packet-acse-dis-tab.c"*/
-
- register_ber_oid_name("2.2.3.1.1","aCSE-id");
- register_ber_oid_name("2.2.1.0.1","acse-as-id");
-
-
+ register_ber_oid_dissector("2.2.3.1.1", dissect_acse, proto_acse, "acse");
+ register_ber_oid_dissector("2.2.1.0.1", dissect_acse, proto_acse, "acse-as-id");
}
diff --git a/epan/dissectors/packet-cmip.c b/epan/dissectors/packet-cmip.c
index 5da2467896..a146f34a07 100644
--- a/epan/dissectors/packet-cmip.c
+++ b/epan/dissectors/packet-cmip.c
@@ -3623,6 +3623,7 @@ void proto_register_cmip(void) {
/*--- proto_reg_handoff_cmip -------------------------------------------*/
void proto_reg_handoff_cmip(void) {
register_ber_oid_dissector("2.9.0.0.2", dissect_cmip, proto_cmip, "cmip");
+ register_ber_oid_dissector("2.9.1.1.4", dissect_cmip, proto_cmip, "joint-iso-itu-t(2) ms(9) cmip(1) cmip-pci(1) abstractSyntax(4)");
register_ber_oid_dissector("2.9.3.2.7.35", dissect_cmip_attribute_35, proto_cmip, "smi2AttributeID (7) operationalState(35)");
register_ber_oid_dissector("2.9.3.2.7.55", dissect_cmip_attribute_55, proto_cmip, "smi2AttributeID (7) destination(55)");
register_ber_oid_dissector("2.9.3.2.7.56", dissect_cmip_attribute_56, proto_cmip, "smi2AttributeID (7) discriminatorConstruct(56)");
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index 986571ff35..7c7fae2677 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-pres.c */
+/* .\packet-pres.c */
/* ../../tools/asn2eth.py -X -b -e -p pres -c pres.cnf -s packet-pres-template ISO8823-PRESENTATION.asn */
/* Input file: packet-pres-template.c */
@@ -38,6 +38,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
+#include <epan/emem.h>
#include <stdio.h>
#include <string.h>
@@ -63,6 +64,17 @@ packet_info *global_pinfo = NULL;
static dissector_handle_t data_handle;
static dissector_handle_t acse_handle;
+static char abstract_syntax_name_oid[BER_MAX_OID_STR_LEN];
+static guint32 presentation_context_identifier;
+
+/* to keep track of presentation context identifiers and protocol-oids */
+typedef struct _pres_ctx_oid_t {
+ /* XXX here we should keep track of ADDRESS/PORT as well */
+ guint32 ctx_id;
+ char *oid;
+} pres_ctx_oid_t;
+static GHashTable *pres_ctx_oid_table = NULL;
+
/*--- Included file: packet-pres-hf.c ---*/
@@ -98,21 +110,21 @@ static int hf_pres_protocol_options = -1; /* Protocol_options */
static int hf_pres_initiators_nominated_context = -1; /* Presentation_context_identifier */
static int hf_pres_extensions = -1; /* T_extensions */
static int hf_pres_user_data = -1; /* User_data */
-static int hf_pres_x410_mode_parameters1 = -1; /* RTOACapdu */
-static int hf_pres_normal_mode_parameters1 = -1; /* T_normal_mode_parameters1 */
+static int hf_pres_cPR_PPDU_x400_mode_parameters = -1; /* RTOACapdu */
+static int hf_pres_cPU_PPDU_normal_mode_parameters = -1; /* T_CPA_PPDU_normal_mode_parameters */
static int hf_pres_responding_presentation_selector = -1; /* Responding_presentation_selector */
static int hf_pres_presentation_context_definition_result_list = -1; /* Presentation_context_definition_result_list */
static int hf_pres_responders_nominated_context = -1; /* Presentation_context_identifier */
-static int hf_pres_x400_mode_parameters = -1; /* RTORJapdu */
-static int hf_pres_normal_mode_parameters2 = -1; /* T_normal_mode_parameters2 */
+static int hf_pres_cPU_PPDU_x400_mode_parameters = -1; /* RTORJapdu */
+static int hf_pres_cPR_PPDU_normal_mode_parameters = -1; /* T_CPR_PPDU_normal_mode_parameters */
static int hf_pres_default_context_result = -1; /* Default_context_result */
-static int hf_pres_provider_reason = -1; /* Provider_reason */
+static int hf_pres_cPR_PPDU__provider_reason = -1; /* Provider_reason */
static int hf_pres_aru_ppdu = -1; /* ARU_PPDU */
static int hf_pres_arp_ppdu = -1; /* ARP_PPDU */
-static int hf_pres_x400_mode_parameters1 = -1; /* RTABapdu */
-static int hf_pres_normal_mode_parameters3 = -1; /* T_normal_mode_parameters3 */
+static int hf_pres_aRU_PPDU_x400_mode_parameters = -1; /* RTABapdu */
+static int hf_pres_aRU_PPDU_normal_mode_parameters = -1; /* T_ARU_PPDU_normal_mode_parameters */
static int hf_pres_presentation_context_identifier_list = -1; /* Presentation_context_identifier_list */
-static int hf_pres_provider_reason1 = -1; /* Abort_reason */
+static int hf_pres_aRU_PPDU_provider_reason = -1; /* Abort_reason */
static int hf_pres_event_identifier = -1; /* Event_identifier */
static int hf_pres_acPPDU = -1; /* AC_PPDU */
static int hf_pres_acaPPDU = -1; /* ACA_PPDU */
@@ -133,7 +145,7 @@ static int hf_pres_Presentation_context_deletion_result_list_item = -1; /* Pres
static int hf_pres_Presentation_context_identifier_list_item = -1; /* Presentation_context_identifier_list_item */
static int hf_pres_Result_list_item = -1; /* Result_list_item */
static int hf_pres_result = -1; /* Result */
-static int hf_pres_provider_reason2 = -1; /* T_provider_reason */
+static int hf_pres_provider_reason = -1; /* T_provider_reason */
static int hf_pres_simply_encoded_data = -1; /* Simply_encoded_data */
static int hf_pres_fully_encoded_data = -1; /* Fully_encoded_data */
static int hf_pres_Fully_encoded_data_item = -1; /* PDV_list */
@@ -182,12 +194,12 @@ static gint ett_pres_CP_type = -1;
static gint ett_pres_T_normal_mode_parameters = -1;
static gint ett_pres_T_extensions = -1;
static gint ett_pres_CPA_PPDU = -1;
-static gint ett_pres_T_normal_mode_parameters1 = -1;
+static gint ett_pres_T_CPA_PPDU_normal_mode_parameters = -1;
static gint ett_pres_CPR_PPDU = -1;
-static gint ett_pres_T_normal_mode_parameters2 = -1;
+static gint ett_pres_T_CPR_PPDU_normal_mode_parameters = -1;
static gint ett_pres_Abort_type = -1;
static gint ett_pres_ARU_PPDU = -1;
-static gint ett_pres_T_normal_mode_parameters3 = -1;
+static gint ett_pres_T_ARU_PPDU_normal_mode_parameters = -1;
static gint ett_pres_ARP_PPDU = -1;
static gint ett_pres_Typed_data_type = -1;
static gint ett_pres_AC_PPDU = -1;
@@ -218,6 +230,62 @@ static gint ett_pres_User_session_requirements = -1;
+static guint
+pres_ctx_oid_hash(gconstpointer k)
+{
+ pres_ctx_oid_t *aco=(pres_ctx_oid_t *)k;
+ return aco->ctx_id;
+}
+/* XXX this one should be made ADDRESS/PORT aware */
+static gint
+pres_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
+{
+ pres_ctx_oid_t *aco1=(pres_ctx_oid_t *)k1;
+ pres_ctx_oid_t *aco2=(pres_ctx_oid_t *)k2;
+ return aco1->ctx_id==aco2->ctx_id;
+}
+
+static void
+pres_init(void)
+{
+ if( pres_ctx_oid_table ){
+ g_hash_table_destroy(pres_ctx_oid_table);
+ pres_ctx_oid_table = NULL;
+ }
+ pres_ctx_oid_table = g_hash_table_new(pres_ctx_oid_hash,
+ pres_ctx_oid_equal);
+
+}
+
+static void
+register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid)
+{
+ pres_ctx_oid_t *aco, *tmpaco;
+ aco=se_alloc(sizeof(pres_ctx_oid_t));
+ aco->ctx_id=idx;
+ aco->oid=se_strdup(oid);
+
+ /* if this ctx already exists, remove the old one first */
+ tmpaco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, aco);
+ if(tmpaco){
+ g_hash_table_remove(pres_ctx_oid_table, tmpaco);
+ }
+ g_hash_table_insert(pres_ctx_oid_table, aco, aco);
+}
+static char *
+find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx)
+{
+ pres_ctx_oid_t aco, *tmpaco;
+ aco.ctx_id=idx;
+ tmpaco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, &aco);
+ if(tmpaco){
+ return tmpaco->oid;
+ }
+ return NULL;
+}
+
+
+
/*--- Included file: packet-pres-fn.c ---*/
/*--- Fields for imported types ---*/
@@ -446,8 +514,8 @@ dissect_pres_RTOACapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
return offset;
}
-static int dissect_x410_mode_parameters1_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_RTOACapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_x410_mode_parameters1);
+static int dissect_cPR_PPDU_x400_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_RTOACapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_x400_mode_parameters);
}
@@ -485,8 +553,8 @@ dissect_pres_RTORJapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
return offset;
}
-static int dissect_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_RTORJapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_x400_mode_parameters);
+static int dissect_cPU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_RTORJapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_x400_mode_parameters);
}
@@ -546,8 +614,8 @@ dissect_pres_RTABapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pack
return offset;
}
-static int dissect_x400_mode_parameters1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_RTABapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_x400_mode_parameters1);
+static int dissect_aRU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_RTABapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_x400_mode_parameters);
}
@@ -643,7 +711,7 @@ static int dissect_called_presentation_selector_impl(packet_info *pinfo, proto_t
static int
dissect_pres_Presentation_context_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &presentation_context_identifier);
return offset;
}
@@ -665,7 +733,7 @@ static int dissect_Presentation_context_deletion_list_item(packet_info *pinfo, p
static int
dissect_pres_Abstract_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ abstract_syntax_name_oid);
return offset;
}
@@ -724,6 +792,7 @@ dissect_pres_Context_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int off
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Context_list_item_sequence, hf_index, ett_pres_Context_list_item);
+ register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
return offset;
}
static int dissect_Context_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -877,17 +946,21 @@ static int
dissect_pres_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
tvbuff_t *next_tvb;
+ char *oid;
- if(!acse_handle){
- offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
-
- }else{
+ oid=find_oid_by_ctx_id(pinfo, presentation_context_identifier);
+ if(oid){
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
- call_dissector(acse_handle, next_tvb, pinfo, global_tree);
+ call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
+ } else {
+ proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
+ offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ NULL);
+
}
+
return offset;
}
static int dissect_single_ASN1_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1085,15 +1158,15 @@ dissect_pres_T_provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int off
return offset;
}
-static int dissect_provider_reason2_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_T_provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason2);
+static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_T_provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason);
}
static const ber_sequence_t Result_list_item_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_result_impl },
{ BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
- { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason2_impl },
+ { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
{ 0, 0, 0, NULL }
};
@@ -1134,7 +1207,7 @@ static int dissect_presentation_context_definition_result_list_impl(packet_info
}
-static const ber_sequence_t T_normal_mode_parameters1_sequence[] = {
+static const ber_sequence_t T_CPA_PPDU_normal_mode_parameters_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
{ BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
{ BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
@@ -1147,21 +1220,21 @@ static const ber_sequence_t T_normal_mode_parameters1_sequence[] = {
};
static int
-dissect_pres_T_normal_mode_parameters1(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_pres_T_CPA_PPDU_normal_mode_parameters(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,
- T_normal_mode_parameters1_sequence, hf_index, ett_pres_T_normal_mode_parameters1);
+ T_CPA_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPA_PPDU_normal_mode_parameters);
return offset;
}
-static int dissect_normal_mode_parameters1_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_T_normal_mode_parameters1(TRUE, tvb, offset, pinfo, tree, hf_pres_normal_mode_parameters1);
+static int dissect_cPU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_T_CPA_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_normal_mode_parameters);
}
static const ber_sequence_t CPA_PPDU_set[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
- { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x410_mode_parameters1_impl },
- { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_normal_mode_parameters1_impl },
+ { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU_x400_mode_parameters_impl },
+ { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPU_PPDU_normal_mode_parameters_impl },
{ 0, 0, 0, NULL }
};
@@ -1206,30 +1279,30 @@ dissect_pres_Provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offse
return offset;
}
-static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_Provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason);
+static int dissect_cPR_PPDU__provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_Provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU__provider_reason);
}
-static const ber_sequence_t T_normal_mode_parameters2_sequence[] = {
+static const ber_sequence_t T_CPR_PPDU_normal_mode_parameters_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
{ BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
{ BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
{ BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_result_impl },
- { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
+ { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU__provider_reason_impl },
{ BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
{ 0, 0, 0, NULL }
};
static int
-dissect_pres_T_normal_mode_parameters2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_pres_T_CPR_PPDU_normal_mode_parameters(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,
- T_normal_mode_parameters2_sequence, hf_index, ett_pres_T_normal_mode_parameters2);
+ T_CPR_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPR_PPDU_normal_mode_parameters);
return offset;
}
-static int dissect_normal_mode_parameters2(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_T_normal_mode_parameters2(FALSE, tvb, offset, pinfo, tree, hf_pres_normal_mode_parameters2);
+static int dissect_cPR_PPDU_normal_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_T_CPR_PPDU_normal_mode_parameters(FALSE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_normal_mode_parameters);
}
@@ -1240,8 +1313,8 @@ static const value_string pres_CPR_PPDU_vals[] = {
};
static const ber_choice_t CPR_PPDU_choice[] = {
- { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_x400_mode_parameters },
- { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_normal_mode_parameters2 },
+ { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_cPU_PPDU_x400_mode_parameters },
+ { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cPR_PPDU_normal_mode_parameters },
{ 0, 0, 0, 0, NULL }
};
@@ -1289,21 +1362,21 @@ static int dissect_presentation_context_identifier_list_impl(packet_info *pinfo,
}
-static const ber_sequence_t T_normal_mode_parameters3_sequence[] = {
+static const ber_sequence_t T_ARU_PPDU_normal_mode_parameters_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
{ BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
{ 0, 0, 0, NULL }
};
static int
-dissect_pres_T_normal_mode_parameters3(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+dissect_pres_T_ARU_PPDU_normal_mode_parameters(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,
- T_normal_mode_parameters3_sequence, hf_index, ett_pres_T_normal_mode_parameters3);
+ T_ARU_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_ARU_PPDU_normal_mode_parameters);
return offset;
}
-static int dissect_normal_mode_parameters3_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_T_normal_mode_parameters3(TRUE, tvb, offset, pinfo, tree, hf_pres_normal_mode_parameters3);
+static int dissect_aRU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_T_ARU_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_normal_mode_parameters);
}
@@ -1314,8 +1387,8 @@ static const value_string pres_ARU_PPDU_vals[] = {
};
static const ber_choice_t ARU_PPDU_choice[] = {
- { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_x400_mode_parameters1 },
- { 1, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_normal_mode_parameters3_impl },
+ { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_aRU_PPDU_x400_mode_parameters },
+ { 1, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_normal_mode_parameters_impl },
{ 0, 0, 0, 0, NULL }
};
@@ -1351,8 +1424,8 @@ dissect_pres_Abort_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
return offset;
}
-static int dissect_provider_reason1_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_pres_Abort_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason1);
+static int dissect_aRU_PPDU_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_pres_Abort_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_provider_reason);
}
@@ -1407,7 +1480,7 @@ static int dissect_event_identifier_impl(packet_info *pinfo, proto_tree *tree, t
static const ber_sequence_t ARP_PPDU_sequence[] = {
- { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason1_impl },
+ { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_provider_reason_impl },
{ BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_event_identifier_impl },
{ 0, 0, 0, NULL }
};
@@ -1616,6 +1689,7 @@ dissect_pres_RSA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pack
/*--- End of included file: packet-pres-fn.c ---*/
+
/*
* Dissect an PPDU.
*/
@@ -1626,43 +1700,35 @@ dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
proto_tree *pres_tree = NULL;
guint s_type;
/* do we have spdu type from the session dissector? */
- if( !pinfo->private_data )
- {
- if(tree)
- {
- proto_tree_add_text(tree, tvb, offset, -1,
- "Internal error:can't get spdu type from session dissector.");
- return FALSE;
- }
- }
- else
- {
- session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
- if(session->spdu_type == 0 )
- {
- if(tree)
- {
- proto_tree_add_text(tree, tvb, offset, -1,
- "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
- return FALSE;
- }
- }
- }
+ if( !pinfo->private_data ){
+ if(tree){
+ proto_tree_add_text(tree, tvb, offset, -1,
+ "Internal error:can't get spdu type from session dissector.");
+ return FALSE;
+ }
+ }else{
+ session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
+ if(session->spdu_type == 0 ){
+ if(tree){
+ proto_tree_add_text(tree, tvb, offset, -1,
+ "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
+ return FALSE;
+ }
+ }
+ }
/* get type of tag */
s_type = tvb_get_guint8(tvb, offset);
/* set up type of Ppdu */
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(session->spdu_type, ses_vals, "Unknown Ppdu type (0x%02x)"));
- if (tree)
- {
- ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
+ if (tree){
+ ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
FALSE);
- pres_tree = proto_item_add_subtree(ti, ett_pres);
- }
+ pres_tree = proto_item_add_subtree(ti, ett_pres);
+ }
- switch(session->spdu_type)
- {
+ switch(session->spdu_type){
case SES_REFUSE:
break;
case SES_CONNECTION_REQUEST:
@@ -1855,11 +1921,11 @@ void proto_register_pres(void) {
{ "user-data", "pres.user_data",
FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
"", HFILL }},
- { &hf_pres_x410_mode_parameters1,
+ { &hf_pres_cPR_PPDU_x400_mode_parameters,
{ "x410-mode-parameters", "pres.x410_mode_parameters",
FT_NONE, BASE_NONE, NULL, 0,
"CPA-PPDU/x410-mode-parameters", HFILL }},
- { &hf_pres_normal_mode_parameters1,
+ { &hf_pres_cPU_PPDU_normal_mode_parameters,
{ "normal-mode-parameters", "pres.normal_mode_parameters",
FT_NONE, BASE_NONE, NULL, 0,
"CPA-PPDU/normal-mode-parameters", HFILL }},
@@ -1875,11 +1941,11 @@ void proto_register_pres(void) {
{ "responders-nominated-context", "pres.responders_nominated_context",
FT_INT32, BASE_DEC, NULL, 0,
"CPA-PPDU/normal-mode-parameters/responders-nominated-context", HFILL }},
- { &hf_pres_x400_mode_parameters,
+ { &hf_pres_cPU_PPDU_x400_mode_parameters,
{ "x400-mode-parameters", "pres.x400_mode_parameters",
FT_NONE, BASE_NONE, NULL, 0,
"CPR-PPDU/x400-mode-parameters", HFILL }},
- { &hf_pres_normal_mode_parameters2,
+ { &hf_pres_cPR_PPDU_normal_mode_parameters,
{ "normal-mode-parameters", "pres.normal_mode_parameters",
FT_NONE, BASE_NONE, NULL, 0,
"CPR-PPDU/normal-mode-parameters", HFILL }},
@@ -1887,7 +1953,7 @@ void proto_register_pres(void) {
{ "default-context-result", "pres.default_context_result",
FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
"CPR-PPDU/normal-mode-parameters/default-context-result", HFILL }},
- { &hf_pres_provider_reason,
+ { &hf_pres_cPR_PPDU__provider_reason,
{ "provider-reason", "pres.provider_reason",
FT_INT32, BASE_DEC, VALS(pres_Provider_reason_vals), 0,
"CPR-PPDU/normal-mode-parameters/provider-reason", HFILL }},
@@ -1899,11 +1965,11 @@ void proto_register_pres(void) {
{ "arp-ppdu", "pres.arp_ppdu",
FT_NONE, BASE_NONE, NULL, 0,
"Abort-type/arp-ppdu", HFILL }},
- { &hf_pres_x400_mode_parameters1,
+ { &hf_pres_aRU_PPDU_x400_mode_parameters,
{ "x400-mode-parameters", "pres.x400_mode_parameters",
FT_NONE, BASE_NONE, NULL, 0,
"ARU-PPDU/x400-mode-parameters", HFILL }},
- { &hf_pres_normal_mode_parameters3,
+ { &hf_pres_aRU_PPDU_normal_mode_parameters,
{ "normal-mode-parameters", "pres.normal_mode_parameters",
FT_NONE, BASE_NONE, NULL, 0,
"ARU-PPDU/normal-mode-parameters", HFILL }},
@@ -1911,7 +1977,7 @@ void proto_register_pres(void) {
{ "presentation-context-identifier-list", "pres.presentation_context_identifier_list",
FT_UINT32, BASE_DEC, NULL, 0,
"", HFILL }},
- { &hf_pres_provider_reason1,
+ { &hf_pres_aRU_PPDU_provider_reason,
{ "provider-reason", "pres.provider_reason",
FT_INT32, BASE_DEC, VALS(pres_Abort_reason_vals), 0,
"ARP-PPDU/provider-reason", HFILL }},
@@ -1995,7 +2061,7 @@ void proto_register_pres(void) {
{ "result", "pres.result",
FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
"Result-list/_item/result", HFILL }},
- { &hf_pres_provider_reason2,
+ { &hf_pres_provider_reason,
{ "provider-reason", "pres.provider_reason",
FT_INT32, BASE_DEC, VALS(pres_T_provider_reason_vals), 0,
"Result-list/_item/provider-reason", HFILL }},
@@ -2125,12 +2191,12 @@ void proto_register_pres(void) {
&ett_pres_T_normal_mode_parameters,
&ett_pres_T_extensions,
&ett_pres_CPA_PPDU,
- &ett_pres_T_normal_mode_parameters1,
+ &ett_pres_T_CPA_PPDU_normal_mode_parameters,
&ett_pres_CPR_PPDU,
- &ett_pres_T_normal_mode_parameters2,
+ &ett_pres_T_CPR_PPDU_normal_mode_parameters,
&ett_pres_Abort_type,
&ett_pres_ARU_PPDU,
- &ett_pres_T_normal_mode_parameters3,
+ &ett_pres_T_ARU_PPDU_normal_mode_parameters,
&ett_pres_ARP_PPDU,
&ett_pres_Typed_data_type,
&ett_pres_AC_PPDU,
@@ -2167,6 +2233,7 @@ void proto_register_pres(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_pres, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ register_init_routine(pres_init);
}
diff --git a/epan/dissectors/packet-pres.h b/epan/dissectors/packet-pres.h
index 1956ea8ada..b1b35692e6 100644
--- a/epan/dissectors/packet-pres.h
+++ b/epan/dissectors/packet-pres.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-pres.h */
+/* .\packet-pres.h */
/* ../../tools/asn2eth.py -X -b -e -p pres -c pres.cnf -s packet-pres-template ISO8823-PRESENTATION.asn */
/* Input file: packet-pres-template.h */