Re: RMI binding to SAME port but DIFFERENT IP address on SAME host
From: Esmond Pitt (esmond.pitt_at_not.bigpond.com)
Date: 08/02/04
- Next message: Esmond Pitt: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Previous message: thufir.hawat_at_mail.com: "Re: Certified Java Programmer (Sun Java 2)"
- Next in thread: Esmond Pitt: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Maybe reply: Esmond Pitt: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Reply: Sam: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Maybe reply: Randolf Richardson: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 02 Aug 2004 05:32:50 GMT
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?
This also means that TCP, UDP, ICMP &c do 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 *would* be infeasible is the
implementation you seem to keep imagining where TCP can't access the IP
header or the local IP address: otherwise the OP's situation wouldn't
work, and it does; also Socket.getLocalAddress() == getsockname()
couldn't work either.
Anyway basta cosi.
EJP
- Next message: Esmond Pitt: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Previous message: thufir.hawat_at_mail.com: "Re: Certified Java Programmer (Sun Java 2)"
- Next in thread: Esmond Pitt: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Maybe reply: Esmond Pitt: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Reply: Sam: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Maybe reply: Randolf Richardson: "Re: RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|