* DWORD
*
*/
-DWORD WINAPI AddIPAddress(IPAddr Address, IPMask IpMask, DWORD IfIndex, PULONG NTEContext, PULONG NTEInstance)
+DWORD WINAPI AddIPAddress(IPAddr Address, IPMask Netmask, DWORD IfIndex, PULONG NteContext, PULONG NteInstance)
{
- FIXME(":stub\n");
- /* marking Win2K+ functions not supported */
- return ERROR_NOT_SUPPORTED;
+ return addIPAddress( Address, Netmask, IfIndex, NteContext, NteInstance );
}
DWORD WINAPI DeleteIPAddress(ULONG NTEContext)
{
TRACE("NTEContext %ld\n", NTEContext);
- FIXME(":stub\n");
- /* marking Win2K+ functions not supported */
- return ERROR_NOT_SUPPORTED;
+ return deleteIpAddress( NTEContext );
}
if (!dwOutBufLen)
ret = ERROR_INVALID_PARAMETER;
else {
- DWORD numInterfaces = getNumInterfaces();
- ULONG size = sizeof(IP_INTERFACE_INFO) + (numInterfaces - 1) *
+ DWORD numNonLoopbackInterfaces = getNumNonLoopbackInterfaces();
+ DPRINT("numNonLoopbackInterfaces == 0x%x\n", numNonLoopbackInterfaces);
+ ULONG size = sizeof(IP_INTERFACE_INFO) + (numNonLoopbackInterfaces) *
sizeof(IP_ADAPTER_INDEX_MAP);
if (!pIfTable || *dwOutBufLen < size) {
ret = ERROR_INSUFFICIENT_BUFFER;
}
else {
- InterfaceIndexTable *table = getInterfaceIndexTable();
+ InterfaceIndexTable *table = getNonLoopbackInterfaceIndexTable();
+ DPRINT("table->numIndexes == 0x%x\n", table->numIndexes);
if (table) {
- size = sizeof(IP_INTERFACE_INFO) + (table->numIndexes - 1) *
+ size = sizeof(IP_INTERFACE_INFO) + (table->numIndexes) *
sizeof(IP_ADAPTER_INDEX_MAP);
if (*dwOutBufLen < size) {
*dwOutBufLen = size;