Re: [EXIM] use of network names

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Users Mailing List
Dátum:  
Címzett: eml
Tárgy: Re: [EXIM] use of network names
[ On Thu, September 24, 1998 at 09:34:29 (+0100), Philip Hazel wrote: ]
> Subject: Re: [EXIM] use of network names
>
> (1) I've never had anything to do with /etc/networks. Does its syntax
> support the modern idea of a classless network such as
> 131.111.10.128/25? That is, if you entered 131.111.10.128 would it infer
> the /25?


/etc/networks should have been long ago deprecated for all intents and
purposes. See RFC 1101 for how it should be done using the DNS.
Unfortunately the IETF list the status of RFC 1101 as "UNKNOWN".

/etc/networks and the getnetent() et al routines used to access it aer
most definitely not CIDR compatible (at least in all implementations
that I'm aware of).

I have a hacked version of the gencidrzone.pl script included in the
BIND distribution which attempts to generate the appropriate RFC 1101
net names so that "class-less" network names can be resolved. However
as of yet there's been no update to getnetbyaddr() to discover these
names. Getnetbyname() can, of course, resolve their addresses though.

> (2) Of course, it would be relevant for sender_net_xxx options rather
> than sender_host_xxx options.
>
> (3) Do all Unixes have the getnetbyname() function?


The getnet*() functions are now actually a part of the DNS resolver
library, and in particular are supplied by BIND's libresolv.

Note that BIND's version of getnetbyname() and getnetbyaddr() fall back
on getnetent() if they get no answer from the DNS, which of course cause
them to read the local /etc/networks.

Unixes which have the really ancient version of BIND's libresolv
(definitely pre-4.9.2), or which have their own hacked versions of
libresolv, may still not be able to use RFC 1101 to query for network
names, but all with ancient BIND, or networking code based solely on
4BSD, will probably have the /etc/networks version only.

According to the manual pages everywhere (i.e. both BIND and 4BSD)
getnetbyname() et al appeared first in 4.2BSD.

Anyone capable of building libresolv.a from the recent BIND releases
will be able to compile and link applications using getnetbyname() with
that new library (and header files), regardless of the state of their
native unix environment. There's nothing magic about it, and it need
not be tied to the native OS.

-- 
                            Greg A. Woods


+1 416 218-0098      VE3TCP      <gwoods@???>      <robohack!woods>
Planix, Inc. <woods@???>; Secrets of the Weird <woods@???>


--
*** Exim information can be found at http://www.exim.org/ ***