Omron CJ1W-ETN11 Network Card User Manual


 
247
Command/Response Reference Section 11-3
11-3-25 SOCKET STATUS READ
Reads the Ethernet Unit network socket status.
Command Block
Response Block
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 (4 bytes)
The protocol used for the socket is returned as a number.
00 00 00 06: TCP; 00 00 00 11: UDP
Receive Queue (4 bytes)
The number of bytes in the reception queue.
Send Queue (4 bytes)
The number of bytes in the send queue.
Local IP Address (4 bytes)
The local IP address allocated to the socket.
Local Port Number (4 bytes)
The local port number allocated to the socket.
Remote IP Address (4 bytes)
The remote IP address allocated to the socket.
Remote Port Number (4 bytes)
The remote port number allocated to the socket.
TCP Transitions (4 bytes)
The TCP connection status is returned as one of the numbers shown in the
following table. Refer to Appendix D TCP Status Transitions for a diagram of
transitions.
6427
Command
code
6427
Command
code
Response
code
32 bytes 32 bytes
Socket
status
Socket
status
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).