4.8.0.0R6
Software Development Kit
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
ltrx_udp_socket_options Struct Reference

Contains parameters for ltrx_udp_socket_open_with_options(). More...

Data Fields

uint16_t optLocalPort
 
void(* optNewConnectionCallback )(void *opaque, const struct ltrx_ip_address *remoteAddress, uint16_t remotePort)
 
void * optOpaque
 
void(* optReceiveCallback )(struct ltrx_ip_socket *)
 
struct ltrx_trigger * optReceiveEventTrigger
 
const char * optRemoteAddress
 
uint16_t optRemotePort
 
bool receptionIsRestricted
 
uint8_t zeroBasedInterface
 

Detailed Description

Contains parameters for ltrx_udp_socket_open_with_options().

Field Documentation

uint16_t ltrx_udp_socket_options::optLocalPort

[in] If non-zero, specifies the local port. If 0, a random unused UDP port number will be assigned.

void(* ltrx_udp_socket_options::optNewConnectionCallback)(void *opaque, const struct ltrx_ip_address *remoteAddress, uint16_t remotePort)

[in] If present, the function will be called when the UDP socket receives a packet from a different remote address or port. Otherwise, fill in NULL.

void* ltrx_udp_socket_options::optOpaque

[in] If and when optNewConnectionCallback is called, its "opaque" parameter will be filled in with this value.

void(* ltrx_udp_socket_options::optReceiveCallback)(struct ltrx_ip_socket *)

[in] If present, the function will be called when data is received. Otherwise, fill in NULL.

struct ltrx_trigger* ltrx_udp_socket_options::optReceiveEventTrigger

[in] If present, the specified trigger will subsequently be signaled when data is received. Otherwise, fill in NULL.

const char* ltrx_udp_socket_options::optRemoteAddress

[in] If non-NULL, names a destination address.

uint16_t ltrx_udp_socket_options::optRemotePort

[in] If non-0, specifies a remote port.

bool ltrx_udp_socket_options::receptionIsRestricted

[in] If true, received packets whose from address and port do not match the designated remote address and port will be discarded. In listen mode, the remote address and port of the first received packet are taken as designated until the socket is closed.

uint8_t ltrx_udp_socket_options::zeroBasedInterface

[in] Index for the desired interface (if available on the platform).

  • NETS_SOFTAP_START for ap0.
  • NETS_ETHERNET_START for eth0.
  • NETS_WLAN_START for wlan0.

The documentation for this struct was generated from the following file: