Options Structure
Several TCP API functions use the following options structure:
typedef struct TcpT_Conn_Open_Options
{
InetT_Address local_address; /* default is INETC_ADDRESS_INVALID */
TcpT_Port local_port; /* default is TCPC_PORT_UNSPEC */
int ip_tos; /* default is 0 */
Boolean inet_support; /* default is OPC_TRUE */
OmsT_Sar_Payload_Process_Callbacks *ser_callbacks_ptr;
/* Callbacks defined by clients of TCP that require */
/* their payload to be transmitted in a distributed */
/* simulation environment. */
} TcpT_Conn_Open_Options;
For more information on TCP in Distributed Simulations please see Sending and Receiving Real Payload at the TCP Layer.
The following access functions and macros are available to modify the options structure.
tcp_conn_open_default_options_set()
void tcp_conn_open_default_options_set (TcpT_Conn_Open_Options* options)
- Abstract: Set TCP open options to defaults
- Argument: Pointer to a
TcpT_Conn_Open_Optionsstructure - Return Value: None
tcp_conn_open_options_local_addr_set()
void tcp_conn_open_options_local_addr_set (TcpT_Conn_Open_Options* options, InetT_Address local_addr)
- Abstract: Set the local address in the TCP open options
- Arguments:
- Pointer to a
TcpT_Conn_Open_Optionsstructure - An
InetT_Address, supports both IPv4 and IPv6 addresses
- Pointer to a
- Return Value: None
tcp_conn_open_options_local_port_set()
void tcp_conn_open_options_local_port_set (TcpT_Conn_Open_Options* options, TcpT_Port local_port)
- Abstract: Set the local port in the TCP open options
- Arguments:
- Pointer to a
TcpT_Conn_Open_Optionsstructure - A
TcpT_Port
- Pointer to a
- Return Value: None
tcp_conn_open_options_ip_tos_set()
void tcp_conn_open_options_ip_tos_set (TcpT_Conn_Open_Options* options, int tos)
- Abstract: Set the type of service (ToS) in the TCP open options
- Arguments:
- Pointer to a
TcpT_Conn_Open_Optionsstructure - The
ToSvalue
- Pointer to a
- Return Value: None
tcp_conn_open_options_inet_support_set()
void tcp_conn_open_options_inet_support_set (TcpT_Conn_Open_Options* options, Boolean inet_sup)
- Abstract: Set the inet support flag in the TCP open options
- Arguments:
- Pointer to a
TcpT_Conn_Open_Optionsstructure, - Boolean indicating that the upper layer supports the
InetT_Addressstructure
- Pointer to a
- Return Value: None
- Note: Inet support means that indications may return this structure in their ICIs
For more information in this section, see: