apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: [PATCH] change apr_connect() to take apr_sockaddr_t, add apr_getaddrinfo()
Date Thu, 16 Nov 2000 19:10:37 GMT
rbb@covalent.net writes:

> > +
> > +apr_status_t apr_getaddrinfo(apr_sockaddr_t **sa, 
> > +                             const char *hostname,
> > +                             apr_int32_t family,
> > +                             apr_port_t port,
> > +                             apr_pool_t *p);
> 
> Can/should we make the hostname, family, port, and pool a complete
> structure that is shared across platforms?  Kind of like
> apr_finfo_t?

That common structure is the apr_sockaddr_t, which (supposedly) has
everything needed to represent a peer -- the stuff you mentioned and a
few other things.  Since apr_getaddrinfo() is a way to build the
apr_sockaddr_t, it needs that information as parameters.

> > +static void set_sockaddr_vars(apr_sockaddr_t *addr, int family)
> > +{
> > +    addr->sa.sin.sin_family = family;
> > +    addr->sa.sin.sin_family = family;
> 
> Why twice?

for *emphasis* (blush)

Thanks :)
-- 
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