Netstat for Windows is provided by Microsoft itself, so you're unlikely to find any source code for it. However you may find Linux versions of Netstat source code available. The functionality may differ to some extent, but how useful they are will depend on why you need the source code in the first place.
The Windows netstat command; netstat -b (show the executable involved in creating each connection) netstat /? (list of available parameters)
Try netstat -a at the command line.
AnswerTHE DOS command is netstat -a.
use the netstat command.
netstat-r route PRINT
You can find if it is running on a port and process name by typing at a command prompt Strat>run(Type "command") when you get to a command prompt type "netstat -obna" you will get a list of executable that are involved with each port or listening ports. You can get a list of commands for NETSTAT by typing "netstat ?" after you find the file name you might have to boot in safe mode to remove it. You can run it in intervals by typing "netstat -obna 5" the five is the number of seconds it waits to run again you may change this number. Also you can look at http://www.symantec.com and do a search at the top.
There is one general command for the UNIX (actual UNIX not Linux) which will yield which port is being used by what service: lsof -i For Linux it is: netstat For more information for either command, please see these sources: lsof http://www-uxsup.csx.cam.ac.UK/security/lsof.HTML netstat http://www-uxsup.csx.cam.ac.UK/security/netstat.HTML Additional : 'netstat' is a standard tcp/ip utility, so it will work on all platforms using tcp/ip, including windows.
netstat /all will show you all active connections
NETSTAT
For Windows and Linux use the - netstat -a command, for this Macintosh I use the whois connected widget.
netstat -b
netstat -r and route print