Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

tcb Struct Reference


Detailed Description

This structure holds various fields used to keep track of TCP socket states, settings and event listener function. It is needed to ensure proper operation of TCP state machine and TCP connections based on it.

Definition at line 589 of file tcp_ip.h.

Data Fields

UINT8 state
 State of the TCP socket [entry].

UINT8 type
 type of the TCP socket

UINT8 flags
UINT32 rem_ip
UINT16 remport
UINT16 locport
UINT8 myflags
UINT16 tout
UINT8 tos
UINT16 persist_timerh
UINT16 retransmit_timerh
UINT8 retries_left
INT32(* event_listener )(INT8, UINT8, UINT32, UINT32)
 TCP socket application event listener.


Field Documentation

UINT8 tcb::state
 

This variable holds information used by the OpenTCP to manage sockets as well as information needed to manage TCP connection. Possible values are:

  • TCP_STATE_FREE
  • TCP_STATE_RESERVED
  • TCP_STATE_CLOSED
  • TCP_STATE_LISTENING
  • TCP_STATE_SYN_RECEIVED
  • TCP_STATE_SYN_SENT
  • TCP_STATE_FINW1
  • TCP_STATE_FINW2
  • TCP_STATE_CLOSING
  • TCP_STATE_LAST_ACK
  • TCP_STATE_TIMED_WAIT
  • TCP_STATE_CONNECTED

Definition at line 609 of file tcp_ip.h.

Referenced by process_tcp_in(), tcp_abort(), tcp_checksend(), tcp_close(), tcp_connect(), tcp_getfreeport(), tcp_getsocket(), tcp_getstate(), tcp_init(), tcp_listen(), tcp_mapsocket(), tcp_newstate(), tcp_poll(), tcp_releasesocket(), and tcp_send().

UINT8 tcb::type
 

Defines type of the TCP socket allocated. This determines how connection is established/closed in some cases. Possible values are:

  • TCP_TYPE_NONE
  • TCP_TYPE_SERVER
  • TCP_TYPE_CLIENT
  • TCP_TYPE_CLIENT_SERVER

Definition at line 621 of file tcp_ip.h.

Referenced by process_tcp_in(), tcp_connect(), tcp_getsocket(), tcp_init(), tcp_listen(), tcp_poll(), and tcp_releasesocket().

UINT8 tcb::flags
 

State machine flags

Definition at line 622 of file tcp_ip.h.

Referenced by process_tcp_in(), tcp_close(), tcp_connect(), tcp_getsocket(), tcp_init(), tcp_listen(), tcp_poll(), and tcp_releasesocket().

UINT32 tcb::rem_ip
 

Remote IP address

Definition at line 623 of file tcp_ip.h.

Referenced by process_tcp_in(), process_tcp_out(), tcp_connect(), tcp_getsocket(), tcp_init(), tcp_listen(), tcp_mapsocket(), tcp_poll(), tcp_releasesocket(), and tcp_sendreset().

UINT16 tcb::remport
 

Remote TCP port

Definition at line 624 of file tcp_ip.h.

Referenced by process_tcp_in(), process_tcp_out(), tcp_connect(), tcp_getsocket(), tcp_init(), tcp_listen(), tcp_mapsocket(), tcp_poll(), tcp_releasesocket(), and tcp_sendreset().

UINT16 tcb::locport
 

Local TCP port

Definition at line 625 of file tcp_ip.h.

Referenced by process_tcp_out(), tcp_connect(), tcp_getfreeport(), tcp_getsocket(), tcp_init(), tcp_listen(), tcp_mapsocket(), tcp_releasesocket(), and tcp_sendreset().

UINT8 tcb::myflags
 

My flags to be Txed

Definition at line 627 of file tcp_ip.h.

Referenced by process_tcp_in(), process_tcp_out(), tcp_abort(), tcp_close(), tcp_connect(), tcp_init(), tcp_listen(), tcp_poll(), tcp_send(), and tcp_sendreset().

UINT16 tcb::tout
 

Socket idle timeout (seconds)

Definition at line 630 of file tcp_ip.h.

Referenced by tcp_getsocket(), tcp_init(), and tcp_newstate().

UINT8 tcb::tos
 

Type of service allocated

Definition at line 631 of file tcp_ip.h.

Referenced by process_tcp_out(), tcp_getsocket(), tcp_init(), tcp_releasesocket(), and tcp_sendreset().

UINT16 tcb::persist_timerh
 

Persistent timers' handle

Definition at line 633 of file tcp_ip.h.

Referenced by tcp_init(), tcp_newstate(), and tcp_poll().

UINT16 tcb::retransmit_timerh
 

Retransmission timers' handle

Definition at line 634 of file tcp_ip.h.

Referenced by tcp_init(), tcp_newstate(), and tcp_poll().

UINT8 tcb::retries_left
 

Number of retries left before aborting

Definition at line 635 of file tcp_ip.h.

Referenced by tcp_init(), tcp_listen(), tcp_newstate(), and tcp_poll().

INT32(* tcb::event_listener)(INT8, UINT8, UINT32, UINT32)
 

Pointer to an event listener - a callback function used by TCP/IP stack to notify application about certain events.

Referenced by process_tcp_in(), tcp_connect(), tcp_getsocket(), tcp_init(), tcp_listen(), tcp_poll(), and tcp_releasesocket().


The documentation for this struct was generated from the following file:
Generated on Sun Aug 3 20:33:01 2003 for OpenTCP by doxygen1.2.18