mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sock_dodtls: provide getters for sock and session
To be able to implement the DNS message exchange outside the module.
This commit is contained in:
parent
96b1d9c59e
commit
1b6c9a8334
@ -32,6 +32,7 @@
|
||||
#ifndef NET_SOCK_DODTLS_H
|
||||
#define NET_SOCK_DODTLS_H
|
||||
|
||||
#include "net/sock/dtls.h"
|
||||
#include "net/sock/udp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -105,6 +106,20 @@ int sock_dodtls_query(const char *domain_name, void *addr_out, int family);
|
||||
*/
|
||||
int sock_dodtls_get_server(sock_udp_ep_t *server);
|
||||
|
||||
/**
|
||||
* @brief Return the sock used by the DNS over DTLS client
|
||||
*
|
||||
* @return The sock used by the DNS over DTLS client
|
||||
*/
|
||||
sock_dtls_t *sock_dodtls_get_dtls_sock(void);
|
||||
|
||||
/**
|
||||
* @brief Return the DTLS ssession used by the DNS over DTLS client
|
||||
*
|
||||
* @return The DTLS session used by the DNS over DTLS client
|
||||
*/
|
||||
sock_dtls_session_t *sock_dodtls_get_server_session(void);
|
||||
|
||||
/**
|
||||
* @brief Configure and establish session with DNS over DTLS server
|
||||
*
|
||||
|
@ -136,6 +136,16 @@ int sock_dodtls_get_server(sock_udp_ep_t *server)
|
||||
return res;
|
||||
}
|
||||
|
||||
sock_dtls_t *sock_dodtls_get_dtls_sock(void)
|
||||
{
|
||||
return &_dtls_sock;
|
||||
}
|
||||
|
||||
sock_dtls_session_t *sock_dodtls_get_server_session(void)
|
||||
{
|
||||
return &_server_session;
|
||||
}
|
||||
|
||||
int sock_dodtls_set_server(const sock_udp_ep_t *server,
|
||||
const credman_credential_t *creds)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user