Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
mbedtlsconnection.c File Reference
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "ca-ot-util/cascoda_dns.h"
#include "cascoda-util/cascoda_tasklet.h"
#include "cascoda-util/cascoda_time.h"
#include "openthread/dns.h"
#include "openthread/thread.h"
#include "ca821x_log.h"
#include "mbedtlsconnection.h"
#include "object_security.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/entropy.h"
Include dependency graph for mbedtlsconnection.c:

Functions

ca_error split_hostname (char *uri, char **hostp, char **portp)
 
connection_tconnection_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. More...
 
void connection_free (connection_t *con)
 Free a connection created with connection_create. More...
 
uint8_t lwm2m_buffer_send (void *sessionH, uint8_t *buffer, size_t length, void *userdata)
 
bool lwm2m_session_is_equal (void *session1, void *session2, void *userData)
 

Function Documentation

◆ connection_create()

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.

Note that the connection will not be immediately active, and will require some time to resolve hostname and form DTLS connection with the server.

Parameters
aInstanceOpenthread Instance pointer
lwm2mHWakaama context pointer
securityObjPointer to LWM2M security object (to extract creds)
instanceIdSecurity object instance ID
Returns
Pointer to the connection created, or NULL if error.

◆ connection_free()

void connection_free ( connection_t con)

Free a connection created with connection_create.

Parameters
conThe connection to free

◆ lwm2m_buffer_send()

uint8_t lwm2m_buffer_send ( void *  sessionH,
uint8_t *  buffer,
size_t  length,
void *  userdata 
)

◆ lwm2m_session_is_equal()

bool lwm2m_session_is_equal ( void *  session1,
void *  session2,
void *  userData 
)

◆ split_hostname()

ca_error split_hostname ( char *  uri,
char **  hostp,
char **  portp 
)