tinydtls  0.8.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
peer.c File Reference
#include "global.h"
#include "peer.h"
#include "debug.h"

Go to the source code of this file.

Functions

void peer_init ()
 
static dtls_peer_tdtls_malloc_peer ()
 
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 41 of file peer.c.

static dtls_peer_t* dtls_malloc_peer ( )
inlinestatic

Definition at line 36 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 72 of file peer.c.

void peer_init ( )

Definition at line 31 of file peer.c.