Loading...
Searching...
No Matches

DTLS session management module definition. More...

Detailed Description

DTLS session management module definition.

Note
This module does not accept or close DTLS sessions, it merely provides a place to store session objects.
Author
János Brodbeck janos.nosp@m..bro.nosp@m.dbeck.nosp@m.@ml-.nosp@m.pa.co.nosp@m.m

Definition in file dsm.h.

#include <stdint.h>
#include "dtls.h"
#include "net/sock/dtls.h"
+ Include dependency graph for dsm.h:

Go to the source code of this file.

Macros

#define CONFIG_DSM_PEER_MAX   (CONFIG_DTLS_PEER_MAX)
 Maximum number of maintained DTLS sessions (tinyDTLS)
 

Enumerations

enum  dsm_state_t { NO_SPACE = -1 , SESSION_STATE_NONE = 0 , SESSION_STATE_HANDSHAKE , SESSION_STATE_ESTABLISHED }
 Session management states. More...
 

Functions

void dsm_init (void)
 Initialize the DTLS session management.
 
dsm_state_t dsm_store (sock_dtls_t *sock, sock_dtls_session_t *session, dsm_state_t new_state, bool restore)
 Stores a session.
 
void dsm_remove (sock_dtls_t *sock, sock_dtls_session_t *session)
 Removes a session.
 
uint8_t dsm_get_num_maximum_slots (void)
 Returns the maximum number of sessions slots.
 
uint8_t dsm_get_num_available_slots (void)
 Returns the number of available session slots.
 
ssize_t dsm_get_least_recently_used_session (sock_dtls_t *sock, sock_dtls_session_t *session)
 Returns the least recently used session.