[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: playing with ldap protocol



Hello,
  this is a message of type LDAPMessage:

LDAPMessage ::= SEQUENCE {
             messageID       MessageID,
             protocolOp      CHOICE {
             bindRequest           BindRequest,
...
}

So it starts with the tag for SEQUENCE (30 - 16 for "sequence" plus "constructed" bit (bit 6)), length 1e (30 Bytes).
Then there is tag 2 (INTEGER), length 1, value 1: So message id is 1.

The rest is as you've described it.

Regards,  Jochen.



Am 26.11.2015 um 18:25 schrieb Friedrich Locke:
i am trying to understand ldap protocol! i have read the RFC 4511 (i believe) about it. In order to understand it better, i wrote a program that reads from internet and writes to an output file.

I have issued the following ldapsearch command:

ldapsearch -x -h localhost -p 2000 -D ou=ufv,dc=br -w 123456

What i got on the output file was:

sioux@scallop$ hexdump -C o
00000000 30 1e 02 01 01 60 19 02 01 03 04 0c 6f 75 3d 75 |0....`......ou=u| 00000010 66 76 2c 64 63 3d 62 72 80 06 31 32 33 34 35 36 |fv,dc=br..123456|
00000020

I have the following understanding o f the protocol:

60 19 [02 01 [3] 04 0c [ou=ufv,dc=br] 80 06 [123456]]

What about the first "30 1e 02 01 01" ?
1e means the size is bigger than 30 and 2 bytes is specified ? Is it for the message id ? What about the rest of 27 bytes of message what is not accounted ?
Shoud it not account for the 27 bytes length ?

Thanks in advance.

BTW: what is the message id for the message sent ?