Reactos

[NETSTAT] -b flag implies -o flag on Windows XP/2003. CORE-19006 (#5377)


When calling 'netstat -abn'
Win 2k3sp2 and XPSP3 do show both: the processes name and the PID.
Contrary Win 7 and Win 8.1 would show only the process name then without the PID.

The newer Windows versions would require you to explicitly pass -o
if you want to see the PID also.

We do follow 2k3sp2 because it is our target. The process name is not of much use
without having the PID as well, especially if multiple processes with the
same name do run on a system, e.g.: multiple 'svchost.exe' processes.

Ros will automatically switch to the Win7-way when newer
Windows versions will be targeted at build-time.

authored by

Joachim Henze and committed by
GitHub
5ee97b95 99c4ffb0

+3
+3
base/applications/network/netstat/netstat.c
··· 98 98 // UNIMPLEMENTED. 99 99 ConPuts(StdErr, L"'b' option is FIXME (Accepted option though unimplemented feature).\n"); 100 100 bDoShowProcName = TRUE; 101 + #if (_WIN32_WINNT < _WIN32_WINNT_VISTA) 102 + bDoShowProcessId = TRUE; 103 + #endif 101 104 break; 102 105 case L'e': 103 106 bDoShowEthStats = TRUE;