httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: apr_sockaddr_t
Date Fri, 10 Nov 2000 12:43:25 GMT
"David Reid" <> writes:

> Of course we should probably also have a family flag so we can check it...
> We can't use the sockaddr structures as we don't know which one we're
> looking at without knowing the family!

no, the family is always in the same place just to solve this
problem... simply look at sin_family...

> I realise we don't currently use some of these and the functions to do some
> of what I've described don't yet exist, but they will at some point and so
> we should plan on making the structure as useful as we can.
> In some ways I'd also like to add a set of pointers to the structure.  These
> would be pointers to the start of the family, sockaddr structure and port
> within wither the sin or sin6 structure.  By setting these when we know if
> we're v4 or v6 we can reduce the number of times we have to check, and so
> coding becomes much cleaner.

perhaps the offset to the port and a macro to encapsulate the use of
it would be useful...  we don't need the pointer to the family...

Jeff Trawick | | PGP public key at web site:
          Born in Roswell... married an alien...

View raw message