* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#include "iphlpapi_private.h"
#include <stdarg.h>
#include <stdlib.h>
# include <resolv.h>
#endif
-#ifdef __REACTOS__
-# include <windows.h>
-# include <windef.h>
-# include <winbase.h>
-# include <net/miniport.h>
-# include <winsock2.h>
-# include <nspapi.h>
-# include <iptypes.h>
-# include "iphlpapiextra.h"
-# include "wine/debug.h"
-#else
-# include "windef.h"
-# include "winbase.h"
-# include "winreg.h"
-# include "debug.h"
-#endif
-#include <stdio.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
#include "iphlpapi.h"
#include "ifenum.h"
#include "ipstats.h"
-#include "iphlp_res.h"
+#include "resinfo.h"
+#include "route.h"
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(iphlpapi);
*/
DWORD WINAPI CreateIpForwardEntry(PMIB_IPFORWARDROW pRoute)
{
- TRACE("pRoute %p\n", pRoute);
- /* could use SIOCADDRT, not sure I want to */
- FIXME(":stub\n");
- return (DWORD) 0;
+ return createIpForwardEntry( pRoute );
}
*/
DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW pRoute)
{
- TRACE("pRoute %p\n", pRoute);
- /* could use SIOCDELRT, not sure I want to */
- FIXME(":stub\n");
- return (DWORD) 0;
+ return deleteIpForwardEntry( pRoute );
}
for (ndx = 0; ndx < table->numIndexes; ndx++) {
PIP_ADAPTER_INFO ptr = &pAdapterInfo[ndx];
DWORD addrLen = sizeof(ptr->Address), type;
- const char *ifname =
- getInterfaceNameByIndex(table->indexes[ndx]);
+ const char *ifname =
+ getInterfaceNameByIndex(table->indexes[ndx]);
/* on Win98 this is left empty, but whatever */
-
+
strncpy(ptr->AdapterName,ifname,sizeof(ptr->AdapterName));
- consumeInterfaceName(ifname);
+ consumeInterfaceName(ifname);
ptr->AdapterName[MAX_ADAPTER_NAME_LENGTH] = '\0';
getInterfacePhysicalByIndex(table->indexes[ndx], &addrLen,
ptr->Address, &type);
if (name) {
ret = getInterfaceEntryByIndex(pIfRow->dwIndex, pIfRow);
if (ret == NO_ERROR)
- ret = getInterfaceStatsByIndex(pIfRow->dwIndex, pIfRow);
+ ret = getInterfaceStatsByName(name, pIfRow);
consumeInterfaceName(name);
}
else
walker++, assigner++)
*assigner = *walker;
*assigner = 0;
- consumeInterfaceName(name);
+ consumeInterfaceName(name);
pIfTable->NumAdapters++;
}
ret = NO_ERROR;
DWORD ret;
TRACE("pIpForwardTable %p, pdwSize %p, bOrder %ld\n", pIpForwardTable,
- pdwSize, (DWORD)bOrder);
+ pdwSize, (DWORD)bOrder);
if (!pdwSize)
ret = ERROR_INVALID_PARAMETER;
else {
if (!resInfo)
return ERROR_OUTOFMEMORY;
- TRACE("resInfo->riCount = %d\n", resInfo->riCount);
-
size = sizeof(FIXED_INFO) + (resInfo->riCount > 0 ? (resInfo->riCount - 1) *
sizeof(IP_ADDR_STRING) : 0);
if (!pFixedInfo || *pOutBufLen < size) {
for (i = 0, ptr = &pFixedInfo->DnsServerList; i < resInfo->riCount && ptr;
i++, ptr = ptr->Next) {
- toIPAddressString
- (((PSOCKADDR_IN)&resInfo->riAddressList[i])->sin_addr.s_addr,
- ptr->IpAddress.String);
+ struct sockaddr_in *addr_v4 =
+ (struct sockaddr_in *)&resInfo->riAddressList[i];
+ toIPAddressString
+ (addr_v4->sin_addr.s_addr,
+ ptr->IpAddress.String);
if (i == resInfo->riCount - 1)
ptr->Next = NULL;
else if (i == 0)
*/
DWORD WINAPI SetIpForwardEntry(PMIB_IPFORWARDROW pRoute)
{
- TRACE("pRoute %p\n", pRoute);
- /* this is to add a route entry, how's it distinguishable from
- CreateIpForwardEntry?
- could use SIOCADDRT, not sure I want to */
- FIXME(":stub\n");
- return (DWORD) 0;
+ return setIpForwardEntry( pRoute );
}
/*
* @unimplemented
*/
-DWORD STDCALL GetIpErrorString(IP_STATUS ErrorCode,PWCHAR Buffer,PDWORD Size)
+DWORD WINAPI GetIpErrorString(IP_STATUS ErrorCode,PWCHAR Buffer,PDWORD Size)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
/*
* @unimplemented
*/
-PIP_ADAPTER_ORDER_MAP STDCALL GetAdapterOrderMap(VOID)
+PIP_ADAPTER_ORDER_MAP WINAPI GetAdapterOrderMap(VOID)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
/*
* @unimplemented
*/
-DWORD STDCALL GetAdaptersAddresses(ULONG Family,DWORD Flags,PVOID Reserved,PIP_ADAPTER_ADDRESSES pAdapterAddresses,PULONG pOutBufLen)
+DWORD WINAPI GetAdaptersAddresses(ULONG Family,DWORD Flags,PVOID Reserved,PIP_ADAPTER_ADDRESSES pAdapterAddresses,PULONG pOutBufLen)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
/*
* @unimplemented
*/
-BOOL STDCALL CancelIPChangeNotify(LPOVERLAPPED notifyOverlapped)
+BOOL WINAPI CancelIPChangeNotify(LPOVERLAPPED notifyOverlapped)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
/*
* @unimplemented
*/
-DWORD STDCALL GetBestInterfaceEx(struct sockaddr *pDestAddr,PDWORD pdwBestIfIndex)
+DWORD WINAPI GetBestInterfaceEx(struct sockaddr *pDestAddr,PDWORD pdwBestIfIndex)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
/*
* @unimplemented
*/
-DWORD STDCALL NhpAllocateAndGetInterfaceInfoFromStack(IP_INTERFACE_NAME_INFO **ppTable,PDWORD pdwCount,BOOL bOrder,HANDLE hHeap,DWORD dwFlags)
+DWORD WINAPI NhpAllocateAndGetInterfaceInfoFromStack(IP_INTERFACE_NAME_INFO **ppTable,PDWORD pdwCount,BOOL bOrder,HANDLE hHeap,DWORD dwFlags)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
/*
* @unimplemented
*/
-DWORD STDCALL GetIcmpStatisticsEx(PMIB_ICMP_EX pStats,DWORD dwFamily)
+DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX pStats,DWORD dwFamily)
{
- UNIMPLEMENTED
+ FIXME(":stub\n");
return 0L;
}
+