From 0328a24e07d31afe27d83f0fc480e9ec7dd98002 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Sun, 14 Jun 2009 14:10:32 +0000 Subject: [PATCH] Cleanup GetAdaptersAddresses. Add GetIfTable2 and GetIfEntry2 stubs based on janderwald patch svn path=/trunk/; revision=41409 --- reactos/dll/win32/iphlpapi/iphlpapi.rbuild | 2 +- reactos/dll/win32/iphlpapi/iphlpapi.spec | 2 ++ reactos/dll/win32/iphlpapi/iphlpapi_main.c | 34 ++++++++++++++++++- reactos/dll/win32/iphlpapi/iphlpapi_private.h | 2 ++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.rbuild b/reactos/dll/win32/iphlpapi/iphlpapi.rbuild index 7e6919c9014..22385f0432c 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi.rbuild +++ b/reactos/dll/win32/iphlpapi/iphlpapi.rbuild @@ -1,6 +1,6 @@ - include + . include/reactos/wine wine ntdll diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.spec b/reactos/dll/win32/iphlpapi/iphlpapi.spec index 5ac88233c22..0f6f7af5076 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi.spec +++ b/reactos/dll/win32/iphlpapi/iphlpapi.spec @@ -40,8 +40,10 @@ @ stub GetIcmpStatsFromStack @ stub GetIcmpStatsFromStackEx @ stdcall GetIfEntry( ptr ) +@ stdcall GetIfEntry2( ptr ) @ stub GetIfEntryFromStack @ stdcall GetIfTable( ptr ptr long ) +@ stdcall GetIfTable2(ptr) @ stub GetIfTableFromStack @ stub GetIgmpList @ stdcall GetInterfaceInfo( ptr ptr ) diff --git a/reactos/dll/win32/iphlpapi/iphlpapi_main.c b/reactos/dll/win32/iphlpapi/iphlpapi_main.c index 2ab79099f4c..6fcdfcec58a 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi_main.c +++ b/reactos/dll/win32/iphlpapi/iphlpapi_main.c @@ -2179,9 +2179,12 @@ PIP_ADAPTER_ORDER_MAP WINAPI GetAdapterOrderMap(VOID) DWORD WINAPI GetAdaptersAddresses(ULONG Family,ULONG Flags,PVOID Reserved,PIP_ADAPTER_ADDRESSES pAdapterAddresses,PULONG pOutBufLen) { if (!pOutBufLen) return ERROR_INVALID_PARAMETER; + if (!pAdapterAddresses || *pOutBufLen == 0) + return ERROR_BUFFER_OVERFLOW; + if (Reserved) return ERROR_INVALID_PARAMETER; FIXME(":stub\n"); - return 0L; + return ERROR_NO_DATA; } /* @@ -2220,4 +2223,33 @@ DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX pStats,DWORD dwFamily) return 0L; } +/****************************************************************** + * GetIfTable2 (IPHLPAPI.@) + * + * PARAMS + * pIfTable [In/Out] + */ + +NETIOAPI_API WINAPI GetIfTable2(PMIB_IF_TABLE2 *pIfTable) +{ + UNIMPLEMENTED; + return ERROR_NOT_SUPPORTED; +} + +/****************************************************************** + * GetIfEntry2 (IPHLPAPI.@) + * + * PARAMS + * pIfRow [In/Out] + */ +NETIOAPI_API WINAPI GetIfEntry2(IN OUT PMIB_IF_ROW2 pIfRow) +{ + TRACE("pIfRow %p\n", pIfRow); + if (!pIfRow) + return ERROR_INVALID_PARAMETER; + + UNIMPLEMENTED; + return ERROR_NOT_SUPPORTED; +} + diff --git a/reactos/dll/win32/iphlpapi/iphlpapi_private.h b/reactos/dll/win32/iphlpapi/iphlpapi_private.h index 98d3f732d6b..a41934c8f15 100644 --- a/reactos/dll/win32/iphlpapi/iphlpapi_private.h +++ b/reactos/dll/win32/iphlpapi/iphlpapi_private.h @@ -23,6 +23,7 @@ #define _WIN32_WINNT 0x500 #define WIN32_NO_STATUS #include +#include #include #define NTOS_MODE_USER #include @@ -32,6 +33,7 @@ #include "resinfo.h" #include "wine/debug.h" +//#include "ntddndis.h" #include "ddk/tdiinfo.h" #include "tcpioctl.h" -- 2.17.1