Embedded Wireless Framework
Macros | Functions
ewf_adapter_api_udp.c File Reference

The Embedded Wireless Framework adapter UDP API implementation. More...

#include "ewf_adapter.h"

Macros

#define EWF_VALIDATE_UDP_API_POINTER(adapter_ptr, function_ptr)
 

Functions

ewf_result ewf_adapter_udp_open (ewf_adapter *adapter_ptr, ewf_socket_udp *socket_ptr)
 Open a UDP socket. More...
 
ewf_result ewf_adapter_udp_close (ewf_socket_udp *socket_ptr)
 Close a UDP socket. More...
 
ewf_result ewf_adapter_udp_control (ewf_socket_udp *socket_ptr, const char *control_str, uint8_t *buffer_ptr, uint32_t *buffer_length_ptr)
 Control an UDP socket This is mainly used to funnel implementation specific functionality. More...
 
ewf_result ewf_adapter_udp_set_dtls_configuration (ewf_socket_udp *socket_ptr, uint32_t dtls_configuration_id)
 Set the DTLS configuration for the socket. More...
 
ewf_result ewf_adapter_udp_bind (ewf_socket_udp *socket_ptr, uint32_t local_port)
 Binds an UDP socket to a local port. More...
 
ewf_result ewf_adapter_udp_send_to (ewf_socket_udp *socket_ptr, const char *remote_address_str, uint32_t remote_port, const uint8_t *buffer_ptr, uint32_t buffer_length)
 Send data over a UDP socket. More...
 
ewf_result ewf_adapter_udp_receive_from (ewf_socket_udp *socket_ptr, char *remote_address_str, uint32_t *remote_address_length_ptr, uint32_t *remote_port_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
 Receive data over a UDP socket. More...
 
ewf_result ewf_adapter_udp_receive_callback_set (ewf_socket_udp *socket_ptr, ewf_adapter_udp_receive_callback callback)
 Register a user UDP receive callback function. More...
 

Detailed Description

The Embedded Wireless Framework adapter UDP API implementation.

Version
Preview

Macro Definition Documentation

◆ EWF_VALIDATE_UDP_API_POINTER

#define EWF_VALIDATE_UDP_API_POINTER (   adapter_ptr,
  function_ptr 
)
Value:
do { \
if ((adapter_ptr->udp_api_ptr == NULL) || \
(adapter_ptr->udp_api_ptr->function_ptr == NULL)) \
{ \
EWF_LOG_ERROR("The function is not implemented."); \
} \
} while(0)
@ EWF_RESULT_NOT_SUPPORTED
Definition: ewf.h:71