mbed port of tinydtls

Embed: (wiki syntax)

« Back to documentation index

peer.h File Reference

peer.h File Reference

information about peers in a DTLS session More...

Go to the source code of this file.

Data Structures

struct  dtls_peer_t
 Holds security parameters, local state and the transport address for each peer. More...

Typedefs

typedef struct dtls_peer_t dtls_peer_t
 Holds security parameters, local state and the transport address for each peer.

Functions

dtls_peer_tdtls_new_peer (const session_t *session)
 Creates a new peer for given session.
void dtls_free_peer (dtls_peer_t *peer)
 Releases the storage allocated to peer.
static dtls_state_t dtls_peer_state (const dtls_peer_t *peer)
 Returns the current state of peer.
static int dtls_peer_is_connected (const dtls_peer_t *peer)
 Checks if given peer is connected.

Detailed Description

information about peers in a DTLS session

Definition in file peer.h.


Typedef Documentation

typedef struct dtls_peer_t dtls_peer_t

Holds security parameters, local state and the transport address for each peer.


Function Documentation

void dtls_free_peer ( dtls_peer_t peer )

Releases the storage allocated to peer.

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

static int dtls_peer_is_connected ( const dtls_peer_t peer ) [static]

Checks if given peer is connected.

This function returns 1 if connected, or 0 otherwise.

Definition at line 92 of file peer.h.

static dtls_state_t dtls_peer_state ( const dtls_peer_t peer ) [static]

Returns the current state of peer.

Definition at line 84 of file peer.h.