6 F 3 B 0 3 6 2
8.4 Socket Interface Information
The information for the eight socket interface sockets held by the Ethernet Port can be read out with the T2N READ instruction. (See Section 6.3 Socket Interface Information.) The Ethernet Port holds five words of socket status information for each socket.
∙Remote port TCP/UDP port number
∙Remote port IP address
∙TCP/UDP port number for this socket
∙Socket status
Table 8.7 lists the structure of the socket interface information and the extended memory area addresses.
Table 8.7 Socket Interface Information
| Socket identifier |
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|
|
|
|
|
|
|
|
|
Remote port number (TCP only) | 0F4BH | 0F53H | 0F5BH | 0F63H | 0F6BH | 0F73H | 0F7BH | 0F83H |
Remote port IP address (TCP only) | 0F4CH | 0F54H | 0F5CH | 0F64H | 0F6CH | 0F74H | 0F7CH | 0F84H |
| 0F4DH | 0F55H | 0F5DH | 0F65H | 0F6DH | 0F75H | 0F7DH | 0F85H |
Local port TCP/UDP port number | 0F4EH | 0F56H | 0F5EH | 0F66H | 0F6EH | 0F76H | 0F7EH | 0F86H |
Socket status | 0F4FH | 0F57H | 0F5FH | 0F67H | 0F6FH | 0F77H | 0F7FH | 0F87H |
For UDP sockets, the remote port number and IP address data are invalid.
The socket status has the following structure.
|
|
| F E D C B A 9 8 7 6 5 4 3 2 1 0 | ||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
| TCP |
| AOPEN | CONN | RCLOSE |
|
|
|
|
|
|
|
|
|
| ||||||||||||
|
|
|
|
| UDP | POPEN RCV |
| NOACK |
|
|
|
|
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||||||
Bit no. | Bit | Condition under which the bit is set to 1 | Condition under which the bit is reset to 0 | ||||||||||||||||||||||||||
F | TCP | TCP used by the socket |
|
|
|
|
| The socket closed in response to a close request | |||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||
E | UDP | UDP used by the socket |
|
|
|
|
| The socket closed in response to a close request | |||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||
D | AOPEN | TCP socket in active open state |
|
|
|
|
| The socket closed in response to a close request | |||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||||||||
C | POPEN | TCP socket in passive open state or UDP | The socket closed in response to a close request | ||||||||||||||||||||||||||
|
| socket in open state |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
B | CONN | TCP connection established |
|
|
|
|
| Disconnected by the local port with a close request | |||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Disconnected by the remote port | ||||||||
A | RCV | Received text present |
|
|
|
|
| No received text | |||||||||||||||||||||
9 | RCLOS | An established TCP connection disconnected | The socket closed in response to a close request | ||||||||||||||||||||||||||
| E | by the remote port |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
8 | NOACK | No response received from the remote port for | The socket closed in response to a close request | ||||||||||||||||||||||||||
|
| a local port send operation in a state where a |
|
|
|
|
|
|
|
|
| ||||||||||||||||||
|
| TCP connection was established, and the TCP |
|
|
|
|
|
|
|
|
| ||||||||||||||||||
|
| resend function resulted in a timeout (because |
|
|
|
|
|
|
|
|
| ||||||||||||||||||
|
| the remote port was down, etc.). |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
|
| If the wait time exceeds the set value during a | When a TCP active open request is reissued. | ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||
|
| TCP active open request. |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
|
| This state does not occur for TCP passive |
|
|
|
|
|
|
|
|
| ||||||||||||||||||
|
| open requests. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A socket status in which neither AOPEN nor POPEN is set to 1 indicates that the socket is in the closed state.
⎯ 147 ⎯