Is there an API call on Linux which returns currently opened TCP connections on the system (like GetTcpTable call on Windows)?
Thanks.
Is there an API call on Linux which returns currently opened TCP connections on the system (like GetTcpTable call on Windows)?
Thanks.
As per UNIX philosophy of "everything is a file", you can get what you want from reading /proc/net/tcp
.
You should check out netstat -t (for TCP). Man netstat
will give you all the options.