aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-09-04 21:46:41 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-09-04 21:46:41 +0000
commit6e948358486a265c3ce7f5438159e5a622305543 (patch)
tree48b15e5b32d1e9042c61f105d0aae93d36a057c4
parentb3521c5975cd4fe04b3be3b354e8769daf3f5d7c (diff)
Rewrote handling of parameters to get rid of "funky" oid strings.
Added expert info for unknown binding-parameters. svn path=/trunk/; revision=22786
-rw-r--r--asn1/disp/disp.cnf10
-rw-r--r--asn1/dop/dop.cnf54
-rw-r--r--asn1/dop/packet-dop-template.c29
-rw-r--r--epan/dissectors/packet-disp.c10
-rw-r--r--epan/dissectors/packet-dop.c91
5 files changed, 118 insertions, 76 deletions
diff --git a/asn1/disp/disp.cnf b/asn1/disp/disp.cnf
index 60f1839262..1f72c221d9 100644
--- a/asn1/disp/disp.cnf
+++ b/asn1/disp/disp.cnf
@@ -26,11 +26,11 @@ Information/signedInformation/information information-data
#.REGISTER
-ShadowingAgreementInfo B "dop.agreement.2.5.19.1" "shadow-agreement"
-EstablishParameter B "dop.establish.rolea.2.5.19.1" "shadow-establish-rolea"
-EstablishParameter B "dop.establish.roleb.2.5.19.1" "shadow-establish-roleb"
-ModificationParameter B "dop.modify.rolea.2.5.19.1" "shadow-modify-rolea"
-ModificationParameter B "dop.modify.roleb.2.5.19.1" "shadow-modify-roleb"
+ShadowingAgreementInfo S dop.oid "agreement.2.5.19.1"
+EstablishParameter S dop.oid "establish.rolea.2.5.19.1"
+EstablishParameter S dop.oid "establish.roleb.2.5.19.1"
+ModificationParameter S dop.oid "modify.rolea.2.5.19.1"
+ModificationParameter S dop.oid "modify.roleb.2.5.19.1"
diff --git a/asn1/dop/dop.cnf b/asn1/dop/dop.cnf
index 77a84c3474..be115c3165 100644
--- a/asn1/dop/dop.cnf
+++ b/asn1/dop/dop.cnf
@@ -71,17 +71,17 @@ SupplierInformation B "2.5.12.5" "id-doa-supplierKnowledge"
ConsumerInformation B "2.5.12.6" "id-doa-consumerKnowledge"
SupplierAndConsumers B "2.5.12.7" "id-doa-secondaryShadows"
-HierarchicalAgreement B "dop.agreement.2.5.19.2" "hierarchical-agreement"
-SuperiorToSubordinate B "dop.establish.rolea.2.5.19.2" "hierarchical-establish-rolea"
-SuperiorToSubordinateModification B "dop.modify.rolea.2.5.19.2" "hierarchical-modify-rolea"
-SubordinateToSuperior B "dop.establish.roleb.2.5.19.2" "hierarchical-establish-roleb"
-SubordinateToSuperior B "dop.modify.roleb.2.5.19.2" "hierarchical-modify-roleb"
-
-NonSpecificHierarchicalAgreement B "dop.agreement.2.5.19.3" "non-specific-hierarchical-agreement"
-NHOBSuperiorToSubordinate B "dop.establish.rolea.2.5.19.3" "non-specific-hierarchical-establish-rolea"
-NHOBSuperiorToSubordinate B "dop.modify.rolea.2.5.19.3" "non-specific-hierarchical-modify-rolea"
-NHOBSubordinateToSuperior B "dop.establish.roleb.2.5.19.3" "non-specific-hierarchical-establish-roleb"
-NHOBSubordinateToSuperior B "dop.modify.roleb.2.5.19.3" "non-specific-hierarchical-modify-roleb"
+HierarchicalAgreement S dop.oid "agreement.2.5.19.2"
+SuperiorToSubordinate S dop.oid "establish.rolea.2.5.19.2"
+SuperiorToSubordinateModification S dop.oid "modify.rolea.2.5.19.2"
+SubordinateToSuperior S dop.oid "establish.roleb.2.5.19.2"
+SubordinateToSuperior S dop.oid "modify.roleb.2.5.19.2"
+
+NonSpecificHierarchicalAgreement S dop.oid "agreement.2.5.19.3"
+NHOBSuperiorToSubordinate S dop.oid "establish.rolea.2.5.19.3"
+NHOBSuperiorToSubordinate S dop.oid "modify.rolea.2.5.19.3"
+NHOBSubordinateToSuperior S dop.oid "establish.roleb.2.5.19.3"
+NHOBSubordinateToSuperior S dop.oid "modify.roleb.2.5.19.3"
ACIItem B "2.5.24.4" "id-aca-prescriptiveACI"
ACIItem B "2.5.24.5" "id-aca-entryACI"
@@ -106,67 +106,67 @@ OpBindingErrorParam/bindingType BindingType
#.FN_BODY EstablishOperationalBindingArgumentData/initiator/symmetric
- offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
#.FN_BODY EstablishOperationalBindingArgumentData/initiator/roleA-initiates
- offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
#.FN_BODY EstablishOperationalBindingArgumentData/initiator/roleB-initiates
- offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
#.FN_BODY ModifyOperationalBindingArgumentData/initiator/symmetric
- offset = call_dop_oid_callback("dop.modify.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("modify.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
#.FN_BODY ModifyOperationalBindingArgumentData/initiator/roleA-initiates
- offset = call_dop_oid_callback("dop.modify.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("modify.rolea", tvb, offset, actx->pinfo, tree, "roleA");
#.FN_BODY ModifyOperationalBindingArgumentData/initiator/roleB-initiates
- offset = call_dop_oid_callback("dop.modify.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("modify.roleb", tvb, offset, actx->pinfo, tree, "roleB");
#.FN_BODY TerminateOperationalBindingArgumentData/initiator/symmetric
- offset = call_dop_oid_callback("dop.terminate.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("terminate.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
#.FN_BODY TerminateOperationalBindingArgumentData/initiator/roleA-initiates
- offset = call_dop_oid_callback("dop.terminate.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("terminate.rolea", tvb, offset, actx->pinfo, tree, "roleA");
#.FN_BODY TerminateOperationalBindingArgumentData/initiator/roleB-initiates
- offset = call_dop_oid_callback("dop.terminate.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("terminate.roleb", tvb, offset, actx->pinfo, tree, "roleB");
#.FN_BODY EstablishOperationalBindingArgumentData/agreement
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
#.FN_BODY EstablishOperationalBindingResult/initiator/symmetric
- offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
#.FN_BODY EstablishOperationalBindingResult/initiator/roleA-replies
- offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
#.FN_BODY EstablishOperationalBindingResult/initiator/roleB-replies
- offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
#.FN_BODY OpBindingErrorParam/agreementProposal
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
#.FN_BODY ModifyOperationalBindingResultData/newAgreement
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
#.FN_BODY ModifyOperationalBindingArgumentData/newAgreement
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
#.FN_BODY OperationalBindingID/identifier VAL_PTR = &value
diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c
index a22094539d..c5dcf9cf08 100644
--- a/asn1/dop/packet-dop-template.c
+++ b/asn1/dop/packet-dop-template.c
@@ -66,14 +66,18 @@ int proto_dop = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
static const char *binding_type = NULL; /* binding_type */
-static int call_dop_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info);
+static int call_dop_oid_callback(char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info);
#include "packet-dop-hf.c"
/* Initialize the subtree pointers */
static gint ett_dop = -1;
+static gint ett_dop_unknown = -1;
#include "packet-dop-ett.c"
+/* Dissector table */
+static dissector_table_t dop_dissector_table;
+
static void append_oid(packet_info *pinfo, const char *oid)
{
const char *name = NULL;
@@ -87,16 +91,30 @@ static void append_oid(packet_info *pinfo, const char *oid)
#include "packet-dop-fn.c"
static int
-call_dop_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info)
+call_dop_oid_callback(char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info)
{
char* binding_param;
- binding_param = ep_strdup_printf("%s.%s", base_oid, binding_type ? binding_type : "");
+ binding_param = ep_strdup_printf("%s.%s", base_string, binding_type ? binding_type : "");
if (col_info && (check_col(pinfo->cinfo, COL_INFO)))
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info);
- return call_ber_oid_callback(binding_param, tvb, offset, pinfo, tree);
+ if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree)) {
+ offset += tvb_length_remaining (tvb, offset);
+ } else {
+ proto_item *item=NULL;
+ proto_tree *next_tree=NULL;
+
+ item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), "Dissector for parameter %s OID:%s not implemented. Contact Wireshark developers if you want this supported", base_string, binding_type ? binding_type : "<empty>");
+ if (item) {
+ next_tree = proto_item_add_subtree(item, ett_dop_unknown);
+ }
+ offset = dissect_unknown_ber(pinfo, tvb, offset, next_tree);
+ expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "Unknown binding-parameter");
+ }
+
+ return offset;
}
@@ -236,6 +254,7 @@ void proto_register_dop(void) {
/* List of subtrees */
static gint *ett[] = {
&ett_dop,
+ &ett_dop_unknown,
#include "packet-dop-ettarr.c"
};
@@ -246,6 +265,8 @@ void proto_register_dop(void) {
register_dissector("dop", dissect_dop, proto_dop);
+ dop_dissector_table = register_dissector_table("dop.oid", "DOP OID Dissectors", FT_STRING, BASE_NONE);
+
/* Register fields and subtrees */
proto_register_field_array(proto_dop, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
diff --git a/epan/dissectors/packet-disp.c b/epan/dissectors/packet-disp.c
index f731fabdea..e3d3fa4da4 100644
--- a/epan/dissectors/packet-disp.c
+++ b/epan/dissectors/packet-disp.c
@@ -2490,11 +2490,11 @@ void proto_reg_handoff_disp(void) {
/*--- Included file: packet-disp-dis-tab.c ---*/
#line 1 "packet-disp-dis-tab.c"
- register_ber_oid_dissector("dop.agreement.2.5.19.1", dissect_ShadowingAgreementInfo_PDU, proto_disp, "shadow-agreement");
- register_ber_oid_dissector("dop.establish.rolea.2.5.19.1", dissect_EstablishParameter_PDU, proto_disp, "shadow-establish-rolea");
- register_ber_oid_dissector("dop.establish.roleb.2.5.19.1", dissect_EstablishParameter_PDU, proto_disp, "shadow-establish-roleb");
- register_ber_oid_dissector("dop.modify.rolea.2.5.19.1", dissect_ModificationParameter_PDU, proto_disp, "shadow-modify-rolea");
- register_ber_oid_dissector("dop.modify.roleb.2.5.19.1", dissect_ModificationParameter_PDU, proto_disp, "shadow-modify-roleb");
+ dissector_add_string("dop.oid", "agreement.2.5.19.1", create_dissector_handle(dissect_ShadowingAgreementInfo_PDU, proto_disp));
+ dissector_add_string("dop.oid", "establish.rolea.2.5.19.1", create_dissector_handle(dissect_EstablishParameter_PDU, proto_disp));
+ dissector_add_string("dop.oid", "establish.roleb.2.5.19.1", create_dissector_handle(dissect_EstablishParameter_PDU, proto_disp));
+ dissector_add_string("dop.oid", "modify.rolea.2.5.19.1", create_dissector_handle(dissect_ModificationParameter_PDU, proto_disp));
+ dissector_add_string("dop.oid", "modify.roleb.2.5.19.1", create_dissector_handle(dissect_ModificationParameter_PDU, proto_disp));
/*--- End of included file: packet-disp-dis-tab.c ---*/
diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c
index bc76091968..4433cab043 100644
--- a/epan/dissectors/packet-dop.c
+++ b/epan/dissectors/packet-dop.c
@@ -74,7 +74,7 @@ int proto_dop = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
static const char *binding_type = NULL; /* binding_type */
-static int call_dop_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info);
+static int call_dop_oid_callback(char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info);
/*--- Included file: packet-dop-hf.c ---*/
@@ -274,6 +274,7 @@ static int hf_dop_GrantsAndDenials_denyInvoke = -1;
/* Initialize the subtree pointers */
static gint ett_dop = -1;
+static gint ett_dop_unknown = -1;
/*--- Included file: packet-dop-ett.c ---*/
#line 1 "packet-dop-ett.c"
@@ -346,7 +347,10 @@ static gint ett_dop_T_basicLevels = -1;
static gint ett_dop_GrantsAndDenials = -1;
/*--- End of included file: packet-dop-ett.c ---*/
-#line 76 "packet-dop-template.c"
+#line 77 "packet-dop-template.c"
+
+/* Dissector table */
+static dissector_table_t dop_dissector_table;
static void append_oid(packet_info *pinfo, const char *oid)
{
@@ -723,7 +727,7 @@ static int
dissect_dop_EstablishSymmetric(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 108 "dop.cnf"
- offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
@@ -739,7 +743,7 @@ static int
dissect_dop_EstablishRoleAInitiates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 112 "dop.cnf"
- offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
@@ -755,7 +759,7 @@ static int
dissect_dop_EstablishRoleBInitiates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 116 "dop.cnf"
- offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
@@ -798,7 +802,7 @@ static int
dissect_dop_T_agreement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 144 "dop.cnf"
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
@@ -1056,7 +1060,7 @@ static int
dissect_dop_T_symmetric(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 148 "dop.cnf"
- offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
@@ -1072,7 +1076,7 @@ static int
dissect_dop_T_roleA_replies(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 152 "dop.cnf"
- offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
@@ -1088,7 +1092,7 @@ static int
dissect_dop_T_roleB_replies(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 156 "dop.cnf"
- offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
@@ -1168,7 +1172,7 @@ static int
dissect_dop_ModifySymmetric(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 120 "dop.cnf"
- offset = call_dop_oid_callback("dop.modify.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("modify.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
@@ -1184,7 +1188,7 @@ static int
dissect_dop_ModifyRoleAInitiates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 124 "dop.cnf"
- offset = call_dop_oid_callback("dop.modify.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("modify.rolea", tvb, offset, actx->pinfo, tree, "roleA");
@@ -1200,7 +1204,7 @@ static int
dissect_dop_ModifyRoleBInitiates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 128 "dop.cnf"
- offset = call_dop_oid_callback("dop.modify.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("modify.roleb", tvb, offset, actx->pinfo, tree, "roleB");
@@ -1243,7 +1247,7 @@ static int
dissect_dop_ArgumentNewAgreement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 168 "dop.cnf"
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
@@ -1328,7 +1332,7 @@ static int
dissect_dop_ResultNewAgreement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 164 "dop.cnf"
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
@@ -1409,7 +1413,7 @@ static int
dissect_dop_TerminateSymmetric(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 132 "dop.cnf"
- offset = call_dop_oid_callback("dop.terminate.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
+ offset = call_dop_oid_callback("terminate.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
@@ -1425,7 +1429,7 @@ static int
dissect_dop_TerminateRoleAInitiates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 136 "dop.cnf"
- offset = call_dop_oid_callback("dop.terminate.rolea", tvb, offset, actx->pinfo, tree, "roleA");
+ offset = call_dop_oid_callback("terminate.rolea", tvb, offset, actx->pinfo, tree, "roleA");
@@ -1441,7 +1445,7 @@ static int
dissect_dop_TerminateRoleBInitiates(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 140 "dop.cnf"
- offset = call_dop_oid_callback("dop.terminate.roleb", tvb, offset, actx->pinfo, tree, "roleB");
+ offset = call_dop_oid_callback("terminate.roleb", tvb, offset, actx->pinfo, tree, "roleB");
@@ -1641,7 +1645,7 @@ static int
dissect_dop_T_agreementProposal(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 160 "dop.cnf"
- offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
+ offset = call_dop_oid_callback("agreement", tvb, offset, actx->pinfo, tree, NULL);
@@ -2441,19 +2445,33 @@ static void dissect_ACIItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto
/*--- End of included file: packet-dop-fn.c ---*/
-#line 88 "packet-dop-template.c"
+#line 92 "packet-dop-template.c"
static int
-call_dop_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info)
+call_dop_oid_callback(char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char *col_info)
{
char* binding_param;
- binding_param = ep_strdup_printf("%s.%s", base_oid, binding_type ? binding_type : "");
+ binding_param = ep_strdup_printf("%s.%s", base_string, binding_type ? binding_type : "");
if (col_info && (check_col(pinfo->cinfo, COL_INFO)))
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info);
- return call_ber_oid_callback(binding_param, tvb, offset, pinfo, tree);
+ if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree)) {
+ offset += tvb_length_remaining (tvb, offset);
+ } else {
+ proto_item *item=NULL;
+ proto_tree *next_tree=NULL;
+
+ item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), "Dissector for parameter %s OID:%s not implemented. Contact Wireshark developers if you want this supported", base_string, binding_type ? binding_type : "<empty>");
+ if (item) {
+ next_tree = proto_item_add_subtree(item, ett_dop_unknown);
+ }
+ offset = dissect_unknown_ber(pinfo, tvb, offset, next_tree);
+ expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "Unknown binding-parameter");
+ }
+
+ return offset;
}
@@ -3344,12 +3362,13 @@ void proto_register_dop(void) {
"", HFILL }},
/*--- End of included file: packet-dop-hfarr.c ---*/
-#line 234 "packet-dop-template.c"
+#line 252 "packet-dop-template.c"
};
/* List of subtrees */
static gint *ett[] = {
&ett_dop,
+ &ett_dop_unknown,
/*--- Included file: packet-dop-ettarr.c ---*/
#line 1 "packet-dop-ettarr.c"
@@ -3422,7 +3441,7 @@ void proto_register_dop(void) {
&ett_dop_GrantsAndDenials,
/*--- End of included file: packet-dop-ettarr.c ---*/
-#line 240 "packet-dop-template.c"
+#line 259 "packet-dop-template.c"
};
module_t *dop_module;
@@ -3432,6 +3451,8 @@ void proto_register_dop(void) {
register_dissector("dop", dissect_dop, proto_dop);
+ dop_dissector_table = register_dissector_table("dop.oid", "DOP OID Dissectors", FT_STRING, BASE_NONE);
+
/* Register fields and subtrees */
proto_register_field_array(proto_dop, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -3464,23 +3485,23 @@ void proto_reg_handoff_dop(void) {
register_ber_oid_dissector("2.5.12.5", dissect_SupplierInformation_PDU, proto_dop, "id-doa-supplierKnowledge");
register_ber_oid_dissector("2.5.12.6", dissect_ConsumerInformation_PDU, proto_dop, "id-doa-consumerKnowledge");
register_ber_oid_dissector("2.5.12.7", dissect_SupplierAndConsumers_PDU, proto_dop, "id-doa-secondaryShadows");
- register_ber_oid_dissector("dop.agreement.2.5.19.2", dissect_HierarchicalAgreement_PDU, proto_dop, "hierarchical-agreement");
- register_ber_oid_dissector("dop.establish.rolea.2.5.19.2", dissect_SuperiorToSubordinate_PDU, proto_dop, "hierarchical-establish-rolea");
- register_ber_oid_dissector("dop.modify.rolea.2.5.19.2", dissect_SuperiorToSubordinateModification_PDU, proto_dop, "hierarchical-modify-rolea");
- register_ber_oid_dissector("dop.establish.roleb.2.5.19.2", dissect_SubordinateToSuperior_PDU, proto_dop, "hierarchical-establish-roleb");
- register_ber_oid_dissector("dop.modify.roleb.2.5.19.2", dissect_SubordinateToSuperior_PDU, proto_dop, "hierarchical-modify-roleb");
- register_ber_oid_dissector("dop.agreement.2.5.19.3", dissect_NonSpecificHierarchicalAgreement_PDU, proto_dop, "non-specific-hierarchical-agreement");
- register_ber_oid_dissector("dop.establish.rolea.2.5.19.3", dissect_NHOBSuperiorToSubordinate_PDU, proto_dop, "non-specific-hierarchical-establish-rolea");
- register_ber_oid_dissector("dop.modify.rolea.2.5.19.3", dissect_NHOBSuperiorToSubordinate_PDU, proto_dop, "non-specific-hierarchical-modify-rolea");
- register_ber_oid_dissector("dop.establish.roleb.2.5.19.3", dissect_NHOBSubordinateToSuperior_PDU, proto_dop, "non-specific-hierarchical-establish-roleb");
- register_ber_oid_dissector("dop.modify.roleb.2.5.19.3", dissect_NHOBSubordinateToSuperior_PDU, proto_dop, "non-specific-hierarchical-modify-roleb");
+ dissector_add_string("dop.oid", "agreement.2.5.19.2", create_dissector_handle(dissect_HierarchicalAgreement_PDU, proto_dop));
+ dissector_add_string("dop.oid", "establish.rolea.2.5.19.2", create_dissector_handle(dissect_SuperiorToSubordinate_PDU, proto_dop));
+ dissector_add_string("dop.oid", "modify.rolea.2.5.19.2", create_dissector_handle(dissect_SuperiorToSubordinateModification_PDU, proto_dop));
+ dissector_add_string("dop.oid", "establish.roleb.2.5.19.2", create_dissector_handle(dissect_SubordinateToSuperior_PDU, proto_dop));
+ dissector_add_string("dop.oid", "modify.roleb.2.5.19.2", create_dissector_handle(dissect_SubordinateToSuperior_PDU, proto_dop));
+ dissector_add_string("dop.oid", "agreement.2.5.19.3", create_dissector_handle(dissect_NonSpecificHierarchicalAgreement_PDU, proto_dop));
+ dissector_add_string("dop.oid", "establish.rolea.2.5.19.3", create_dissector_handle(dissect_NHOBSuperiorToSubordinate_PDU, proto_dop));
+ dissector_add_string("dop.oid", "modify.rolea.2.5.19.3", create_dissector_handle(dissect_NHOBSuperiorToSubordinate_PDU, proto_dop));
+ dissector_add_string("dop.oid", "establish.roleb.2.5.19.3", create_dissector_handle(dissect_NHOBSubordinateToSuperior_PDU, proto_dop));
+ dissector_add_string("dop.oid", "modify.roleb.2.5.19.3", create_dissector_handle(dissect_NHOBSubordinateToSuperior_PDU, proto_dop));
register_ber_oid_dissector("2.5.24.4", dissect_ACIItem_PDU, proto_dop, "id-aca-prescriptiveACI");
register_ber_oid_dissector("2.5.24.5", dissect_ACIItem_PDU, proto_dop, "id-aca-entryACI");
register_ber_oid_dissector("2.5.24.6", dissect_ACIItem_PDU, proto_dop, "id-aca-subentryACI");
/*--- End of included file: packet-dop-dis-tab.c ---*/
-#line 275 "packet-dop-template.c"
+#line 296 "packet-dop-template.c"
/* APPLICATION CONTEXT */
add_oid_str_name("2.5.3.3", "id-ac-directory-operational-binding-management");