Am 14.10.2012 21:14, schrieb Guy Harris:
>
> On Oct 14, 2012, at 10:50 AM, Martin Kaiser <lists@xxxxxxxxx> wrote:
>
>> as part of #7729, we have to parse a text string that contains an IPv6
>> address and convert it into a sequence of bytes - and detect malformed
>> addresses.
>>
>> The current proposal does the parsing manually. I was wondering if we
>> could simplify things by using getaddrinfo().
>
> You could probably simplify things even more by using inet_pton() (as Alexander Koeppe noted in the bug) rather than getaddrinfo().
>
> We're already using inet_pton() (and supply our own version for platforms where it's unavailable), so we can use it elsewhere.
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives: http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
>
I was afraid using inet_pton() not to include too much useless code and
so memory and of course availability on the differnt OSs. But if it's
already included it doesn't change anything and can be used.
I'll change the patch accordingly.
Thanks for clarifying.
Cheers
Alex