Re: RMI binding to SAME port but DIFFERENT IP address on SAME host

From: Sam (samhunt90_at_hotmail.com)
Date: 08/03/04


Date: 2 Aug 2004 20:06:36 -0700

Esmond Pitt <esmond.pitt@not.bigpond.com> wrote in message news:<6mkPc.28422$K53.16290@news-server.bigpond.net.au>...
> Sam
>
> OK, if UDP or TCP or ICMP or whatever transport layer matches the socket
> to the inbound IP packet, instead of IP, the local IP address *still*
> doesn't get 'thrown away as the data goes up the protocol stack',
> because it must still be there in the IP packet for TCP or UDP to do
> this matching, and it must also available be in the socket descriptor to
> be matched. Can we agree on that?

Now, that I can agree with. In fact, the "table" which matches ip and
port number to the socket turns out to be a linked series of data
blocks, each of which must contain at least a local port, but could
contain local ip, foriegn ip and foriegn port as well. These
eventuaully link back to the actual process via series of pointers,
according to Stevens' description of Berkely 4.x distributions.

> This also means that TCP, UDP, ICMP &co indeed deal with IP data, &
> just goes to show that TCP/IP implementation layering is not as clean as
> you might like to think. Certainly IP doesn't have to deal with TCP
> data, but the other way round does happen (no worse than a derived class
> using methods from its base class really).

> Of course Stevens vol II only describes one implementation. I don't know
> that a 'cleaner' implementation where IP despatches packets to sockets
> is infeasible either

What I learned was the traditional 5-layer model - App / Transport
(TCP,UDP)/ Ip / Link / Physical, is clarifed nicely in some key areas
by Steven's description of how the implementation itself is layered,
i.e:

Process / Socket Layer / Protocol Layer (TCP, UDP, IP, ICMP, IGMP) /
Interface layer.

So, here it becomes apparent that the "protocol layer" incorporates
both TCP and IP Data, assigning it to to the correct socket in the
end. This melds the transport and ip layer together in the
implementation stack, and there is clearly data overlap between the
two, specifically IP address. Nonetheless, the IP input and UDP and
TCP input routines and funtionality are clearly distinct.

Ca suffit,
Sam90



Relevant Pages

  • Re: HEADS UP: inpcb/inpcbinfo rwlocking: coming to a 7-STABLE branch near you
    ... To be specific, this affects TCP, UDP, and raw sockets on both IPv4 and IPv6. ... Any testing, especially with heavy UDP loads, would be much appreciated -- this are fairly complex changes, and also quite a complex MFC. ... These structures represent, respectively, particular sockets and the global socket lists for all socket types in IPv4 and IPv6 except for SCTP. ... This is possible because, in the common case, no connection or global state is modified during UDP/raw receive and transmit at the IP layer, so a read lock is sufficient to prevent data in those structures from unexpectedly changing. ...
    (freebsd-stable)
  • Re: HEADS UP: inpcb/inpcbinfo rwlocking: coming to a 7-STABLE branch near you
    ... To be specific, this affects TCP, UDP, and raw sockets on both IPv4 and IPv6. ... Any testing, especially with heavy UDP loads, would be much appreciated -- this are fairly complex changes, and also quite a complex MFC. ... These structures represent, respectively, particular sockets and the global socket lists for all socket types in IPv4 and IPv6 except for SCTP. ... This is possible because, in the common case, no connection or global state is modified during UDP/raw receive and transmit at the IP layer, so a read lock is sufficient to prevent data in those structures from unexpectedly changing. ...
    (freebsd-net)
  • Re: RMI binding to SAME port but DIFFERENT IP address on SAME host
    ... if UDP or TCP or ICMP or whatever transport layer matches the socket ... Interface layer. ...
    (comp.lang.java.programmer)
  • Re: RMI binding to SAME port but DIFFERENT IP address on SAME host
    ... > all the way up the stack and indeed to the application. ... there is a socket available. ... He describes the progress of a UDP packet up the protocol stack, ... of the data by the driver to the IP layer, which in turn passes it to ...
    (comp.lang.java)
  • Re: RMI binding to SAME port but DIFFERENT IP address on SAME host
    ... > all the way up the stack and indeed to the application. ... there is a socket available. ... He describes the progress of a UDP packet up the protocol stack, ... of the data by the driver to the IP layer, which in turn passes it to ...
    (comp.lang.java.programmer)