tcp_socket Struct Reference
[TCP Sockets]

Collaboration diagram for tcp_socket:

Collaboration graph
[legend]

Detailed Description

TCP socket information structure.

Applications should not rely on the content of this structure. It may change without notice.

Examples:

ftpd/ftpserv.c, httpd/httpserv.c, inetq/inetq.c, nutpiper/nutpiper.c, portdio/portdio.c, pppc/pppc.c, rs232d/rs232d.c, and tcps/tcps.c.

Definition at line 181 of file sock_var.h.


Data Fields

TCPSOCKETso_next
 Link to next tcp socket structure.
void * so_device
 Always zero.
u_char 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.
u_short so_devocnt
 Number of data bytes in output buffer.
u_charso_devobuf
 Pointer to output buffer.
u_short so_devobsz
 Output buffer size.
volatile u_char so_state
 Connection state, see tcp_fsm.h.
u_long so_local_addr
 Local IP address in net byte order.
u_short so_local_port
 Local port number in net byte order.
u_long so_remote_addr
 Remote IP address in net byte order.
u_short so_remote_port
 Remote port number in net byte order.
u_char so_tx_flags
 Flags used during transmissions - see below.
u_long so_tx_isn
 Initial sequence number.
u_long so_tx_una
 Unacknowledged sequence number.
u_long so_tx_nxt
 Next sequence number to send.
u_long so_tx_wl1
 Sequence number of last window update.
u_long so_tx_wl2
 Acknowledged sequence of last window update.
u_short so_tx_win
 Peer's receive window.
u_char so_tx_dup
 Duplicate ACK counter.
NETBUFso_tx_nbq
 Network buffers waiting to be acknowledged.
HANDLE so_tx_tq
 Threads waiting for transmit buffer space.
u_long so_rx_isn
 Initial sequence number of remote.
u_long so_rx_nxt
 Next sequence number to receive.
u_short so_rx_win
 Local receive window.
u_short so_rx_cnt
 Number of data bytes in the receive buffer.
u_short so_rx_bsz
 Receive buffer size.
u_short so_rd_cnt
 Number of bytes read from buffer top.
NETBUFso_rx_buf
 Data waiting to be read by application.
HANDLE so_rx_tq
 Threads waiting for received data.
NETBUFso_rx_nbq
 Network buffers received in advance.
u_short so_mss
 MSS, limited by remote option or MTU.
u_long so_rtt_seq
 Sequence number for RTT calculation.
u_short so_rtto
 Current retransmission timeout.
u_short so_retransmits
 Number of retransmits.
u_short so_time_wait
 Time wait counter.
u_short so_retran_time
 Retransmit time counter.
u_short so_last_error
 Last error code.
HANDLE so_pc_tq
 Listening thread.
HANDLE so_ac_tq
 Connecting thread.
u_long so_read_to
 Read timeout.
u_long so_write_to
 Write timeout.
u_long so_oos_drop
 Out of sequence dropped.

Field Documentation

TCPSOCKET* tcp_socket::so_next

Link to next tcp socket structure.

Examples:
httpd/httpserv.c.

Definition at line 182 of file sock_var.h.

Referenced by NutDumpSocketList(), NutTcpConnect(), NutTcpCreateSocket(), NutTcpDestroySocket(), NutTcpFindSocket(), and NutTcpSm().

void* tcp_socket::so_device

Always zero.

Definition at line 183 of file sock_var.h.

u_char tcp_socket::so_devtype

Device type, always IFTYP_TCPSOCK.

Definition at line 184 of file sock_var.h.

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().

u_short tcp_socket::so_devocnt

Number of data bytes in output buffer.

Definition at line 192 of file sock_var.h.

Referenced by NutTcpDestroySocket(), NutTcpDeviceIOCtl(), and NutTcpDeviceWrite().

u_char* tcp_socket::so_devobuf

Pointer to output buffer.

Definition at line 193 of file sock_var.h.

Referenced by NutTcpDestroySocket(), and NutTcpDeviceWrite().

u_short tcp_socket::so_devobsz

Output buffer size.

Definition at line 194 of file sock_var.h.

