Hi , 

 * <[EMAIL PROTECTED]> wrote from a remote bunker :
> 
>       I want to know how two identical packets are differentiated and
> given to the appropriate applications - to be more clear, suppose two
> browsers are opened in the same machine, and both issue the same 'GET'
> HTTP command to the same website. Then, the network packets will be
> having the same source and destination address, and the same port
> number(80, here). Now, when these two packets are sent, and the
> resultant packets arrive to our machine, which again would be
> identical, how is it that the kernel differentiates between the
> packets and sends the correct one to the appropriate browser??

The destination port is same , but did you think about the source port,
they are not same.

See the output of netstat -t after 2 simultaneous connections to
google.com.

dushy@ghost (Tue Aug 20) ~> netstat -t
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address State      
tcp        0      0 ghost.archeanlabs.:1153 www.google.com:www ESTABLISHED 
tcp        0      0 ghost.archeanlabs.:1155 www.google.com:www ESTABLISHED 
tcp        0    618 ghost.archeanlabs.:1156 www.google.com:www ESTABLISHED 
        
As you can see the source port differs for each request. Read TCP/IP 
Illustrated Volume 1 by Richard Stevens. 

cheers
dushyanth
-- 
Mind your own business, Mr. Spock. I'm sick of your halfbreed
interference.

http://symonds.net/~dushy


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to