dodtls.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
32 #ifndef NET_SOCK_DODTLS_H
33 #define NET_SOCK_DODTLS_H
34 
35 #include "net/sock/dtls.h"
36 #include "net/sock/udp.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
46 #define SOCK_DODTLS_PORT (853)
53 #ifndef CONFIG_SOCK_DODTLS_RETRIES
54 #define CONFIG_SOCK_DODTLS_RETRIES (2)
55 #endif
56 
60 #ifndef CONFIG_SOCK_DODTLS_TIMEOUT_MS
61 #define CONFIG_SOCK_DODTLS_TIMEOUT_MS (1000U)
62 #endif
68 #define SOCK_DODTLS_MAX_NAME_LEN (CONFIG_DNS_MSG_LEN - sizeof(dns_hdr_t) - 4)
96 int sock_dodtls_query(const char *domain_name, void *addr_out, int family);
97 
108 
115 
122 
140  const credman_credential_t *creds);
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* NET_SOCK_DODTLS_H */
int sock_dodtls_set_server(const sock_udp_ep_t *server, const credman_credential_t *creds)
Configure and establish session with DNS over DTLS server.
sock_dtls_session_t * sock_dodtls_get_server_session(void)
Return the DTLS ssession used by the DNS over DTLS client.
int sock_dodtls_query(const char *domain_name, void *addr_out, int family)
Get IP address for DNS name.
sock_dtls_t * sock_dodtls_get_dtls_sock(void)
Return the sock used by the DNS over DTLS client.
int sock_dodtls_get_server(sock_udp_ep_t *server)
Get currently configured DNS over DTLS server endpoint.
DTLS sock definitions.
UDP sock definitions.
Common IP-based transport layer end point.
Definition: sock.h:215
Credential information.
Definition: credman.h:120
Information about remote client connected to the server.
Information about DTLS sock.