Loading...
Searching...
No Matches
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
9#pragma once
10
33
34#include "net/sock/dtls.h"
35#include "net/sock/udp.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
45#define SOCK_DODTLS_PORT (853)
46
52#ifndef CONFIG_SOCK_DODTLS_RETRIES
53#define CONFIG_SOCK_DODTLS_RETRIES (2)
54#endif
55
59#ifndef CONFIG_SOCK_DODTLS_TIMEOUT_MS
60#define CONFIG_SOCK_DODTLS_TIMEOUT_MS (1000U)
61#endif
63
67#define SOCK_DODTLS_MAX_NAME_LEN (CONFIG_DNS_MSG_LEN - sizeof(dns_hdr_t) - 4)
69
95int sock_dodtls_query(const char *domain_name, void *addr_out, int family);
96
107
114
121
139 const credman_credential_t *creds);
140
141#ifdef __cplusplus
142}
143#endif
144
struct sock_dtls sock_dtls_t
forward declare for async
Definition types.h:47
sock_dtls_session_t * sock_dodtls_get_server_session(void)
Return the DTLS ssession used by the DNS over DTLS client.
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.
int sock_dodtls_query(const char *domain_name, void *addr_out, int family)
Get IP address for DNS name.
int sock_dodtls_get_server(sock_udp_ep_t *server)
Get currently configured DNS over DTLS server endpoint.
sock_dtls_t * sock_dodtls_get_dtls_sock(void)
Return the sock used by the DNS over DTLS client.
struct sock_dtls_session sock_dtls_session_t
Information about a created session.
Definition dtls.h:635
struct _sock_tl_ep sock_udp_ep_t
An end point for a UDP sock object.
Definition udp.h:293
DTLS sock definitions.
UDP sock definitions.
Credential information.
Definition credman.h:119