Messages in this thread |  | | Date | Thu, 06 Sep 2001 22:48:54 -0700 | From | Ben Greear <> | Subject | Re: notion of a local address [was: Re: ioctl SIOCGIFNETMASK: ip aliasbug 2.4.9 and 2.2.19] |
| |
"H. Peter Anvin" wrote:
> 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.
That will always work, even when you have multiple ethernet interfaces??
Ben
-- Ben Greear <greearb@candelatech.com> <Ben_Greear@excite.com> President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear - 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/
|  |