Hello,
the current version of the LDAP dissector puts the LDAP message id and
message type in the ldap.message_id and ldap.message_type fields.
However, these fields are not visible in the protocol tree, because
they are added using two calls to proto_tree_add_uint_hidden().
Thus, there is currently no way to filter LDAP messages on the value of
the message id or message type, using the Match or Prepare menu (i.e,
the display filter has to be entered manually, for example
ldap.message_type == 0 to filter bind requests).
The current dissector already displays the message id and type
in the information column and at the root of the message subtree:
0.716361 192.70.106.76 -> 192.70.106.143 LDAP MsgId=4 MsgType=Bind Request
and
...
Lightweight Directory Access Protocol
Message: Id=4 Bind Request
Message Length: 1278
...
The attached patch converts the proto_tree_add_uint_hidden() calls to
proto_tree_add_uint() calls, under the msg protocol subtree.
With that patch, the LDAP protocol tree now appears as follow:
Lightweight Directory Access Protocol
Message: Id=4 Bind Request
Message Id: 4
Message Type: Bind Request (0x00)
Message Length: 1278
...
I don't see any particular reason why these two fields are hidden in
the protocol tree but maybe there is one... (the two calls appeared in
revision 1.4 of packet-ldap.c)
Jean-Baptiste Marchand
--
Jean-Baptiste.Marchand@xxxxxx
Hervé Schauer Consultants
http://www.hsc.fr/
Index: packet-ldap.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ldap.c,v
retrieving revision 1.52
diff -u -r1.52 packet-ldap.c
--- packet-ldap.c 28 Nov 2002 07:01:30 -0000 1.52
+++ packet-ldap.c 20 Apr 2003 15:21:57 -0000
@@ -1504,11 +1504,11 @@
if (ldap_tree)
{
- proto_tree_add_uint_hidden(ldap_tree, hf_ldap_message_id, tvb, message_id_start, message_id_length, messageId);
- proto_tree_add_uint_hidden(ldap_tree, hf_ldap_message_type, tvb,
- start, a.offset - start, protocolOpTag);
ti = proto_tree_add_text(ldap_tree, tvb, message_id_start, messageLength, "Message: Id=%u %s", messageId, typestr);
msg_tree = proto_item_add_subtree(ti, ett_ldap_message);
+ proto_tree_add_uint(msg_tree, hf_ldap_message_id, tvb, message_id_start, message_id_length, messageId);
+ proto_tree_add_uint(msg_tree, hf_ldap_message_type, tvb,
+ start, a.offset - start, protocolOpTag);
}
start = a.offset;
if (read_length(&a, msg_tree, hf_ldap_message_length, &opLen) != ASN1_ERR_NOERROR)