Jon Travis <[EMAIL PROTECTED]> writes:
> I need a routine to fetch the socket family. I could just refer
> to the information in the sockaddr_t address length, but that is
> rather hackish. Anyway, here tis. We should also probably be
> moving towards making the sockaddr_t an opaque type, or at least
> some of the members.
I think that the better place to look is addr->sa.sin.sin_family.
Hopefully you should be able to return this as-is.
On first thought, the partial opaqueness makes sense (though I don't
know how to do that neatly in C). Thinking down the road, the number
of accessor functions could get out of hand (similar to the
apr_fileinfo_t issue). I'm mostly happy with apps peering into the
apr_sockaddr_t, though maybe we need to make it friendlier by adding
(e.g.) a family field which starts out as APR_UNSPEC and is set once
we know the family.
--
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...