httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: APR'ize code...
Date Fri, 10 Nov 2000 19:16:09 GMT
"David Reid" <dreid@jetnet.co.uk> writes:

> This code needs to be changed to use apr functions.  It's quite apache
> specific so I'm not sure it belongs in APR, but I don't think we have the
> functions in APR to let us apr'ize it at the moment...

You could have something like

  apr_check_reverse_lookup(apr_socket_t *sock)

It could first do reverse lookup to find the name from the remote IP
address (unless already performed, in which case it would be cached
inside the apr_sockaddr_t of the peer), then do normal lookup on the
resulting hostname and ensure that the original IP address matches one
of the IP addresses returned from the normal lookup...

(I'm not sure that you intended to use apr_sockaddr_t inside
apr_socket_t, but doing so give us a place to cache a reverse
lookup which in turn eliminates the need to cache the reverse lookup
in conn_rec->remote_host.)
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message