On Mon, 2003-04-07 at 13:11, Anders Johansson wrote:
On Monday 07 April 2003 18:36, Ken Schneider wrote:
Maybe some simple networking lessons are in order.
A "dotted quad address" is always treated as an "IP address" NOT some random text string URL.
argv is a pointer to an array of zero terminated character strings. How they are treated is not written in stone.
We are talking about the telnet command NOT c source.
When you type the "IP address" as the destination, (whether telnet, ftp, http) it eliminates having to go through DNS to resolve a "name" to an "IP address".
only if you use getaddrinfo and pass it the flag AI_NUMERICHOST
We are talking about the telnet command NOT c source. I don't know if I have ever typed getaddrinfo at the command line but I have used telnet.
read "man 3 getaddrinfo" for more info.
Once the "IP address" has been determined another query is sent on its way to the routers looking for the "MAC address" that belongs to the "IP address".
arp queries are broadcast, not routed. They may be handled by a switch, rarely by a router.
Yes but the query is sent as an "IP address" first which IS routed.
EVERY request will resolve to a "MAC address" or fail.
Are you suggesting that every machine queries every other machine on the entire internet for its hardware address?
The request sent is (I may not be quoting correctly) "Who has x.x.x.x" and listens for an answer. First the request is sent to your default router and so on and so on until one replies with that is has the "MAC address" for the requested "IP address". Ken