Embedded Wireless Framework
ewf_adapter_api_gnss.h
Go to the documentation of this file.
1 /************************************************************************/
9 #ifndef __ewf_adapter_dtls__h__included__
10 #define __ewf_adapter_dtls__h__included__
11 
12 #include "ewf.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /************************************************************************/
29 
31 typedef struct _ewf_adapter_dtls_context_info
32 {
34  uint32_t handle_count;
35 
37  uint32_t minimum_handle;
38 
40  uint32_t maximum_handle;
41 
43 
46 {
47  DTLS_1_0 = 0x0100,
48  DTLS_1_2 = 0x0102,
49 
51 
54 {
55  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ALL,
56  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_RSA_WITH_AES_256_CBC_SHA,
57  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_RSA_WITH_AES_128_CBC_SHA,
58  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_RSA_WITH_RC4_128_SHA,
59  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_RSA_WITH_RC4_128_MD5,
60  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_RSA_WITH_3DES_EDE_CBC_SHA,
61  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_RSA_WITH_AES_256_CBC_SHA256,
62  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_RC4_128_SHA,
63  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
64  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_AES_128_CBC_SHA,
65  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_AES_256_CBC_SHA,
66  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
67  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
68  EWF_ADAPTER_DTLS_CONTEXT_CIPHER_SUITE_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
69 
71 
72 #define EWF_DTLS_CONTEXT_SETTING_TLS_VERSION "tls version"
73 #define EWF_DTLS_CONTEXT_SETTING_DTLS_VERSION "dtls version"
74 #define EWF_DTLS_CONTEXT_SETTING_CIPHER_SUITE "cipher"
75 
77 typedef struct _ewf_adapter_api_dtls
78 {
79  ewf_result(*get_info)(ewf_adapter* adapter_ptr, ewf_adapter_dtls_context_info* info_ptr);
80  ewf_result(*configure)(ewf_adapter* adapter_ptr, ewf_adapter_dtls_context_handle context_handle, const char* setting_str, const char* value_str);
81 
82  ewf_result(*set_version)(ewf_adapter* adapter_ptr, ewf_adapter_dtls_context_handle context_handle, ewf_adapter_dtls_context_version tls_version);
83  ewf_result(*set_cipher_suite)(ewf_adapter* adapter_ptr, ewf_adapter_dtls_context_handle context_handle, ewf_adapter_dtls_context_cipher_suite cipher_suite);
84  ewf_result(*configure_custom_parameter)(ewf_adapter* adapter_ptr, ewf_adapter_dtls_context_handle context_handle, const char* parameter, const char* value);
85 
87 
92 
97 
101 ewf_result ewf_adapter_dtls_context_configure_custom_parameter(ewf_adapter* adapter_ptr, ewf_adapter_dtls_context_handle context_handle, const char* parameter, const char* value);
102 
103 /************************************************************************/
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* __ewf_adapter_dtls__h__included__ */
The Embedded Wireless Framework.
ewf_result ewf_adapter_dtls_set_version(ewf_adapter *adapter_ptr, ewf_adapter_dtls_context_handle context_handle, ewf_adapter_dtls_context_version *version_ptr)
Set the DTLS version to be used.
int ewf_adapter_dtls_context_handle
the DTLS context handle type
Definition: ewf_adapter_api_gnss.h:28
struct _ewf_adapter_api_dtls ewf_adapter_api_dtls
the DTLS context API structure
struct _ewf_adapter_dtls_context_info ewf_adapter_dtls_context_info
the DTLS context information type
_ewf_adapter_dtls_context_cipher_suite
the DTLS context cipher suite type
Definition: ewf_adapter_api_dtls.h:54
enum _ewf_adapter_dtls_context_version ewf_adapter_dtls_context_version
the DTLS context version type
ewf_result ewf_adapter_dtls_context_set_cipher_suite(ewf_adapter *adapter_ptr, ewf_adapter_dtls_context_handle context_handle, ewf_adapter_dtls_context_cipher_suite cipher_suite)
Set the DTLS cipher suite.
enum _ewf_adapter_dtls_context_cipher_suite ewf_adapter_dtls_context_cipher_suite
the DTLS context cipher suite type
ewf_result ewf_adapter_dtls_context_configure_custom_parameter(ewf_adapter *adapter_ptr, ewf_adapter_dtls_context_handle context_handle, const char *parameter, const char *value)
Set a custom DTLS parameter value.
_ewf_adapter_dtls_context_version
the DTLS context version type
Definition: ewf_adapter_api_dtls.h:46
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
the DTLS context API structure
Definition: ewf_adapter_api_dtls.h:78
the DTLS context information type
Definition: ewf_adapter_api_dtls.h:32
uint32_t maximum_handle
Definition: ewf_adapter_api_dtls.h:40
uint32_t minimum_handle
Definition: ewf_adapter_api_dtls.h:37
uint32_t handle_count
Definition: ewf_adapter_api_dtls.h:34
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50