tinydtls  0.8.6
Functions
peer.c File Reference
#include "global.h"
#include "peer.h"
#include "dtls_debug.h"

Go to the source code of this file.

Functions

void peer_init (void)
 
static dtls_peer_tdtls_malloc_peer (void)
 
void dtls_free_peer (dtls_peer_t *peer)
 
dtls_peer_tdtls_new_peer (const session_t *session)
 

Function Documentation

void dtls_free_peer ( dtls_peer_t peer)

Releases the storage allocated to peer.

Definition at line 33 of file peer.c.

static dtls_peer_t* dtls_malloc_peer ( void  )
inlinestatic

Definition at line 28 of file peer.c.

dtls_peer_t* dtls_new_peer ( const session_t session)

Creates a new peer for given session. The current configuration is initialized with the cipher suite TLS_NULL_WITH_NULL_NULL (i.e. no security at all). This function returns a pointer to the new peer or NULL on error. The caller is responsible for releasing the storage allocated for this peer using dtls_free_peer().

Parameters
sessionThe remote peer's address and local interface index.
Returns
A pointer to a newly created and initialized peer object or NULL on error.

Definition at line 64 of file peer.c.

void peer_init ( void  )

Definition at line 23 of file peer.c.