TCP socket information structure. More...
#include <sock_var.h>
Data Fields | |
TCPSOCKET * | so_next |
Link to next tcp socket structure. | |
void * | so_device |
Always zero. | |
uint8_t | so_devtype |
Device type, always IFTYP_TCPSOCK. | |
int(* | so_devread )(TCPSOCKET *, void *, int) |
Read from device. | |
int(* | so_devwrite )(TCPSOCKET *, const void *, int) |
Write to device. | |
int(* | so_devwrite_P )(TCPSOCKET *, PGM_P, int) |
Write to device. | |
int(* | so_devioctl )(TCPSOCKET *, int, void *) |
Driver control function. | |
uint16_t | so_devocnt |
Number of data bytes in output buffer. | |
uint8_t * | so_devobuf |
Pointer to output buffer. | |
uint16_t | so_devobsz |
Output buffer size. | |
volatile uint8_t | so_state |
Connection state, see tcp_fsm.h. | |
uint32_t | so_local_addr |
Local IP address in net byte order. | |
uint16_t | so_local_port |
Local port number in net byte order. | |
uint32_t | so_remote_addr |
Remote IP address in net byte order. | |
uint16_t | so_remote_port |
Remote port number in net byte order. | |
uint8_t | so_tx_flags |
Flags used during transmissions - see below. | |
uint32_t | so_tx_isn |
Initial sequence number. | |
uint32_t | so_tx_una |
Unacknowledged sequence number. | |
uint32_t | so_tx_nxt |
Next sequence number to send. | |
uint32_t | so_tx_wl1 |
Sequence number of last window update. | |
uint32_t | so_tx_wl2 |
Acknowledged sequence of last window update. | |
uint16_t | so_tx_win |
Peer's receive window. | |
uint8_t | so_tx_dup |
Duplicate ACK counter. | |
NETBUF * | so_tx_nbq |
Network buffers waiting to be acknowledged. | |
HANDLE | so_tx_tq |
Threads waiting for transmit buffer space. | |
uint32_t | so_rx_isn |
Initial sequence number of remote. | |
uint32_t | so_rx_nxt |
Next sequence number to receive. | |
uint16_t | so_rx_win |
Local receive window. | |
int | so_rx_cnt |
Number of data bytes in the receive buffer. | |
int | so_rx_bsz |
Receive buffer size. | |
int | so_rd_cnt |
Number of bytes read from buffer top. | |
int_fast8_t | so_rx_apc |
Number of packets received in advance. | |
NETBUF * | so_rx_buf |
Data waiting to be read by application. | |
HANDLE | so_rx_tq |
Threads waiting for received data. | |
NETBUF * | so_rx_nbq |
Network buffers received in advance. | |
uint16_t | so_mss |
MSS, limited by remote option or MTU. | |
uint32_t | so_rtt_seq |
Sequence number for RTT calculation. | |
uint16_t | so_rtto |
Current retransmission timeout. | |
uint16_t | so_retransmits |
Number of retransmits. | |
uint16_t | so_time_wait |
Time wait counter. | |
uint16_t | so_retran_time |
Retransmit time counter. | |
uint16_t | so_last_error |
Last error code. | |
HANDLE | so_pc_tq |
Listening thread. | |
HANDLE | so_ac_tq |
Connecting thread. | |
uint32_t | so_read_to |
Read timeout. | |
uint32_t | so_write_to |
Write timeout. | |
uint32_t | so_oos_drop |
Out of sequence dropped. |
TCP socket information structure.
Applications should not rely on the content of this structure. It may change without notice.
Link to next tcp socket structure.
Referenced by NutDumpSocketList(), NutTcpConnect(), NutTcpCreateSocket(), NutTcpDestroySocket(), NutTcpFindSocket(), and NutTcpSm().
void* tcp_socket::so_device |
Always zero.
Device type, always IFTYP_TCPSOCK.
Referenced by NutTcpCreateSocket().
int(* tcp_socket::so_devread)(TCPSOCKET *, void *, int) |
Read from device.
Referenced by NutTcpCreateSocket().
int(* tcp_socket::so_devwrite)(TCPSOCKET *, const void *, int) |
Write to device.
Referenced by NutTcpCreateSocket().
int(* tcp_socket::so_devwrite_P)(TCPSOCKET *, PGM_P, int) |
Write to device.
Referenced by NutTcpCreateSocket().
int(* tcp_socket::so_devioctl)(TCPSOCKET *, int, void *) |
Driver control function.
Referenced by NutTcpCreateSocket().
Number of data bytes in output buffer.
Referenced by NutTcpDestroySocket(), NutTcpDeviceIOCtl(), and NutTcpDeviceWrite().
Pointer to output buffer.
Referenced by NutTcpDestroySocket(), and NutTcpDeviceWrite().
Output buffer size.
Referenced by NutTcpCreateSocket(), and NutTcpDeviceWrite().
volatile uint8_t tcp_socket::so_state |
Connection state, see tcp_fsm.h.
Referenced by NutDumpSocketList(), NutTcpAbortSocket(), NutTcpConnect(), NutTcpCreateSocket(), NutTcpDeviceWrite(), NutTcpFindSocket(), NutTcpReceive(), NutTcpSend(), NutTcpSetSockOpt(), NutTcpSm(), NutTcpStateActiveOpenEvent(), NutTcpStateCloseEvent(), and NutTcpStatePassiveOpenEvent().
Local IP address in net byte order.
Referenced by NutDumpSocketList(), NutFtpProcessPassiv(), NutTcpConnect(), and NutTcpOutput().
Local port number in net byte order.
Referenced by NutDumpSocketList(), NutTcpAccept(), NutTcpConnect(), NutTcpFindSocket(), NutTcpOutput(), and NutTcpStatePassiveOpenEvent().
Remote IP address in net byte order.
Referenced by NutDumpSocketList(), NutFtpProcessPort(), NutTcpConnect(), NutTcpFindSocket(), NutTcpOutput(), and NutTcpStateRetranTimeout().
Remote port number in net byte order.
Referenced by NutDumpSocketList(), NutTcpConnect(), NutTcpFindSocket(), and NutTcpOutput().
Flags used during transmissions - see below.
Referenced by NutTcpOutput(), NutTcpSend(), NutTcpSm(), and NutTcpStateWindowEvent().
Initial sequence number.
Referenced by NutTcpCreateSocket().
Unacknowledged sequence number.
Referenced by NutTcpCreateSocket(), and NutTcpSend().
Next sequence number to send.
Referenced by NutTcpCreateSocket(), NutTcpOutput(), and NutTcpSend().
Sequence number of last window update.
Acknowledged sequence of last window update.
Peer's receive window.
Duplicate ACK counter.
Network buffers waiting to be acknowledged.
Referenced by NutTcpDiscardBuffers(), NutTcpOutput(), NutTcpSm(), and NutTcpStateRetranTimeout().
Threads waiting for transmit buffer space.
Referenced by NutTcpAbortSocket(), and NutTcpSend().
Initial sequence number of remote.
Next sequence number to receive.
Referenced by NutTcpOutput().
Local receive window.
Referenced by NutTcpCreateSocket(), NutTcpOutput(), NutTcpReceive(), and NutTcpSetSockOpt().
Number of data bytes in the receive buffer.
Referenced by NutTcpDeviceIOCtl(), and NutTcpReceive().
Receive buffer size.
Referenced by NutTcpCreateSocket(), NutTcpGetSockOpt(), NutTcpReceive(), and NutTcpSetSockOpt().
Number of bytes read from buffer top.
Referenced by NutTcpDeviceIOCtl(), and NutTcpReceive().
Number of packets received in advance.
Referenced by NutTcpReceive().
Data waiting to be read by application.
Referenced by NutTcpDiscardBuffers(), and NutTcpReceive().
Threads waiting for received data.
Referenced by NutTcpAbortSocket(), and NutTcpReceive().
Network buffers received in advance.
Referenced by NutTcpDiscardBuffers().
MSS, limited by remote option or MTU.
Referenced by NutFtpOpenSession(), NutFtpTransferFile(), NutTcpCreateSocket(), NutTcpGetSockOpt(), NutTcpOutput(), NutTcpReceive(), NutTcpSend(), and NutTcpSetSockOpt().
Sequence number for RTT calculation.
Referenced by NutTcpOutput().
Current retransmission timeout.
Referenced by NutTcpCalcRtt(), NutTcpCreateSocket(), and NutTcpSm().
Number of retransmits.
Referenced by NutTcpStateRetranTimeout().
Time wait counter.
Referenced by NutTcpAbortSocket(), and NutTcpSm().
Retransmit time counter.
Referenced by NutTcpAbortSocket(), NutTcpCalcRtt(), NutTcpOutput(), NutTcpSm(), and NutTcpStateRetranTimeout().
Last error code.
Referenced by NutTcpAbortSocket(), NutTcpConnect(), NutTcpDeviceWrite(), NutTcpError(), NutTcpGetSockOpt(), NutTcpOutput(), NutTcpReceive(), NutTcpSend(), NutTcpSetSockOpt(), NutTcpStateCloseEvent(), and NutTcpStatePassiveOpenEvent().
Listening thread.
Referenced by NutTcpAbortSocket(), and NutTcpStatePassiveOpenEvent().
Connecting thread.
Referenced by NutTcpAbortSocket(), and NutTcpStateActiveOpenEvent().
Read timeout.
Referenced by NutTcpReceive(), and NutTcpStatePassiveOpenEvent().
Write timeout.
Referenced by NutTcpGetSockOpt(), NutTcpSend(), and NutTcpSetSockOpt().
Out of sequence dropped.