On Wed, Mar 02, 2011 at 01:27:47AM +0200, Graham Leggett wrote: > Hi all, > > I am currently struggling to get DNSServiceGetAddrInfo() from > zeroconf to work nicely with apr_portable.h, and need to clarify > whether I am missing anything. > > DNSServiceGetAddrInfo() returns the DNS lookup in a structure > "struct sockaddr *" which I need to convert into an "apr_sockaddr_t > *", but I am struggling to find the corresponding function to do it. > Is this an oversight in apr or have I missed something?
Hiya - there is nothing to stop you from populating the apr_sockaddr_t "by hand" since the structure is not opaque; you have to duplicate the functionality (or a subset) of apr_sockaddr_vars_set() to set up the pointers appropriately. I wouldn't see a problem with adding a new function which took (pool, struct sockaddr *) and did this internally. Regards, Joe
