aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/ldap/packet-ldap-template.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-08-06 14:04:07 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-08-06 14:04:07 +0000
commitb4468109395024595d184fe31ad2a40b2bee2107 (patch)
tree7f3aef300c0cce1531e82a108d906f6d657291e4 /asn1/ldap/packet-ldap-template.c
parent3ef9bcfa26408a45ca3a5312e4a5c1f0d11f469e (diff)
the ldap values for supportedControl and supportedCapabilities is an oid in ascii format.
resolve it into a anme if possible and present it. svn path=/trunk/; revision=18842
Diffstat (limited to 'asn1/ldap/packet-ldap-template.c')
-rw-r--r--asn1/ldap/packet-ldap-template.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index 3d2beec608..d4722c4a8c 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -1172,6 +1172,30 @@ dissect_normal_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
static void
+dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ char *oid, *oidname;
+
+ /* tvb here contains an ascii string that is really an oid */
+/* XXX we should convert the string oid into a real oid so we can use
+ * proto_tree_add_oid() instead.
+ */
+
+ oid=tvb_get_ephemeral_string(tvb, 0, tvb_length(tvb));
+ if(!oid){
+ return;
+ }
+
+ oidname=get_oid_str_name(oid);
+
+ if(oidname){
+ proto_tree_add_text(tree, tvb, 0, tvb_length(tvb), "OID: %s (%s)",oid,oidname);
+ } else {
+ proto_tree_add_text(tree, tvb, 0, tvb_length(tvb), "OID: %s",oid);
+ }
+}
+
+static void
dissect_ldap_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 drep[4] = { 0x10, 0x00, 0x00, 0x00}; /* fake DREP struct */
@@ -1529,6 +1553,8 @@ proto_reg_handoff_ldap(void)
register_ldap_name_dissector("netlogon", dissect_NetLogon_PDU, proto_cldap);
register_ldap_name_dissector("objectGUID", dissect_ldap_guid, proto_ldap);
+ register_ldap_name_dissector("supportedControl", dissect_ldap_oid, proto_ldap);
+ register_ldap_name_dissector("supportedCapabilities", dissect_ldap_oid, proto_ldap);
}