You mean ink_res_sockaddr_union in ink_resolver.h? I just deleted that and changed all uses to sockaddr_storage. I think it's better to use a standard type rather than introducing yet another ATS local type. The accessibility it provided via union will be done by the ip_cast functions.
My general view is, keep everything as a sockaddr_storage until you actually need to extract something, then do that as locally as possible. There's little point in extracting an IPv4 addr, passing it off, then putting it back in a sockaddr_in which is cast to a sockaddr to pass to accept() or something. You can just cast the sockaddr_storage to sockaddr at the call site and never open it up at all. I plan to update / rewrite / extend inet_ntop() et. al. to handle sockaddr_storage directly so you don't have to extract to print either. P.S. All of this header stuff will be put in ink_inet.h which seems the best place. P.P.S. I will also have to remove most if not all of the gethostbyname() calls and replace them with getnameinfo(). It's a can of worms (unexpectedly!). Friday, April 22, 2011, 12:48:33 PM, you wrote: > Sounds good. One suggestions, can we combine the existing > sockaddr_storage container that was added for IPv6 to the client? I.e. > lets avoid duplicating this stuff if possible?