25 #include "mbedtls/certs.h"
26 #include "mbedtls/error.h"
27 #include "mbedtls/net_sockets.h"
28 #include "mbedtls/ssl.h"
29 #include "mbedtls/timing.h"
31 #include "openthread/ip6.h"
32 #include "openthread/random_crypto.h"
33 #include "openthread/udp.h"
38 #define LWM2M_STANDARD_PORT_STR "5683"
39 #define LWM2M_STANDARD_PORT 5683
40 #define LWM2M_DTLS_PORT_STR "5684"
41 #define LWM2M_DTLS_PORT 5684
42 #define LWM2M_BSSERVER_PORT_STR "5685"
43 #define LWM2M_BSSERVER_PORT 5685
58 mbedtls_ssl_context
ssl;
85 lwm2m_context_t *lwm2mH,
86 lwm2m_object_t *securityObj,
Global error declarations for use across the Cascoda SDK.
Helper 'tasklet' framework for scheduling simple events for the future.
void connection_rx_info_callback(uint16_t aPktLen)
Callback that can be implemented by the application to track receive statistics.
Definition: lwm2mclient.c:670
connection_t * connection_create(otInstance *aInstance, lwm2m_context_t *lwm2mH, lwm2m_object_t *securityObj, int instanceId)
Called from example code directly to create a connection when connecting to a server.
Definition: mbedtlsconnection.c:419
void connection_free(connection_t *con)
Free a connection created with connection_create.
Definition: connection.c:195
struct connection_t connection_t
The struct for holding information about each connection the lwm2m stack uses.
@ CIPHERSUITE_COUNT
We only configure one ciphersuite on the client, based on authentication method.
Definition: mbedtlsconnection.h:47
@ LINK_MTU
Maximum Transmission Unit for link.
Definition: mbedtlsconnection.h:49
@ CONPOOL_SIZE
Maximum number of concurrent connections.
Definition: mbedtlsconnection.h:48
void connection_tx_info_callback(uint16_t aPktLen)
Callback that can be implemented by the application to track transmit statistics.
Definition: lwm2mclient.c:675
Internal tasklet state structure.
Definition: cascoda_tasklet.h:66
The struct for holding information about each connection the lwm2m stack uses.
Definition: connection.h:47
lwm2m_context_t * lwm2mH
Pointer to instance of lwm2m.
Definition: connection.h:50
int cipherSuites[CIPHERSUITE_COUNT+1]
List of the cipher suites in use.
Definition: mbedtlsconnection.h:64
uint32_t intermediateTime
Used with mbedtls_tasklet to implement the intermediate time.
Definition: mbedtlsconnection.h:66
bool isSecure
Used to determine whether this connection is secured with dtls.
Definition: mbedtlsconnection.h:69
mbedtls_ssl_config conf
mbedtls ssl config info
Definition: mbedtlsconnection.h:59
int securityInstId
lwm2m security instance ID
Definition: mbedtlsconnection.h:65
mbedtls_ssl_context ssl
mbedtls ssl context and state
Definition: mbedtlsconnection.h:58
lwm2m_object_t * securityObj
Pointer to lwm2m security instance.
Definition: mbedtlsconnection.h:63
ca_tasklet mbedtls_tasklet
Tasklet for managing mbedtls timing.
Definition: mbedtlsconnection.h:60
bool isTimerPassed
Used in with mbedtls_tasklet to determine expired or cancelled.
Definition: mbedtlsconnection.h:68
otUdpSocket socket
Openthread socket structure, used for UDP communications.
Definition: connection.h:48
otInstance * otInstance
Pointer to openthread instance.
Definition: connection.h:49
bool inUse
Used internally to determine whether this connection structure is in use.
Definition: connection.h:51