Indications and Events

The TCP processor model can create a number of indications/events.

The events will have one of the following ICI formats:

  • tcp_status_ind
  • tcp_open_ind_inet (if inet_support true)
  • tcp_open_ind (if inet_support not true)

The tcp_status_ind ICI is created each time it is sent, so it should be destroyed after being processed.

The tcp_status_ind ICI is sent when:

  • A group of packets are sent to the application as a result of a call to tcp_receive_command_send (). The status is TCPC_IND_SEG_FWD
  • Receipt of RST in SYN-SENT state (with status TCPC_IND_ABORTED)
  • Entry into ESTABLISHED state (with status TCPC_IND_ESTAB)
  • Entry into TIME-WAIT state (with status TCPC_IND_CLOSED or TCP_IND_ABORTED)
  • Entry into CLOSE-WAIT state (with status TCPC_IND_FIN_RECEIVED)
  • Connection is aborted (with status TCP_IND_ABORTED)

The following are values defined in tcp_api.h. Some are used for "status" in the "tcp_status_ind" ICI.

TCPC_INT_CONNECT_REQUEST is used as the interrupt code when the interrupt type is OPC_INTRPT_REMOTE.

TPAL only recognizes ESTAB, FIN_RECEIVED, CLOSED and ABORTED. "tcp_status_ind" accompanies a data packet, with status SEG_FWD.

The following table shows the status values contained in tcp_api.h.

Table 219: TCP Status Indication Values

Name Value Description
TCPC_IND_NONE 0
TCPC_IND_SEG_FWD 1 Sent with op_pk_send()
TCPC_IND_ESTAB 2 Sent as indication, when TCP enters into state ESTAB
Note: This happens for an active open when the SYN/ACK is received and an ACK is sent. This happens for a passive open when the ack for a SYN/ACK is received.
TCPC_IND_CLOSED 3 Sent as indication
TCPC_IND_ABORTED 4 Sent as indication. Also returned if an active open times out.
TCPC_IND_CONNECT_REQUEST 5 Sent as interrupt code used to transmit a "tcp_open_ind" or "tcp_open_ind_inet" ICI
**Note—**The application can set "accept status" to TCPC_IND_CONNXN_REJECT to reject the connection. If this is selected, the SYN is simply ignored. Any other value, including 0, 1 (the default) and TCPC_IND_CONNXN_ACCEPT, will accept the connection.
TCPC_IND_CONNXN_REJECT 6 Set as accept status
TCPC_IND_CONNXN_ACCEPT 7 Set as accept status
TCPC_IND_CONNECT 8 Sent as indication
Note: This indication is used only in tpal_intf_tcp_v3.pr.c, where it is the same value as TPALC_EV_MASK_FIN_RECEIVE.
TCPC_IND_FIN_RECEIVED 9 Sent as indication

For more information in this section, see: