TCPIP_UDP_OptionsGet Function

C

bool TCPIP_UDP_OptionsGet(UDP_SOCKET hUDP, UDP_SOCKET_OPTION option, void* optParam); 

Returns

  • true - Indicates success

  • false - Indicates failure

Description

Various options can be retrieved at the socket level. This function provides compatibility with BSD implementations.

Preconditions

UDP socket should have been opened with TCPIP_UDP_ServerOpen()/TCPIP_UDP_ClientOpen()(). hUDP - valid socket

Parameters

ParametersDescription
hUDPsocket to get options for
optionspecific option to get
optParampointer to an area that will receive the option value; this is option dependent on the size of the area has to be large enough
  • UDP_OPTION_STRICT_PORT - pointer to boolean

  • UDP_OPTION_STRICT_NET - pointer to boolean

  • UDP_OPTION_STRICT_ADDRESS - pointer to boolean

  • UDP_OPTION_BROADCAST - pointer to UDP_SOCKET_BCAST_TYPE

  • UDP_OPTION_BUFFER_POOL - pointer to boolean

  • UDP_OPTION_TX_BUFF - pointer to a 16 bit value to receive bytes of the TX buffer

  • UDP_OPTION_TX_QUEUE_LIMIT - pointer to an 8 bit value to receive the TX queue limit

  • UDP_OPTION_RX_QUEUE_LIMIT - pointer to an 8 bit value to receive the RX queue limit

  • UDP_OPTION_RX_AUTO_ADVANCE - pointer to boolean

  • UDP_OPTION_TX_TTL - pointer to an 8 bit value to receive the TTL value

  • UDP_OPTION_MULTICAST - pointer to a UDP_MULTICAST_FLAGS value to receive the current socket settings

  • UDP_OPTION_TOS - pointer to an 8 bit value to receive the TOS

  • UDP_OPTION_DF - pointer to boolean - true: no fragmentation allowed; false: fragmentation allowed