This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] supports IPv6 only remote target


Hi Eli,

> Is it feasible to copy the necessary bits from that header

I do not think so, because wspapi.h itself exists for backward compatibility.
It should be easier adding wspapi.h to MSYS than copying from it.

MSYS ws2tcpip.h says;

#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
/**
* For WIN2K the user includes wspiapi.h for these functions.
*/
void WSAAPI freeaddrinfo (struct addrinfo*);
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
        struct addrinfo**);
int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
       char*,DWORD,int);
#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WINXP) */

Is it better to try to update configure.ac to decide to use IPv6(getaddrinfo)
or stay on IPv4(gethostbyname)? I'm not familiar with autoconf, though.

# I'm resending this message because I'd accidentally sent HTML mail
# from smartphone and it was rejected. I'm sorry if you have received
# duplicated message.

Regards,
Seki, Tsutomu

2016-02-11 3:13 GMT+09:00 Eli Zaretskii <eliz@gnu.org>:
>> Date: Wed, 10 Feb 2016 20:43:40 +0900
>> From: Tsutomu Seki <sekiriki@gmail.com>
>> Cc: gdb-patches@sourceware.org
>>
>> Changed address to be "@code{fe80::1%eth1}", to include scope id
>> as written later.
>>
>> > This example seems to imply that more than just taking brackets
>> > is required.
>>
>> Your are right. This implies address/port separation rule and
>> address/scope separation rule. The former should be documented,
>> because address/port separation is done by the application before
>> passing them to getaddrinfo.
>>
>> > Should we tell more about that?
>>
>> On the other hand, the latter is difficult to document (for me) in
>> generic manner, because %-style scope-id notation depends on
>> implementation of getaddrinfo.
>
> I think what you did is good enough, thanks.
>
>> > I think this will break the build with mingw.org's MinGW.  It doesn't
>> > have wspiapi.h, AFAIK.  What exactly is needed from that header?
>>
>> It is needed to support getaddrinfo() on Windows 2000 and older versions.
>>
>> What can I do for it?  The easiest solution is to replace with <ws2tcpip.h>,
>> but Windows 2000 support (as a host) would be dropped.
>
> Is it feasible to copy the necessary bits from that header, i.e. have
> the prototype in ser-tcp.c (or in some suitable GDB header file)?
>
> Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]