Ethereal-users: RE: [Ethereal-users] Problem
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Ronald Henderson <Ronald.Henderson@xxxxxxxxxxxxxxxx>
Date: Fri, 8 Nov 2002 12:21:05 -0500
Guy: Etherreal Version: 0.9.7 Did some more investigation on this problem. It appears that on the Windows platform LDAP entries with Atrribute values (string length) greater than some number between 220 octects and ITEM_LABEL_LENGTH that the protocol field will not be displayed. The ability to mouse click or move to the next attribute value works ok but nothing is displayed (i.e. blank line). Complete Attribute values that are shorter in length are displayed ok. I also have a Linux box running 0.9.7 and this problem does not occur. The Protocol field Attribute values are displayed up to ITEM_LABEL_LENGTH in size(desired behavior). I wrote a section of code below to see where the limit on the Windows platform was. (As I said it is somewhere between ITEM_LABEL_LENGTH and 220 octects). This test was done by introducing an artifical length limit to the Attribute value in the function read_string_value() in disector: LDAP (packet-ldap.c) By truncating the Attribute value to 220 as shown in the example below the Attribute value fields on the Windows platform now where displayed up to 220 characters. Any help on where to search next (glib routines?) to solve this issue for the windows platform would be appreciated. Also attached is a packet capture file containing a sample LDAP search request (search for cn=schema) that spans many TCP MTU segments... Thanks.... I added the code between the RWH bracketed lines... static int read_string_value(ASN1_SCK *a, proto_tree *tree, int hf_id, proto_item **new_item, char **s, int start, guint length) { guchar *string; proto_item *temp_item = NULL; int ret; if (length) { ret = asn1_string_value_decode(a, length, &string); if (ret != ASN1_ERR_NOERROR) { if (tree) { proto_tree_add_text(tree, a->tvb, start, 0, "%s: ERROR: Couldn't parse value: %s", proto_registrar_get_name(hf_id), asn1_err_to_str(ret)); } return ret; } /* #### RWH code #### */ if (length >= 220) { length = 220; } /* #### RWH code #### */ string = g_realloc(string, length + 1); string[length] = '\0'; } else string = "(null)"; if (tree) temp_item = proto_tree_add_string(tree, hf_id, a->tvb, start, a->offset - start, string); if (new_item) *new_item = temp_item; if (s && length) *s = string; else if (length) g_free(string); return ASN1_ERR_NOERROR; } -----Original Message----- From: Guy Harris [mailto:gharris@xxxxxxxxx] Sent: Friday, November 08, 2002 1:48 AM To: Oleg Zolotykh Cc: 'ethereal-users@xxxxxxxxxxxx'; Ronald Henderson Subject: Re: [Ethereal-users] Problem On Thu, Nov 07, 2002 at 06:02:02PM -0500, Oleg Zolotykh wrote: > I have encounter a problem while using Ethereal Network Analyzer. It deals > with long values of the attributes in LDAP protocol. The values which are > longer than approximately 150 characters are not displayed. > I'd like to know if there is a way to change this limitation. It would be > nice to set a number of characters to be displayed and truncate the others > for instance. > Looks like the problem has to do with proto_tree_set_string() function in > proto.c file. No, it doesn't, as that function does not impose any length restrictions on strings. The truncation is the result of the way the buffer for the displayable/printable string for a field is allocated; they are fixed-length buffers, allocated from a GLib "memory chunk", and are ITEM_LABEL_LENGTH, or 240, bytes long. See "proto_tree_set_representation()". The way to change the limitation is to change the value for ITEM_LABEL_LENGTH in "proto.c" and recompile.
Attachment:
ldap2.pkts
Description: Binary data
- Prev by Date: [Ethereal-users] reading 802.11b data
- Next by Date: [Ethereal-users] Ethereal saved file to big
- Previous by thread: Re: [Ethereal-users] Problem
- Next by thread: Re: [Ethereal-users] Problem
- Index(es):