www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


TCPIP_SetOption

Set TCPIP option. This call is used to set various options that are used by the TCP/IP stack.

int TCPIP_SetOption(int optionName, long optionValue);

Parameters

optionName

The option to change (see below)

optionValue

The value to change it to

Return Value

0: Success
-1: failed

Comments

Option constants (defined at TCPIPAPI.H):
  • TCPIP_OPTION_ARP_MAX_RETRY 4
    The maximum number of ARP retries before going into the ARP quiet time state. Default: 6, Minimum: 1
  • TCPIP_OPTION_ARP_TIMEOUT_TIME 5
    The amount of time in seconds between ARP retries. Default: 1, Minimum: 1
  • TCPIP_OPTION_ARP_QUIET_TIME 6
    The length of the ARP quiet time state in seconds. Default: 20, Minimum: 1
  • TCPIP_OPTION_ARP_TTL 7
    The length of time that an ARP entry should be kept in the ARP cache in seconds. To disable ARP aging, set to TCPIP_RTE_INF. Default: 600, Minimum: 1
  • TCPIP_IP_FORWARDING 13
    A boolean(0 or 1) to enable IP forwarding. Default: 1
  • TCPIP_IP_DBCAST_FORWARD 14
    A boolean (0 or 1) to enable directed broadcast forwarding. Default: 1
  • TCPIP_OPTION_IP_FRAGMENT 15
    A boolean (0 or 1) to enable IP fragmentation. Default: 1
  • TCPIP_OPTION_IP_TTL 16
    The initial time-to-live in seconds for IP datagrams. Default: 64 , Range: 0-255
  • define TCPIP_OPTION_IP_TOS 17
    The default Type-Of-Service for IP datagrams. Default: 0, Valid values: 0 - 0xFF
  • define TCPIP_OPTION_IP_FRAG_TTL 18
    Fragment re-assembly timeout value in seconds. Default: 64, Range: 1-128
  • TCPIP_OPTION_UDP_CHECKSUM 20
    A boolean (0 or 1) to enable/disable UDP checksums on outgoing packets. Default: 1
  • TCPIP_OPTION_ARP_MAX_ENTRIES 21
    Maximum number of ARP entries (32 - 512) in the ARP cache. Default: 64
  • TCPIP_OPTION_ARP_SMART 25
    Boolean (0 or 1) to indicate whether the ARP logic should store all ARP mappings broadcast on the local network, even if we were not waiting for a reply, or if the request was not for us. Default: 0

RTOS API

This library function invokes a RTOS software interrupt.
See documentation.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.10V1.16

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.23

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document