[icq-devel] error code



micha armageddon at raydan.de
Tue Dec 18 20:13:09 CET 2001


This is the function i'm using to make a TLV:

function Make_TLV($type, $length, $value) {

           // "n" = unsigned short, big endian
           $ret  = pack("n", $type);
           $ret .= pack("n", $length);
           $ret .= $value;

           return $ret;

}

and so i make the login packet:

  $login  = chr(0).chr(0).chr(0).chr(1);
  $login .= Make_TLV(0x0001, strlen($uin), int2chr($uin)); // uin
  $login .= Make_TLV(0x0002, strlen($pass), $pass);  // enc. password
  $login .= Make_TLV(0x0003, strlen($profile), $profile); // client profile
  $login .= Make_TLV(0x0016, 0x0002, pack("n",  266)); // unk, WORD '01 0A'
  $login .= Make_TLV(0x0017, 0x0002, pack("n",    4)); // major, WORD
  $login .= Make_TLV(0x0018, 0x0002, pack("n",   63)); // minor, WORD
  $login .= Make_TLV(0x0019, 0x0002, pack("n",    1)); // lesser, WORD
  $login .= Make_TLV(0x001A, 0x0002, pack("n", 3279)); // build, WORD
  $login .= Make_TLV(0x0014, 0x0004, pack("N",   85)); // dunno, D-WORD
  $login .= Make_TLV(0x000F, 0x0002, "en");
  $login .= Make_TLV(0x000E, 0x0002, "us");

  $packet  = Make_FLAP_Header(1, Next_Sequence(), strlen($login));
  $packet .= $login;

I don't see anything that's wrong :(

-micha

Douglas McLaughlin wrote:

> At 01:36 PM 12/17/2001, you wrote:
> >When I try to login (with my own PHP-client) I get the following
> >response:
> >
> >(channel 0x4)
> >TLV(0x1), length 0x7, value "1246422" (this is NOT the uin I send in the
> >login package...[should be 124642206])
> >TLV(0x4), length 0x18, value "http://www.aol.com"
> >TLV(0x8), length 0x2, value 0x4
> >
> >So the error code is 0x4. What does this code mean ??
>
> First thing I would is check the login packet to make sure it has the
> correct length of the UIN TLV.
>
> Doug
>
> --
> Douglas F. McLaughlin      [Chancellor's List - Spring 2001 Semester,
> STR Programming Services    University of North Carolina - Pembroke]
> stricq at owlnet.net
> http://www.stricq.com/     { while(!sleep) sheep++; }
> Team Amiga                 http://www.amiga.com/
>
> -------------------------------------------------
> icq-devel - The forum for ICQ protocol discussion
> For unsubscribe and other mailing list info, see:
> http://www.d.kth.se/~d95-mih/icq/icq-devel/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://vic20.blipp.com/pipermail/icq-devel/attachments/20011218/0d8e4109/attachment.htm 


More information about the icq-devel mailing list