From: Alex Henrie alexhenrie24@gmail.com
Needed to compile Tera Term. --- dlls/ws2_32/Makefile.in | 1 + dlls/ws2_32/inaddr.c | 52 +++++++++++++++++++++++++++++++++++++++++ include/ws2ipdef.h | 25 ++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 dlls/ws2_32/inaddr.c
diff --git a/dlls/ws2_32/Makefile.in b/dlls/ws2_32/Makefile.in index 83ae5e915ae..c303e73d9c8 100644 --- a/dlls/ws2_32/Makefile.in +++ b/dlls/ws2_32/Makefile.in @@ -5,6 +5,7 @@ DELAYIMPORTS = dnsapi advapi32 iphlpapi user32
C_SRCS = \ async.c \ + inaddr.c \ protocol.c \ socket.c \ unixlib.c diff --git a/dlls/ws2_32/inaddr.c b/dlls/ws2_32/inaddr.c new file mode 100644 index 00000000000..f226908d02c --- /dev/null +++ b/dlls/ws2_32/inaddr.c @@ -0,0 +1,52 @@ +/* + * ws2_32 static library constants + * + * Copyright 2022 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#if 0 +#pragma makedep implib +#endif + +#include "winsock2.h" +#include "mstcpip.h" +#include "ws2ipdef.h" + +const IN_ADDR in4addr_alligmpv3routersonlink = {{ IN4ADDR_ALLIGMPV3ROUTERSONLINK_INIT }}; +const IN_ADDR in4addr_allnodesonlink = {{ IN4ADDR_ALLNODESONLINK_INIT }}; +const IN_ADDR in4addr_allroutersonlink = {{ IN4ADDR_ALLROUTERSONLINK_INIT }}; +const IN_ADDR in4addr_allteredohostsonlink = {{ IN4ADDR_ALLTEREDONODESONLINK_INIT }}; +const IN_ADDR in4addr_any = {{ IN4ADDR_ANY_INIT }}; +const IN_ADDR in4addr_broadcast = {{ IN4ADDR_BROADCAST_INIT }}; +const IN_ADDR in4addr_linklocalprefix = {{ IN4ADDR_LINKLOCALPREFIX_INIT }}; +const IN_ADDR in4addr_loopback = {{ IN4ADDR_LOOPBACK_INIT }}; +const IN_ADDR in4addr_multicastprefix = {{ IN4ADDR_MULTICASTPREFIX_INIT }}; + +const IN6_ADDR in6addr_6to4prefix = {{ IN6ADDR_6TO4PREFIX_INIT }}; +const IN6_ADDR in6addr_allmldv2routersonlink = {{ IN6ADDR_ALLMLDV2ROUTERSONLINK_INIT }}; +const IN6_ADDR in6addr_allnodesonlink = {{ IN6ADDR_ALLNODESONLINK_INIT }}; +const IN6_ADDR in6addr_allnodesonnode = {{ IN6ADDR_ALLNODESONNODE_INIT }}; +const IN6_ADDR in6addr_allroutersonlink = {{ IN6ADDR_ALLROUTERSONLINK_INIT }}; +const IN6_ADDR in6addr_any = {{ IN6ADDR_ANY_INIT }}; +const IN6_ADDR in6addr_linklocalprefix = {{ IN6ADDR_LINKLOCALPREFIX_INIT }}; +const IN6_ADDR in6addr_loopback = {{ IN6ADDR_LOOPBACK_INIT }}; +const IN6_ADDR in6addr_multicastprefix = {{ IN6ADDR_MULTICASTPREFIX_INIT }}; +const IN6_ADDR in6addr_solicitednodemulticastprefix = {{ IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_INIT }}; +const IN6_ADDR in6addr_teredoinitiallinklocaladdress = {{ IN6ADDR_TEREDOINITIALLINKLOCALADDRESS_INIT }}; +const IN6_ADDR in6addr_teredoprefix = {{ IN6ADDR_TEREDOPREFIX_INIT }}; +const IN6_ADDR in6addr_teredoprefix_old = {{ IN6ADDR_TEREDOPREFIX_INIT_OLD }}; +const IN6_ADDR in6addr_v4mappedprefix = {{ IN6ADDR_V4MAPPEDPREFIX_INIT }}; diff --git a/include/ws2ipdef.h b/include/ws2ipdef.h index 51d4c9f5ac2..773f4c09dc5 100644 --- a/include/ws2ipdef.h +++ b/include/ws2ipdef.h @@ -386,6 +386,31 @@ typedef struct WS(in6_pktinfo) { #define WS_SIO_IDEAL_SEND_BACKLOG_QUERY WS__IOR('t', 123, ULONG) #endif
+extern const IN_ADDR WS(in4addr_alligmpv3routersonlink); +extern const IN_ADDR WS(in4addr_allnodesonlink); +extern const IN_ADDR WS(in4addr_allroutersonlink); +extern const IN_ADDR WS(in4addr_allteredohostsonlink); +extern const IN_ADDR WS(in4addr_any); +extern const IN_ADDR WS(in4addr_broadcast); +extern const IN_ADDR WS(in4addr_linklocalprefix); +extern const IN_ADDR WS(in4addr_loopback); +extern const IN_ADDR WS(in4addr_multicastprefix); + +extern const IN6_ADDR WS(in6addr_6to4prefix); +extern const IN6_ADDR WS(in6addr_allmldv2routersonlink); +extern const IN6_ADDR WS(in6addr_allnodesonlink); +extern const IN6_ADDR WS(in6addr_allnodesonnode); +extern const IN6_ADDR WS(in6addr_allroutersonlink); +extern const IN6_ADDR WS(in6addr_any); +extern const IN6_ADDR WS(in6addr_linklocalprefix); +extern const IN6_ADDR WS(in6addr_loopback); +extern const IN6_ADDR WS(in6addr_multicastprefix); +extern const IN6_ADDR WS(in6addr_solicitednodemulticastprefix); +extern const IN6_ADDR WS(in6addr_teredoinitiallinklocaladdress); +extern const IN6_ADDR WS(in6addr_teredoprefix); +extern const IN6_ADDR WS(in6addr_teredoprefix_old); +extern const IN6_ADDR WS(in6addr_v4mappedprefix); + #ifdef __cplusplus extern "C" { #endif