Referenced by NutTcpCreateSocket(), and NutTcpDeviceWrite().

volatile u_char tcp_socket::so_state

Connection state, see tcp_fsm.h.

Examples:
httpd/httpserv.c.

Definition at line 196 of file sock_var.h.

Referenced by NutDumpSocketList(), NutTcpAbortSocket(), NutTcpConnect(), NutTcpCreateSocket(), NutTcpDeviceWrite(), NutTcpFindSocket(), NutTcpReceive(), NutTcpSend(), NutTcpSetSockOpt(), NutTcpSm(), NutTcpStateActiveOpenEvent(), NutTcpStateCloseEvent(), and NutTcpStatePassiveOpenEvent().

u_long tcp_socket::so_local_addr

Local IP address in net byte order.

Definition at line 197 of file sock_var.h.

Referenced by NutDumpSocketList(), NutFtpProcessPassiv(), NutTcpConnect(), and NutTcpOutput().

u_short tcp_socket::so_local_port

Local port number in net byte order.

Definition at line 198 of file sock_var.h.

Referenced by NutDumpSocketList(), NutTcpAccept(), NutTcpConnect(), NutTcpFindSocket(), and NutTcpOutput().

u_long tcp_socket::so_remote_addr

Remote IP address in net byte order.

Examples:
ftpd/ftpserv.c.

Definition at line 199 of file sock_var.h.

Referenced by FtpService(), NutDumpSocketList(), NutFtpProcessPort(), NutTcpConnect(), NutTcpFindSocket(), NutTcpOutput(), and NutTcpStateRetranTimeout().

u_short tcp_socket::so_remote_port

Remote port number in net byte order.

Definition at line 200 of file sock_var.h.

Referenced by NutDumpSocketList(), NutTcpConnect(), NutTcpFindSocket(), and NutTcpOutput().

u_char tcp_socket::so_tx_flags

Flags used during transmissions - see below.

Definition at line 202 of file sock_var.h.

Referenced by NutTcpOutput(), NutTcpSend(), NutTcpSm(), and NutTcpStateWindowEvent().

u_long tcp_socket::so_tx_isn

Initial sequence number.

Definition at line 203 of file sock_var.h.

Referenced by NutTcpCreateSocket().

u_long tcp_socket::so_tx_una

Unacknowledged sequence number.

Definition at line 204 of file sock_var.h.

Referenced by NutTcpCreateSocket(), and NutTcpSend().

u_long tcp_socket::so_tx_nxt

Next sequence number to send.

Definition at line 205 of file sock_var.h.

Referenced by NutTcpCreateSocket(), NutTcpOutput(), and NutTcpSend().

u_long tcp_socket::so_tx_wl1

Sequence number of last window update.

Definition at line 206 of file sock_var.h.

u_long tcp_socket::so_tx_wl2

Acknowledged sequence of last window update.

Definition at line 207 of file sock_var.h.

u_short tcp_socket::so_tx_win

Peer's receive window.

Definition at line 208 of file sock_var.h.

u_char tcp_socket::so_tx_dup

Duplicate ACK counter.

Definition at line 209 of file sock_var.h.

NETBUF* tcp_socket::so_tx_nbq

Network buffers waiting to be acknowledged.

Definition at line 210 of file sock_var.h.

Referenced by NutTcpDiscardBuffers(), NutTcpOutput(), NutTcpSm(), and NutTcpStateRetranTimeout().

HANDLE tcp_socket::so_tx_tq

Threads waiting for transmit buffer space.

Definition at line 211 of file sock_var.h.

Referenced by NutTcpAbortSocket(), and NutTcpSend().

u_long tcp_socket::so_rx_isn

Initial sequence number of remote.

Definition at line 213 of file sock_var.h.

u_long tcp_socket::so_rx_nxt

Next sequence number to receive.

Definition at line 214 of file sock_var.h.

Referenced by NutTcpOutput().

u_short tcp_socket::so_rx_win

Local receive window.

Definition at line 215 of file sock_var.h.

Referenced by NutTcpCreateSocket(), NutTcpOutput(), NutTcpReceive(), and NutTcpSetSockOpt().

