summaryrefslogtreecommitdiff
path: root/usr.sbin/unbound/libunbound/context.h
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2016-06-22 20:05:42 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2016-06-22 20:05:42 +0000
commit4937f0598af49939d892e5ac23e4713af48b8b85 (patch)
treead8f84808e5312ed585a806e0e1188576e37c199 /usr.sbin/unbound/libunbound/context.h
parent0e5c9505f4b17a510e99723480ba7763c43a89e0 (diff)
update to unbound-1.5.9. (there will be a follow-up commit to cherrypick a
couple of post-1.5.9 patches). tests from Mark Patruck, danj, matthieu, millert. reads ok to jung, ok florian.
Diffstat (limited to 'usr.sbin/unbound/libunbound/context.h')
-rw-r--r--usr.sbin/unbound/libunbound/context.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/usr.sbin/unbound/libunbound/context.h b/usr.sbin/unbound/libunbound/context.h
index 8898f3ebfdf..d32c0b00aa0 100644
--- a/usr.sbin/unbound/libunbound/context.h
+++ b/usr.sbin/unbound/libunbound/context.h
@@ -21,16 +21,16 @@
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
@@ -48,6 +48,8 @@
#include "util/data/packed_rrset.h"
struct libworker;
struct tube;
+struct sldns_buffer;
+struct ub_event_base;
/**
* The context structure
@@ -111,6 +113,11 @@ struct ub_ctx {
/** random state used to seed new random state structures */
struct ub_randstate* seed_rnd;
+ /** event base for event oriented interface */
+ struct ub_event_base* event_base;
+ /** libworker for event based interface */
+ struct libworker* event_worker;
+
/** next query number (to try) to use */
int next_querynum;
/** number of async queries outstanding */
@@ -234,7 +241,7 @@ void context_query_delete(struct ctx_query* q);
* @param cbarg: user arg for async queries.
* @return new ctx_query or NULL for malloc failure.
*/
-struct ctx_query* context_new(struct ub_ctx* ctx, char* name, int rrtype,
+struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, ub_callback_t cb, void* cbarg);
/**
@@ -275,7 +282,7 @@ uint8_t* context_serialize_new_query(struct ctx_query* q, uint32_t* len);
* @return: an alloc, or NULL on mem error.
*/
uint8_t* context_serialize_answer(struct ctx_query* q, int err,
- ldns_buffer* pkt, uint32_t* len);
+ struct sldns_buffer* pkt, uint32_t* len);
/**
* Serialize a query cancellation. Serializes query async id