You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Alan M. Carroll" <am...@network-geographics.com> on 2012/04/01 03:49:33 UTC
Re: Cleaning up ink_gethostbyname_r and ink_gethostbyaddr_r
I have fixed TS-1166, TS-1167, TS-1168, TS-1017 all of which eliminate uses of gethostbyname. Looks to me like only clustering, web management, CoreAPIShared.cc in mgmt, and some test code are still problematic. Except for clustering those look like using ats_getbestaddrinfo() would work (since they just grab whatever's first in the gethostbyname return data). Brian, want to take a few of those?
Re: Cleaning up ink_gethostbyname_r and ink_gethostbyaddr_r
Posted by "Alan M. Carroll" <am...@network-geographics.com>.
Gah! The ats_ip_getbestaddrinfo bug is TS-1170. Not TS-1070.
Re: Cleaning up ink_gethostbyname_r and ink_gethostbyaddr_r
Posted by "Alan M. Carroll" <am...@network-geographics.com>.
ats_getbestaddrinfo is already implemented. It's in lib/ts/ink_inet.cc. It's a bit hard to use, I need to improve it :-) but you can see examples if you look at the commits for those issues. The issue is that you can get back both an IPv4 and an IPv6 address. I've filed TS-1070 to remind me to clean it up. If you have suggestions, please put them in comments on that issue.
For some of them I used ats_getbestaddrinfo, others I used getaddrinfo directly, and one I just removed the method because it wasn't used.
At this point I don't see much benefit to wrapping getaddrinfo.
Saturday, March 31, 2012, 8:56:40 PM, you wrote:
> Sure, on all of those tickets you just moved directly to getaddrinfo(), and
> I still need to write ats_getbestaddrinfo(), correct?
> Brian
Re: Cleaning up ink_gethostbyname_r and ink_gethostbyaddr_r
Posted by Brian Geffon <br...@apache.org>.
Sure, on all of those tickets you just moved directly to getaddrinfo(), and
I still need to write ats_getbestaddrinfo(), correct?
Brian
On Sat, Mar 31, 2012 at 6:49 PM, Alan M. Carroll <
amc@network-geographics.com> wrote:
> I have fixed TS-1166, TS-1167, TS-1168, TS-1017 all of which eliminate
> uses of gethostbyname. Looks to me like only clustering, web management,
> CoreAPIShared.cc in mgmt, and some test code are still problematic. Except
> for clustering those look like using ats_getbestaddrinfo() would work
> (since they just grab whatever's first in the gethostbyname return data).
> Brian, want to take a few of those?
>
>