u_short tcp_socket::so_rx_cnt

Number of data bytes in the receive buffer.

Definition at line 216 of file sock_var.h.

Referenced by NutTcpDeviceIOCtl(), and NutTcpReceive().

u_short tcp_socket::so_rx_bsz

Receive buffer size.

Definition at line 217 of file sock_var.h.

Referenced by NutTcpCreateSocket(), NutTcpGetSockOpt(), NutTcpReceive(), and NutTcpSetSockOpt().

u_short tcp_socket::so_rd_cnt

Number of bytes read from buffer top.

Definition at line 218 of file sock_var.h.

Referenced by NutTcpDeviceIOCtl(), and NutTcpReceive().

NETBUF* tcp_socket::so_rx_buf

Data waiting to be read by application.

Definition at line 219 of file sock_var.h.

Referenced by NutTcpDiscardBuffers(), and NutTcpReceive().

HANDLE tcp_socket::so_rx_tq

Threads waiting for received data.

Definition at line 220 of file sock_var.h.

Referenced by NutTcpAbortSocket(), and NutTcpReceive().

NETBUF* tcp_socket::so_rx_nbq

Network buffers received in advance.

Definition at line 221 of file sock_var.h.

Referenced by NutTcpDiscardBuffers().

u_short tcp_socket::so_mss

MSS, limited by remote option or MTU.

Definition at line 223 of file sock_var.h.

Referenced by NutFtpOpenSession(), NutFtpTransferFile(), NutTcpCreateSocket(), NutTcpGetSockOpt(), NutTcpOutput(), NutTcpReceive(), NutTcpSend(), and NutTcpSetSockOpt().

u_long tcp_socket::so_rtt_seq

Sequence number for RTT calculation.

Definition at line 225 of file sock_var.h.

Referenced by NutTcpOutput().

u_short tcp_socket::so_rtto

Current retransmission timeout.

Definition at line 226 of file sock_var.h.

Referenced by NutTcpCalcRtt(), NutTcpCreateSocket(), and NutTcpSm().

u_short tcp_socket::so_retransmits

Number of retransmits.

Definition at line 227 of file sock_var.h.

Referenced by NutTcpStateRetranTimeout().

u_short tcp_socket::so_time_wait

Time wait counter.

Definition at line 228 of file sock_var.h.

Referenced by NutTcpAbortSocket(), and NutTcpSm().

u_short tcp_socket::so_retran_time

Retransmit time counter.

Definition at line 229 of file sock_var.h.

Referenced by NutTcpAbortSocket(), NutTcpCalcRtt(), NutTcpOutput(), NutTcpSm(), and NutTcpStateRetranTimeout().

u_short tcp_socket::so_last_error

Last error code.

Definition at line 230 of file sock_var.h.

Referenced by NutTcpAbortSocket(), NutTcpConnect(), NutTcpDeviceWrite(), NutTcpError(), NutTcpGetSockOpt(), NutTcpOutput(), NutTcpReceive(), NutTcpSend(), NutTcpSetSockOpt(), NutTcpStateCloseEvent(), and NutTcpStatePassiveOpenEvent().

HANDLE tcp_socket::so_pc_tq

Listening thread.

Definition at line 231 of file sock_var.h.

Referenced by NutTcpAbortSocket(), and NutTcpStatePassiveOpenEvent().

HANDLE tcp_socket::so_ac_tq

Connecting thread.

Definition at line 232 of file sock_var.h.

Referenced by NutTcpAbortSocket(), and NutTcpStateActiveOpenEvent().

u_long tcp_socket::so_read_to

Read timeout.

Definition at line 234 of file sock_var.h.

Referenced by NutTcpReceive().

u_long tcp_socket::so_write_to

Write timeout.

Definition at line 235 of file sock_var.h.

Referenced by NutTcpGetSockOpt(), NutTcpSend(), and NutTcpSetSockOpt().

u_long tcp_socket::so_oos_drop

Out of sequence dropped.

Definition at line 236 of file sock_var.h.


The documentation for this struct was generated from the following file:
© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/