[icq-devel] ICQ File Sharing, port tracking problem



Husam Khater hkhater at gmx.net
Tue Jul 15 16:24:12 CEST 2003


Hi Every one,
 I have a question about file sharing feature in ICQ. and it is related to
 opening one of the sessions during file transfer. 

 So if I select send/Get file and select browse and get file the following 
 is going to happen:


1- On the main session between my client and the icq server I receive
   SNAC(03,0b) with TLV(12) CLI2CLI showing the IP and port of the other 
             peer at which my client will start a DC.

2- My client starts a control session with the other peer on the port retrieved 
   from (1) 
   [ Actually it starts 2 sessions but with the same destination IP and port]

3- The DC communications on the opened session (point 2), contains a PEER_INIT 
   message sent from both peers and this message contain information such as:
   OurPort, OurUIN, OurExtIP, OurIntIP,...and so on.

The port information given from my client is not correct, while the port information 
from the other peer is correct.
[ I use the default setting on both clients, the communication between the clients 
doesn't pass through a firewall or a NAT box]

My problem:
The other peer starts a session (he starts the SYN) with my client, on a certain port 
and that port number in not given on any of the control sessions. Actually I dumped all 
the traffic and searched for that port number and I couldn't see it any where.

[so how can get this port number???? can it be encrypted???]

[Example]
 x(rand port) -------------->| ICQ 5190|
                             | ICQ 5190|<----------------Y(rand port)
 x(rand port) ------------------------------------------->Y   Port 1800 (for eg.) exchanged by SNAC(03,0b)
 x(rand port)-------------------------------------------->Y   Port 1800 (for eg.) exchanged by SNAC(03,0b) 
 x(port 40644 for e.g.)<------------------------------ Y (rand port)

So my question is about port "40644", which should be exchanged before opening the session in order for client x
to know at which port it should listen. and how does client Y know about this port????

I hope that my question is clear and I hope that I can get an answer.




More information about the icq-devel mailing list