[icq-devel] Problems processing tlv 0x2711 in advanced message



Fabrice Michellonet fabrice.michellonet at wanadoo.fr
Tue Nov 26 12:55:06 CET 2002


I'm in hurry, so like christophe i will only copy/paste a piece of code that show how i parse type 4 msg ... in java.

...
...
...
/* retreiving member online since time */
    onlineSinceTime 
    if(type.getValue() = 1)
      parseMessageType1(position, data);
    else if(type.getValue() = 2)
      parseMessageType2(position, data);
    else
      parseMessageType4(position, data);

private void parseMessageType4(int position, byte[] data){

    /* skipping the first 4 bytes of the TLV(5) */
    position +
    /* skipping first unknown field */
    position +
    /* retreiving message type field */
    msgType     position ++;

    /* retreiving message flags field */
    msgFlags     position ++;

    if(msgType.getValue() = 0x04)
      parseLinkMessage(position, data);
  }

  private void parseLinkMessage(int position, byte[] data){

    /* Retreiving message length */
    RawData msgLen     msgLen.invertIndianness();
    position +
    /* Retreiving message + link */
    String tmp     int divPosition     message     url     isType4LinkMessage   }

it work just fine for my lib.

hope it'll help.

regards,

Fabrice

----- Original Message ----- 
From: "Perry Werneck" <pwicq at terra.com.br>
To: <icq-devel at blipp.com>
Sent: Tuesday, November 26, 2002 12:40 AM
Subject: [icq-devel] Problems processing tlv 0x2711 in advanced message


> Hi,
> 
> I'm having some problems processing URL messages with my client. The TLV 0x2711 
> packet sent from the server seens to be diferent from the one documented in 
> Rüdiger's page.
> 
> Any clues?
> 
> This is the TLV I received:
> 
> 11/25/2002 21:34:22 icqkrnl    TLV2711 (244 bytes)
> 1b 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 00 00 00 00 00 00 03 00 00 00 00 cd ff 0e 00 cd   ...........Íÿ..Í
> ff 00 00 00 00 00 00 00 00 00 00 00 00 1a 00 00   ÿ...............
> 00 01 00 01 00 00 40 00 37 1c 58 72 e9 87 d4 11   ...... at .7.Xré‡Ô.
> a4 c1 00 d0 b7 59 b1 d9 00 00 1b 00 00 00 53 65   ¤Á.зY±Ù......Se
> 6e 64 20 57 65 62 20 50 61 67 65 20 41 64 64 72   nd Web Page Addr
> 65 73 73 20 28 55 52 4c 29 00 00 00 00 00 01 00   ess (URL).......
> 00 00 00 00 00 00 00 00 78 00 00 00 74 00 00 00   ........x...t...
> 4a 61 76 61 20 54 69 70 20 34 38 3a 20 48 6f 77   Java Tip 48: How
> 20 74 6f 20 63 72 65 61 74 65 20 61 20 72 65 75    to create a reu
> 73 61 62 6c 65 20 4d 65 73 73 61 67 65 42 6f 78   sable MessageBox
> 20 63 6c 61 73 73 fe 68 74 74 70 3a 2f 2f 77 77    classþhttp://ww
> 77 2e 6a 61 76 61 77 6f 72 6c 64 2e 63 6f 6d 2f   w.javaworld.com/
> 6a 61 76 61 77 6f 72 6c 64 2f 6a 61 76 61 74 69   javaworld/javati
> 70 73 2f 6a 77 2d 6a 61 76 61 74 69 70 34 38 2e   ps/jw-javatip48.
> 68 74 6d 6c                                       html
> 
> The header according the documentation (seens like this is a no text message):
> 
> 11/25/2002 21:34:22 icqkrnl    Header (53 bytes)
> 1b 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
> 00 00 00 00 00 00 03 00 00 00 00 cd ff 0e 00 cd   ...........Íÿ..Í
> ff 00 00 00 00 00 00 00 00 00 00 00 00 1a 00 00   ÿ...............
> 00 01 00 01 00                                    .....
> 
> But, the extra bytes in the packet:
> 
> 11/25/2002 21:34:22 icqkrnl    Extra (191 bytes)
> 00 40 00 37 1c 58 72 e9 87 d4 11 a4 c1 00 d0 b7   . at .7.Xré‡Ô.¤Á.з
> 59 b1 d9 00 00 1b 00 00 00 53 65 6e 64 20 57 65   Y±Ù......Send We
> 62 20 50 61 67 65 20 41 64 64 72 65 73 73 20 28   b Page Address (
> 55 52 4c 29 00 00 00 00 00 01 00 00 00 00 00 00   URL)............
> 00 00 00 78 00 00 00 74 00 00 00 4a 61 76 61 20   ...x...t...Java
> 54 69 70 20 34 38 3a 20 48 6f 77 20 74 6f 20 63   Tip 48: How to c
> 72 65 61 74 65 20 61 20 72 65 75 73 61 62 6c 65   reate a reusable
> 20 4d 65 73 73 61 67 65 42 6f 78 20 63 6c 61 73    MessageBox clas
> 73 fe 68 74 74 70 3a 2f 2f 77 77 77 2e 6a 61 76   sþhttp://www.jav
> 61 77 6f 72 6c 64 2e 63 6f 6d 2f 6a 61 76 61 77   aworld.com/javaw
> 6f 72 6c 64 2f 6a 61 76 61 74 69 70 73 2f 6a 77   orld/javatips/jw
> 2d 6a 61 76 61 74 69 70 34 38 2e 68 74 6d 6c      -javatip48.html
> 
> 
> -- 
> 
>     Perry Werneck
>     ICQ#27241234
>     http://planeta.terra.com.br/informatica/trevize
> 
> -------------------------------------------------
> 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/20021126/dacbba6e/attachment.htm 


More information about the icq-devel mailing list