apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject OK...
Date Thu, 16 Nov 2000 11:56:06 GMT
OK so Jeff has  convinced me about not needing apr_in_addr_t's.  So I'm
going to work on removing the apr_in_addr_t from the code all together...
There are a lot of questions that start with ??? so answers from anyone with
a point of view please!

1.  Modify connect to take an apr_sockaddr_t instead of a hostname...  This
is a simple change so I'll make it sooner rather than later.
??? Do we change apr_gethostbyname to return an apr_sockaddr_t?
This would then give
    apr_sockaddr_t *sa;
    apr_gethostbyname(&sa, "hostname", pool);
    apr_connect(sock, sa);
We don't seem to be using apr_gethostbyname so we should be safe in making
this change.

2. Are we agreed on Jeff's suggestions of
Add apr_pool_t * to apr_sockaddr_t.
apr_status_t apr_get_address(char **hostname, apr_interface_e which,
apr_socket_t *sock);
apr_status_t apr_get_nas(char **addr, apr_sockaddr_t *sa);
These are new additions sos houldn't interfere with any existing code.

3. Before we can take this further, I guess we need to add the following
though...

apr_status_t apr_compare_sockaddr(apr_sockaddr_t *a, apr_sockaddr_t *b);
Basically compare 2 apr_sockaddr_t... return APR_SUCCESS ot the compare
results, (1/-1 etc)  this is needed in http_vhost...
?? Do we want to add a flag for what we're comparing?  I mean do we have
APR_COMPARE_ADDRESS_ONLY
APR_COMPARE_PORT_ONLY
APR_COMPARE_ALL
??

apr_status_t apr_mask_sockaddr(apr_sockaddr_t *a, mask???);
This is based on what seems to be needed in mod_access.  We need some way of
checking if an IP is valid for a given mask.  I'm not sure how we'd do this
for v6, or even how we'd define the mask in a v6 environment, but it should
be possible.
??? What form should the mask take?

Comments??

david


Mime
View raw message