Electroneum
Toggle main menu visibility
Loading...
Searching...
No Matches
libworker.h
Go to the documentation of this file.
1
/*
2
* libunbound/libworker.h - worker thread or process that resolves
3
*
4
* Copyright (c) 2007, NLnet Labs. All rights reserved.
5
*
6
* This software is open source.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
*
12
* Redistributions of source code must retain the above copyright notice,
13
* this list of conditions and the following disclaimer.
14
*
15
* Redistributions in binary form must reproduce the above copyright notice,
16
* this list of conditions and the following disclaimer in the documentation
17
* and/or other materials provided with the distribution.
18
*
19
* Neither the name of the NLNET LABS nor the names of its contributors may
20
* be used to endorse or promote products derived from this software without
21
* specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
44
#ifndef LIBUNBOUND_LIBWORKER_H
45
#define LIBUNBOUND_LIBWORKER_H
46
#include "
util/data/packed_rrset.h
"
47
struct
ub_ctx
;
48
struct
ub_result
;
49
struct
module_env
;
50
struct
comm_base
;
51
struct
outside_network
;
52
struct
ub_randstate;
53
struct
ctx_query
;
54
struct
outbound_entry
;
55
struct
module_qstate
;
56
struct
comm_point
;
57
struct
comm_reply
;
58
struct
regional
;
59
struct
tube
;
60
struct
sldns_buffer
;
61
struct
ub_event_base
;
62
struct
query_info
;
63
68
struct
libworker
{
70
int
thread_num
;
72
struct
ub_ctx
*
ctx
;
73
75
int
is_bg
;
77
int
is_bg_thread
;
79
int
want_quit
;
80
82
struct
module_env
*
env
;
84
struct
comm_base
*
base
;
86
struct
outside_network
*
back
;
88
struct
ub_randstate*
rndstate
;
90
void
*
sslctx
;
91
};
92
101
int
libworker_bg
(
struct
ub_ctx
* ctx);
102
112
int
libworker_fg
(
struct
ub_ctx
* ctx,
struct
ctx_query
* q);
113
120
struct
libworker
*
libworker_create_event
(
struct
ub_ctx
*
ctx
,
121
struct
ub_event_base
* eb);
122
130
int
libworker_attach_mesh
(
struct
ub_ctx
*
ctx
,
struct
ctx_query
* q,
131
int
* async_id);
132
137
void
libworker_delete_event
(
struct
libworker
* w);
138
140
void
libworker_alloc_cleanup
(
void
* arg);
141
151
void
libworker_enter_result
(
struct
ub_result
*
res
,
struct
sldns_buffer
*
buf
,
152
struct
regional
* temp,
enum
sec_status
msg_security);
153
154
#endif
/* LIBUNBOUND_LIBWORKER_H */
res
const char * res
Definition
hmac_keccak.cpp:41
libworker_bg
int libworker_bg(struct ub_ctx *ctx)
libworker_fg
int libworker_fg(struct ub_ctx *ctx, struct ctx_query *q)
libworker_create_event
struct libworker * libworker_create_event(struct ub_ctx *ctx, struct ub_event_base *eb)
libworker_delete_event
void libworker_delete_event(struct libworker *w)
libworker_alloc_cleanup
void libworker_alloc_cleanup(void *arg)
libworker_attach_mesh
int libworker_attach_mesh(struct ub_ctx *ctx, struct ctx_query *q, int *async_id)
libworker_enter_result
void libworker_enter_result(struct ub_result *res, struct sldns_buffer *buf, struct regional *temp, enum sec_status msg_security)
packed_rrset.h
sec_status
sec_status
Definition
packed_rrset.h:176
buf
const char * buf
Definition
slow_memmem.cpp:74
comm_base
Definition
netevent.h:96
comm_point
Definition
netevent.h:154
comm_reply
Definition
netevent.h:112
ctx_query
Definition
context.h:142
libworker
Definition
libworker.h:68
libworker::back
struct outside_network * back
Definition
libworker.h:86
libworker::thread_num
int thread_num
Definition
libworker.h:70
libworker::base
struct comm_base * base
Definition
libworker.h:84
libworker::env
struct module_env * env
Definition
libworker.h:82
libworker::is_bg
int is_bg
Definition
libworker.h:75
libworker::sslctx
void * sslctx
Definition
libworker.h:90
libworker::ctx
struct ub_ctx * ctx
Definition
libworker.h:72
libworker::is_bg_thread
int is_bg_thread
Definition
libworker.h:77
libworker::want_quit
int want_quit
Definition
libworker.h:79
libworker::rndstate
struct ub_randstate * rndstate
Definition
libworker.h:88
module_env
Definition
module.h:307
module_qstate
Definition
module.h:571
outbound_entry
Definition
outbound_list.h:61
outside_network
Definition
outside_network.h:70
query_info
Definition
msgreply.h:69
regional
Definition
regional.h:60
sldns_buffer
Definition
sbuffer.h:117
tube
Definition
tube.h:63
ub_ctx
Definition
context.h:62
ub_event_base
Definition
unbound-event.h:115
ub_result
Definition
unbound.h:123
external
unbound
libunbound
libworker.h
Generated on
for Electroneum by
1.17.0