Re: How to get my IP Address ?
Re: How to get my IP Address ?
- Subject: Re: How to get my IP Address ?
- From: Jan Brittenson <email@hidden>
- Date: Mon, 29 Nov 2004 17:30:10 -0800
Jerry Pendergraft wrote:
Not sure I completely understand your situtation, but you probably don't
need to know your own ip address. If you send out a packet to another
machine, that packet will contain a source address which is your address.
Such address is put in by the hardware and handles the case of your
machine having multiple interfaces.
The software on the other machine will then use the address in the
packet to reply. If you look in that reply packet the source will be the
peer and the destination will be you.
The problem with the question is: if the client managed to connect to
the web server, why does it need to ask for an address? A cgi-bin
to figure out a local address to send back to the client that's
already connected to it is somewhat pointless.
Now, the web server may direct traffic to a different host. But no
amount of looking up local interfaces is going to help with this, nor
do I think this is what the OP wondered about. But in general, what
I would do is return a name where the service can be found; the name
is resolved through name services by the client into a list of
addresses. The addresses are tried in order to reach the server.
This permits DNS round-robin, reverse NAT and port forwarding,
multihoming, redirection, etc, to all just magically work. A server
in a DHCP environment may need dynamic DNS or equivalent. For more
symmetric peer LAN applications there's tons of discovery protocols
out there (including Rendezvous), which is what I think Jerry is
reaching for above. But this leaves out the role of the web
service: SMIL? Generic XML data exchange vehicle? Session
management? Load balancing? Edge redirection? Ticketing and
admission? Or just a starting point?
IMO more info is needed, and if there isn't more info it's time to
go back to the drawing board and rethink. :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden