lkml.org 
[lkml]   [2001]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: notion of a local address [was: Re: ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19]
Date
Followup to:  <20010906173948.502BFBC06C@spike.porcupine.org>
By author: wietse@porcupine.org (Wietse Venema)
In newsgroup: linux.dev.kernel
>
> The SMTP RFC requires that user@[ip.address] is correctly recognized
> as a final destination. This requires that Linux provides the MTA
> with information about IP addresses that correspond with INADDR_ANY.
>
> I am susprised that it is not possible to ask such information up
> front (same with netmasks), and that an application has to actually
> query a complex oracle, again and again, for every IP address.
>

In autofs, I use the following technique to determine if the IP number
for a host is local (and therefore vfsbinds can be used rather than
NFS mounts):

connect a datagram socket (which won't produce any actual traffic) to
the remote host with INADDR_ANY as the local address, and then query
the local address. If the local address is the same as the remote
address, the address is local.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:02    [W:0.111 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site