Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- The Windows header only defines NET_ADDRESS_FORMAT and NET_ADDRESS_INFO if windns.h is included before iphlpapi.h. --- include/iphlpapi.h | 47 ++++++++++++++++++++++++++++++++++++++++++++++ include/windns.h | 1 + 2 files changed, 48 insertions(+)
diff --git a/include/iphlpapi.h b/include/iphlpapi.h index f52387a1ca..a087d7fd69 100644 --- a/include/iphlpapi.h +++ b/include/iphlpapi.h @@ -26,6 +26,26 @@ extern "C" { #include <ipexport.h> #include <iptypes.h>
+#define NET_STRING_IPV4_ADDRESS 0x00000001 +#define NET_STRING_IPV4_SERVICE 0x00000002 +#define NET_STRING_IPV4_NETWORK 0x00000004 +#define NET_STRING_IPV6_ADDRESS 0x00000008 +#define NET_STRING_IPV6_ADDRESS_NO_SCOPE 0x00000010 +#define NET_STRING_IPV6_SERVICE 0x00000020 +#define NET_STRING_IPV6_SERVICE_NO_SCOPE 0x00000040 +#define NET_STRING_IPV6_NETWORK 0x00000080 +#define NET_STRING_NAMED_ADDRESS 0x00000100 +#define NET_STRING_NAMED_SERVICE 0x00000200 +#define NET_STRING_IP_ADDRESS (NET_STRING_IPV4_ADDRESS|NET_STRING_IPV6_ADDRESS) +#define NET_STRING_IP_ADDRESS_NO_SCOPE (NET_STRING_IPV4_ADDRESS|NET_STRING_IPV6_ADDRESS_NO_SCOPE) +#define NET_STRING_IP_SERVICE (NET_STRING_IPV4_SERVICE|NET_STRING_IPV6_SERVICE) +#define NET_STRING_IP_SERVICE_NO_SCOPE (NET_STRING_IPV4_SERVICE|NET_STRING_IPV6_SERVICE_NO_SCOPE) +#define NET_STRING_IP_NETWORK (NET_STRING_IPV4_NETWORK|NET_STRING_IPV6_NETWORK) +#define NET_STRING_ANY_ADDRESS (NET_STRING_NAMED_ADDRESS|NET_STRING_IP_ADDRESS) +#define NET_STRING_ANY_ADDRESS_NO_SCOPE (NET_STRING_NAMED_ADDRESS|NET_STRING_IP_ADDRESS_NO_SCOPE) +#define NET_STRING_ANY_SERVICE (NET_STRING_NAMED_SERVICE|NET_STRING_IP_SERVICE) +#define NET_STRING_ANY_SERVICE_NO_SCOPE (NET_STRING_NAMED_SERVICE|NET_STRING_IP_SERVICE_NO_SCOPE) + DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder, ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved);
@@ -162,6 +182,33 @@ DWORD WINAPI AllocateAndGetTcpExTableFromStack(VOID **ppTcpTable, BOOL bOrder, H DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, BOOL bOrder, HANDLE heap, DWORD flags); DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForwardTable, BOOL bOrder, HANDLE heap, DWORD flags);
+#ifdef __WINE_WINDNS_H + +typedef enum NET_ADDRESS_FORMAT_ { + NET_ADDRESS_FORMAT_UNSPECIFIED, + NET_ADDRESS_DNS_NAME, + NET_ADDRESS_IPV4, + NET_ADDRESS_IPV6, +} NET_ADDRESS_FORMAT; + +typedef struct NET_ADDRESS_INFO_ +{ + NET_ADDRESS_FORMAT Format; + union + { + struct + { + WCHAR Address[DNS_MAX_NAME_BUFFER_LENGTH]; + WCHAR Port[6]; + } NamedAddress; + SOCKADDR_IN Ipv4Address; + SOCKADDR_IN6 Ipv6Address; + SOCKADDR IpAddress; + } DUMMYUNIONNAME; +} NET_ADDRESS_INFO, *PNET_ADDRESS_INFO; + +#endif /* __WINE_WINDNS_H */ + #ifdef __cplusplus } #endif diff --git a/include/windns.h b/include/windns.h index d9a4b9adb0..9a31fac604 100644 --- a/include/windns.h +++ b/include/windns.h @@ -177,6 +177,7 @@ typedef struct #define DNS_ADDRESS_STRING_LENGTH IP6_ADDRESS_STRING_LENGTH #define IP4_ADDRESS_STRING_BUFFER_LENGTH IP4_ADDRESS_STRING_LENGTH #define IP6_ADDRESS_STRING_BUFFER_LENGTH IP6_ADDRESS_STRING_LENGTH +#define DNS_MAX_NAME_BUFFER_LENGTH 256
typedef struct _IP4_ARRAY {