Question about getaddrinfo in Inet4AddressImpl.c

Charles Lee littlee at linux.vnet.ibm.com
Wed Nov 2 01:34:56 PDT 2011


On 10/26/2011 06:31 PM, Chris Hegarty wrote:
> On 26/10/2011 10:36, Alan Bateman wrote:
>> On 26/10/2011 10:24, Charles Lee wrote:
>>>
>>>
>>> />>> I don't think this code has changed too much since then and
>>> probably could do with a clean-up./
>>> Not true.
>> I'm talking about the InetAddress* code, that hasn't changed
>> significantly and probably could do with some modernization now.
>
> Yes, please submit a patch for this cleanup and we'll review it.
>
> -Chris.
>
>>
>> -Alan.
>
Hi Alan, Chris and Neil,

Here is the early review version of cleanup patch (attached). It only 
changes Inet4AddressImpl.c file and does:
1. Inet4AddressImpl_getLocalHostName is changed to use getaddrinfo things.
2. Inet4AddressImpl_lookupAllHostAddr is changed to use getaddrinfo things.
3. Inet4AddressImpl_getHostByAddr is changed to use getaddrinfo things.

I am not using function pointer but function directly.

There are some things I will do next step:
1. Remove NET_addrtransAvailable() in the net_util_md.[ch]
2. Remove function pointer assignment in the net_util._md.c 
IPv6_supported method.
3. Remove the NET_addrtransAvailable() check in the Inet6AddressImpl.c
4. Use the direct function instead of the function pointer in the 
Inet6AddressImpl.c

Since this patch will be a little big, I would like to post the patch 
step by step. Any suggestions and comments?

P.S. Neil, would you please help to file a CR about this issue?

-- 
Yours Charles

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.contr.v1
Url: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20111102/c390ae20/patch.contr.v1 


More information about the net-dev mailing list