Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 554 of file ipconfig.c.
{ IP_ADAPTER_INDEX_MAP AdapterInfo; DWORD ret; DWORD i; /* if interface is not given, query GetInterfaceInfo */ if (Index == NULL) { PIP_INTERFACE_INFO pInfo = NULL; ULONG ulOutBufLen = 0; if (GetInterfaceInfo(pInfo, &ulOutBufLen) == ERROR_INSUFFICIENT_BUFFER) { pInfo = (IP_INTERFACE_INFO *)HeapAlloc(ProcessHeap, 0, ulOutBufLen); if (pInfo == NULL) return; if (GetInterfaceInfo(pInfo, &ulOutBufLen) == NO_ERROR ) { for (i = 0; i < pInfo->NumAdapters; i++) { CopyMemory(&AdapterInfo, &pInfo->Adapter[i], sizeof(IP_ADAPTER_INDEX_MAP)); _tprintf(_T("name - %S\n"), pInfo->Adapter[i].Name); /* Call IpReleaseAddress to release the IP address on the specified adapter. */ if ((ret = IpReleaseAddress(&AdapterInfo)) != NO_ERROR) { _tprintf(_T("\nAn error occured while releasing interface %S : \n"), AdapterInfo.Name); DoFormatMessage(ret); } } HeapFree(ProcessHeap, 0, pInfo); } else { DoFormatMessage(0); HeapFree(ProcessHeap, 0, pInfo); return; } } else { DoFormatMessage(0); return; } } else { ; /* FIXME: * we need to be able to release connections by name with support for globbing * i.e. ipconfig /release Eth* will release all cards starting with Eth... * ipconfig /release *con* will release all cards with 'con' in their name */ } }