httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: APR'ize code...
Date Fri, 10 Nov 2000 19:10:59 GMT

Let's look at what we would need in APR to support this function, and make
those functions.  :-)

>     hptr = gethostbyname(conn->remote_host);

We should definately have a gethostbyname-like function.  This also solves
the thread-safeness issues surrounding this function.

> 	for (haddr = hptr->h_addr_list; *haddr; haddr++) {
> 	    if (((struct in_addr *)(*haddr))->s_addr
> 		== conn->remote_addr.sin_addr.s_addr) {
> 		conn->double_reverse = 1;
> 		return;

This is a simple comparison that we could create a simple function for,
but that seems like a bit of overkill.

Why not just create a simple APR function, apr_do_double_reverse?  A
double reverse lookup is a relatively standard function for any daemon
program.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message