Fun with domain names - The WWW

Users browsing this thread: 1 Guest(s)
z3bra
Grey Hair Nixers
URL and IP addresses are not the same thing !

An IP address is a 32 bits integer. inet_aton (and many other similar fonctions) are used to convert human readabke strings into their binary form. The kernel always deal with IP addresses in binary form (see getaddrinfo(3)), so when openning a connection to a remote host, you MUST specify it in binary form.

An URL is a human readable string specifying multiple informations, including the remote host address when appropriate. We usually represent it with a FQDN, as it's more practical. Specifying the quad dotted IP address is valid too, as functions like inet_aton can do the conversion. However, when you specify it in hexadecimal or octal, the job is even easier ! The program can pass it directly to the kernel, so this explains why these notation are accepted. Note that they probably just pass it to an *_aton function anyway.

They might not be in the spec, but at this point I think that the spec might be too rigid and doesn't accept these format as they go against readability (which is what an URL is about).


Messages In This Thread
Fun with domain names - by venam - 24-08-2020, 08:25 AM
RE: Fun with domain names - by z3bra - 24-08-2020, 09:23 AM
RE: Fun with domain names - by venam - 24-08-2020, 09:26 AM
RE: Fun with domain names - by s0kx - 24-08-2020, 12:33 PM
RE: Fun with domain names - by venam - 24-08-2020, 12:45 PM
RE: Fun with domain names - by jkl - 24-08-2020, 03:15 PM
RE: Fun with domain names - by z3bra - 25-08-2020, 10:24 AM
RE: Fun with domain names - by venam - 25-08-2020, 11:12 AM
RE: Fun with domain names - by z3bra - 25-08-2020, 11:36 AM
RE: Fun with domain names - by movq - 26-08-2020, 10:55 AM
RE: Fun with domain names - by venam - 26-08-2020, 11:16 AM
RE: Fun with domain names - by z3bra - 27-08-2020, 05:24 AM
RE: Fun with domain names - by venam - 27-08-2020, 05:41 AM
RE: Fun with domain names - by venam - 27-08-2020, 07:00 AM