Embedded Wireless Framework
Data Structures | Macros | Typedefs | Functions | Variables
ewf_adapter_bsd_sockets.h File Reference

The Embedded Wireless Framework BSD sockets adapter driver. More...

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include "ewf_adapter.h"
#include "ewf_allocator.h"

Go to the source code of this file.

Data Structures

struct  _ewf_adapter_bsd_sockets_socket
 Internal structure for socket status
More...
 
struct  _ewf_adapter_bsd_sockets
 The BSD sockets adapter driver data structure. More...
 

Macros

#define EWF_ADAPTER_BSD_SOCKETS_TCP_ENABLED   (1)
 
#define EWF_ADAPTER_BSD_SOCKETS_UDP_ENABLED   (1)
 
#define EWF_ADAPTER_BSD_SOCKETS_INITIALIZE_HEADER(adapter_ptr)
 
#define EWF_ADAPTER_BSD_SOCKETS_INITIALIZE_TCP_API(adapter_ptr)
 
#define EWF_ADAPTER_BSD_SOCKETS_INITIALIZE_UDP_API(adapter_ptr)
 
#define EWF_ADAPTER_BSD_SOCKETS_INITIALIZE_TLS_BASIC_API(adapter_ptr)
 
#define EWF_ADAPTER_BSD_SOCKETS_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
 
#define EWF_ADAPTER_BSD_SOCKETS_STATIC_DECLARE(adapter_ptr, adapter_name_symb, data_allocator_ptr_param)
 Declare a BSD sockets adapter. More...
 

Typedefs

typedef struct _ewf_adapter_bsd_sockets_socket ewf_adapter_bsd_sockets_socket
 Internal structure for socket status

 
typedef struct _ewf_adapter_bsd_sockets ewf_adapter_bsd_sockets
 The BSD sockets adapter driver data structure.
 

Functions

ewf_result ewf_adapter_bsd_sockets_start (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_bsd_sockets_stop (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_bsd_sockets_info (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_bsd_sockets_get_ipv4_address (ewf_adapter *adapter_ptr, uint32_t *address_ptr)
 
ewf_result ewf_adapter_bsd_sockets_get_ipv4_netmask (ewf_adapter *adapter_ptr, uint32_t *netmask_ptr)
 
ewf_result ewf_adapter_bsd_sockets_get_ipv4_gateway (ewf_adapter *adapter_ptr, uint32_t *gateway_ptr)
 
ewf_result ewf_adapter_bsd_sockets_get_ipv4_dns (ewf_adapter *adapter_ptr, uint32_t *dns)
 
ewf_result ewf_adapter_bsd_sockets_tcp_open (ewf_adapter *adapter_ptr, ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_tcp_close (ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_tcp_control (ewf_socket_tcp *socket_ptr, const char *control_str, const uint8_t *buffer_ptr, uint32_t *buffer_length_ptr)
 
ewf_result ewf_adapter_bsd_sockets_tcp_set_tls_configuration (ewf_socket_tcp *socket_ptr, uint32_t tls_configuration_id)
 
ewf_result ewf_adapter_bsd_sockets_tcp_bind (ewf_socket_tcp *socket_ptr, uint32_t port)
 
ewf_result ewf_adapter_bsd_sockets_tcp_listen (ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_tcp_accept (ewf_socket_tcp *socket_ptr, ewf_socket_tcp *socket_new_ptr)
 
ewf_result ewf_adapter_bsd_sockets_tcp_connect (ewf_socket_tcp *socket_ptr, const char *const server, uint32_t port)
 
ewf_result ewf_adapter_bsd_sockets_tcp_shutdown (ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_tcp_send (ewf_socket_tcp *socket_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_bsd_sockets_tcp_receive (ewf_socket_tcp *socket_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length, bool wait)
 
ewf_result ewf_adapter_bsd_sockets_udp_open (ewf_adapter *adapter_ptr, ewf_socket_udp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_udp_close (ewf_socket_udp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_udp_control (ewf_socket_udp *socket_ptr, const char *control_str, const uint8_t *buffer_ptr, uint32_t *buffer_length_ptr)
 
ewf_result ewf_adapter_bsd_sockets_udp_set_dtls_configuration (ewf_socket_udp *socket_ptr, uint32_t dtls_configuration_id)
 
ewf_result ewf_adapter_bsd_sockets_udp_bind (ewf_socket_udp *socket_ptr, uint32_t port)
 
ewf_result ewf_adapter_bsd_sockets_udp_shutdown (ewf_socket_udp *socket_ptr)
 
ewf_result ewf_adapter_bsd_sockets_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)
 
ewf_result ewf_adapter_bsd_sockets_udp_receive_from (ewf_socket_udp *socket_ptr, char *remote_address, uint32_t *remote_address_length_ptr, uint32_t *remote_port_ptr, char *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
 

Variables

ewf_adapter_api_control ewf_adapter_bsd_sockets_api_control
 
ewf_adapter_api_info ewf_adapter_bsd_sockets_api_info
 
ewf_adapter_api_tcp ewf_adapter_bsd_sockets_api_tcp
 
ewf_adapter_api_udp ewf_adapter_bsd_sockets_api_udp
 

Detailed Description

The Embedded Wireless Framework BSD sockets adapter driver.

Version
Preview