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_Options structure
  • 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_Options structure
    • An InetT_Address, supports both IPv4 and IPv6 addresses
  • 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_Options structure
    • A TcpT_Port
  • 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_Options structure
    • The ToS value
  • 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_Options structure,
    • Boolean indicating that the upper layer supports the InetT_Address structure
  • Return Value: None
  • Note: Inet support means that indications may return this structure in their ICIs

For more information in this section, see:

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com