![background image](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528231.webp)
11-3
Section
Command/Response Reference
221
11-3-24
SOCKET STATUS READ
Reads the Ethernet Unit network socket status.
Command Block
64
27
Command
code
Response Block
64
27
Command
code
Response
code
Socket status
32 bytes
Parameters
Socket Status (Response)
Returns eight types of information in records of 32 bytes each. A maximum of 64
records can be returned. The format of each record is shown below.
Protocol
The protocol used for the socket is returned as a number.
00 00 00 06: TCP; 00 00 00 11: UDP
Receive Queue
The number of bytes in the reception queue.
Send Queue
The number of bytes in the send queue.
Local IP Address
The local IP address allocated to the socket.
Local Port Number
The local port number allocated to the socket.
Remote IP Address
The remote IP address allocated to the socket.
Remote Port Number
The remote port number allocated to the socket.
TCP Transitions
The TCP connection status is returned as one of the numbers shown in the fol-
lowing table. Refer to Appendix D TCP Status Transitions for a diagram of transi-
tions.
Number
Stage
Status
00 00 00 00
CLOSED
Closed.
00 00 00 01
LISTEN
Waiting for connection.
00 00 00 02
SYN SENT
SYN sent in active status.
00 00 00 03
SYN RECEIVED
SYN received and sent.
00 00 00 04
ESTABLISHED
Already established.
00 00 00 05
CLOSE WAIT
Received FIN, waiting to close.
00 00 00 06
FIN WAIT 1
Completed and FIN sent.
00 00 00 07
CLOSING
Completed and exchanged FIN. Awaiting ACK.
00 00 00 08
LAST ACK
FIN sent and completed. Awaiting ACK.
00 00 00 09
FIN WAIT 2
Close completed and ACK received. Awaiting FIN.
00 00 00 0A
TIME WAIT
After closing, pauses twice the maximum segment
life (2MSL).
Precautions
All the above values are set to 0 if Ethernet communications functions are
stopped due to improper settings in the system setup.