This example uses the command line 'netstat' to query the network stack for active network connections. The active local and foreign ip addresses and port numbers are return in addition to the state of the connection.
Netstat returns the state of each network connection, shown in the following table.
State | Description |
---|---|
LISTEN | accepting connections |
ESTABLISHED | connection up and passing data |
SYN_SENT | TCP session has been requested by us; waiting for reply from remote endpoint |
SYN_RECV | TCP session has been requested by a remote endpoint for a socket on which we were listening |
LAST_ACK | TCP our socket is closed; remote endpoint has also shut down; we are waiting for a final acknowledgement |
CLOSE_WAIT | TCP remote endpoint has shut down; the kernel is waiting for the application to close the socket |
TIME_WAIT | TCP socket is waiting after closing for any packets left on the network |
CLOSED | socket is not being used |
CLOSING | TCP our socket is shut down; remote endpoint is shut down; not all data has been sent |
FIN_WAIT1 | TCP our socket has closed; we are in the process of tearing down the connection |
FIN_WAIT2 | TCP the connection has been closed; our socket is waiting for the remote endpoint to shut down |
(Ref: http://linux-ip.net/html/tools-netstat.html)
Use this function to find available port numbers to use in your applications.
LabVIEW 2015 SP1
Hi,
The NI Community Hub is actually a location for questions/support on using the NI Community.
I think you will have a lot more luck if you post this question to the NI Discussion Forums: http://forums.ni.com/ - there is a very active community on the forums that may be able to provide some help.
I hope that helps!
Alberto
NI Community Team