mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 18:56:48 +00:00
[IPCONFIG] Show the Description and Physical Address for disconnected network adapters.
This commit is contained in:
parent
6734d4ca09
commit
419fb423ce
1 changed files with 20 additions and 9 deletions
|
@ -480,6 +480,7 @@ VOID ShowInfo(BOOL bAll)
|
||||||
while (pAdapter)
|
while (pAdapter)
|
||||||
{
|
{
|
||||||
LPTSTR IntType, myConType;
|
LPTSTR IntType, myConType;
|
||||||
|
BOOLEAN bConnected = TRUE;
|
||||||
|
|
||||||
mibEntry.dwIndex = pAdapter->Index;
|
mibEntry.dwIndex = pAdapter->Index;
|
||||||
GetIfEntry(&mibEntry);
|
GetIfEntry(&mibEntry);
|
||||||
|
@ -494,12 +495,13 @@ VOID ShowInfo(BOOL bAll)
|
||||||
/* check if the adapter is connected to the media */
|
/* check if the adapter is connected to the media */
|
||||||
if (mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_CONNECTED && mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_OPERATIONAL)
|
if (mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_CONNECTED && mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_OPERATIONAL)
|
||||||
{
|
{
|
||||||
|
bConnected = FALSE;
|
||||||
_tprintf(_T("\tMedia State . . . . . . . . . . . : Media disconnected\n"));
|
_tprintf(_T("\tMedia State . . . . . . . . . . . : Media disconnected\n"));
|
||||||
pAdapter = pAdapter->Next;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
_tprintf(_T("\tConnection-specific DNS Suffix. . : %s\n"), pFixedInfo->DomainName);
|
_tprintf(_T("\tConnection-specific DNS Suffix. . : %s\n"), pFixedInfo->DomainName);
|
||||||
|
}
|
||||||
|
|
||||||
if (bAll)
|
if (bAll)
|
||||||
{
|
{
|
||||||
|
@ -507,12 +509,21 @@ VOID ShowInfo(BOOL bAll)
|
||||||
_tprintf(_T("\tDescription . . . . . . . . . . . : %s\n"), lpDesc);
|
_tprintf(_T("\tDescription . . . . . . . . . . . : %s\n"), lpDesc);
|
||||||
HeapFree(ProcessHeap, 0, lpDesc);
|
HeapFree(ProcessHeap, 0, lpDesc);
|
||||||
_tprintf(_T("\tPhysical Address. . . . . . . . . : %s\n"), PrintMacAddr(pAdapter->Address));
|
_tprintf(_T("\tPhysical Address. . . . . . . . . : %s\n"), PrintMacAddr(pAdapter->Address));
|
||||||
|
if (bConnected)
|
||||||
|
{
|
||||||
if (pAdapter->DhcpEnabled)
|
if (pAdapter->DhcpEnabled)
|
||||||
_tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : Yes\n"));
|
_tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : Yes\n"));
|
||||||
else
|
else
|
||||||
_tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : No\n"));
|
_tprintf(_T("\tDHCP Enabled. . . . . . . . . . . : No\n"));
|
||||||
_tprintf(_T("\tAutoconfiguration Enabled . . . . : \n"));
|
_tprintf(_T("\tAutoconfiguration Enabled . . . . : \n"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bConnected)
|
||||||
|
{
|
||||||
|
pAdapter = pAdapter->Next;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
_tprintf(_T("\tIP Address. . . . . . . . . . . . : %s\n"), pAdapter->IpAddressList.IpAddress.String);
|
_tprintf(_T("\tIP Address. . . . . . . . . . . . : %s\n"), pAdapter->IpAddressList.IpAddress.String);
|
||||||
_tprintf(_T("\tSubnet Mask . . . . . . . . . . . : %s\n"), pAdapter->IpAddressList.IpMask.String);
|
_tprintf(_T("\tSubnet Mask . . . . . . . . . . . : %s\n"), pAdapter->IpAddressList.IpMask.String);
|
||||||
|
|
Loading…
Reference in a new issue