libwebsockets
Lightweight C library for HTML5 websockets
Toggle main menu visibility
class="ui-resizable-handle">
Loading...
Searching...
No Matches
lws-auth-dns.h
Go to the documentation of this file.
1
/*
2
* libwebsockets - small server side websockets and web server implementation
3
*
4
* Copyright (C) 2010 - 2026 Andy Green <andy@warmcat.com>
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to
8
* deal in the Software without restriction, including without limitation the
9
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
* sell copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
* IN THE SOFTWARE.
23
*/
24
25
#if defined(LWS_WITH_AUTHORITATIVE_DNS)
26
27
struct
auth_dns_rr {
28
lws_dll2_t
list;
29
30
char
*rdata;
31
size_t
rdata_len;
32
33
uint8_t
*wire_rdata;
34
size_t
wire_rdata_len;
35
};
36
37
struct
auth_dns_rrset {
38
lws_dll2_t
list;
39
lws_dll2_owner_t
rr_list;
40
41
char
*name;
42
uint32_t
ttl;
43
uint16_t
class_;
44
uint16_t
type;
45
};
46
47
struct
auth_dns_zone {
48
lws_dll2_owner_t
rrset_list;
49
char
default_ttl[16];
50
char
origin[256];
51
};
52
53
LWS_VISIBLE
LWS_EXTERN
int
54
lws_auth_dns_parse_zone_buf(
const
char
*buf,
size_t
len,
struct
auth_dns_zone *zone,
const
char
*ipv4,
const
char
*ipv6);
55
56
LWS_VISIBLE
LWS_EXTERN
void
57
lws_auth_dns_free_zone(
struct
auth_dns_zone *z);
58
59
struct
lws_auth_dns_sign_info {
60
const
char
*input_filepath;
61
const
char
*output_filepath;
62
const
char
*jws_filepath;
/* Path to output signed JWS of the zone */
63
const
char
*zsk_jwk_filepath;
/* Path to ZSK JWK config */
64
const
char
*ksk_jwk_filepath;
/* Path to KSK JWK config */
65
const
char
* (*subst_cb)(
struct
lws_auth_dns_sign_info *info,
const
char
*name);
66
void
*subst_priv;
67
const
char
**subst_names;
/* For lws_strexp fallback */
68
const
char
**subst_values;
69
time_t sign_validity_start_time;
/* 0 = now */
70
uint32_t
sign_validity_duration;
/* 0 = 30 days */
71
int
num_substs;
72
const
char
*ipv4;
/* Dynamic IP override */
73
const
char
*ipv6;
74
struct
lws_context *cx;
/* For logging/alloc */
75
76
const
char
*curr_line;
77
size_t
curr_line_len;
78
uint8_t
skip_line;
79
};
80
86
LWS_VISIBLE
LWS_EXTERN
int
87
lws_auth_dns_sign_zone(
struct
lws_auth_dns_sign_info *info);
88
94
LWS_VISIBLE
LWS_EXTERN
int
95
lws_auth_dns_verify_zone(
struct
lws_auth_dns_sign_info *info);
96
97
#endif
lws_dll2_t
struct lws_dll2 lws_dll2_t
lws_dll2_owner_t
struct lws_dll2_owner lws_dll2_owner_t
uint16_t
unsigned short uint16_t
Definition
libwebsockets.h:696
uint32_t
unsigned int uint32_t
Definition
libwebsockets.h:695
LWS_EXTERN
#define LWS_EXTERN
Definition
libwebsockets.h:296
uint8_t
unsigned char uint8_t
Definition
libwebsockets.h:697
LWS_VISIBLE
#define LWS_VISIBLE
Definition
libwebsockets.h:291
include
libwebsockets
lws-auth-dns.h
Generated on
for libwebsockets by
1.18.0