5.6.0.0R1
Software Development Kit
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

◆ optLocalPort

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.

◆ optNewConnectionCallback

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.

◆ optOpaque

void* ltrx_udp_socket_options::optOpaque

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

◆ optReceiveCallback

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.

◆ optReceiveEventTrigger

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.

◆ optRemoteAddress

const char* ltrx_udp_socket_options::optRemoteAddress

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

◆ optRemotePort

uint16_t ltrx_udp_socket_options::optRemotePort

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

◆ receptionIsRestricted

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.

◆ zeroBasedInterface

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: