Electroneum
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
47struct ub_ctx;
48struct ub_result;
49struct module_env;
50struct comm_base;
51struct outside_network;
52struct ub_randstate;
53struct ctx_query;
54struct outbound_entry;
55struct module_qstate;
56struct comm_point;
57struct comm_reply;
58struct regional;
59struct tube;
60struct sldns_buffer;
61struct ub_event_base;
62struct query_info;
63
68struct libworker {
72 struct ub_ctx* ctx;
73
75 int is_bg;
80
82 struct module_env* env;
84 struct comm_base* base;
88 struct ub_randstate* rndstate;
90 void* sslctx;
91};
92
101int libworker_bg(struct ub_ctx* ctx);
102
112int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q);
113
121 struct ub_event_base* eb);
122
131 int* async_id);
132
138
141
152 struct regional* temp, enum sec_status msg_security);
153
154#endif /* LIBUNBOUND_LIBWORKER_H */
const char * res
int libworker_bg(struct ub_ctx *ctx)
int libworker_fg(struct ub_ctx *ctx, struct ctx_query *q)
struct libworker * libworker_create_event(struct ub_ctx *ctx, struct ub_event_base *eb)
void libworker_delete_event(struct libworker *w)
void libworker_alloc_cleanup(void *arg)
int libworker_attach_mesh(struct ub_ctx *ctx, struct ctx_query *q, int *async_id)
void libworker_enter_result(struct ub_result *res, struct sldns_buffer *buf, struct regional *temp, enum sec_status msg_security)
sec_status
const char * buf
struct outside_network * back
Definition libworker.h:86
int thread_num
Definition libworker.h:70
struct comm_base * base
Definition libworker.h:84
struct module_env * env
Definition libworker.h:82
int is_bg
Definition libworker.h:75
void * sslctx
Definition libworker.h:90
struct ub_ctx * ctx
Definition libworker.h:72
int is_bg_thread
Definition libworker.h:77
int want_quit
Definition libworker.h:79
struct ub_randstate * rndstate
Definition libworker.h:88
Definition tube.h:63