diff options
Diffstat (limited to 'contrib/unbound/libunbound/unbound.h')
-rw-r--r-- | contrib/unbound/libunbound/unbound.h | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/contrib/unbound/libunbound/unbound.h b/contrib/unbound/libunbound/unbound.h index 1de9566..86bd3bf 100644 --- a/contrib/unbound/libunbound/unbound.h +++ b/contrib/unbound/libunbound/unbound.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. */ /** @@ -78,6 +78,10 @@ * ... same as async for non-threaded * ... the callbacks are called in the thread that calls process(ctx) * + * Openssl needs to have locking in place, and the application must set + * it up, because a mere library cannot do this, use the calls + * CRYPTO_set_id_callback and CRYPTO_set_locking_callback. + * * If no threading is compiled in, the above async example uses fork(2) to * create a process to perform the work. The forked process exits when the * calling process exits, or ctx_delete() is called. @@ -97,6 +101,11 @@ extern "C" { #endif +/** the version of this header file */ +#define UNBOUND_VERSION_MAJOR @UNBOUND_VERSION_MAJOR@ +#define UNBOUND_VERSION_MINOR @UNBOUND_VERSION_MINOR@ +#define UNBOUND_VERSION_MICRO @UNBOUND_VERSION_MICRO@ + /** * The validation context is created to hold the resolver status, * validation keys and a small cache (containing messages, rrsets, @@ -520,7 +529,8 @@ int ub_ctx_print_local_zones(struct ub_ctx* ctx); * @param zone_type: type of the zone (like for unbound.conf) in text. * @return 0 if OK, else error. */ -int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type); +int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name, + const char *zone_type); /** * Remove zone from local authority info of the library. @@ -529,7 +539,7 @@ int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type); * If it does not exist, nothing happens. * @return 0 if OK, else error. */ -int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name); +int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name); /** * Add localdata to the library local authority info. @@ -539,7 +549,7 @@ int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name); * "www.example.com IN A 127.0.0.1" * @return 0 if OK, else error. */ -int ub_ctx_data_add(struct ub_ctx* ctx, char *data); +int ub_ctx_data_add(struct ub_ctx* ctx, const char *data); /** * Remove localdata from the library local authority info. @@ -547,7 +557,7 @@ int ub_ctx_data_add(struct ub_ctx* ctx, char *data); * @param data: the name to delete all data from, like "www.example.com". * @return 0 if OK, else error. */ -int ub_ctx_data_remove(struct ub_ctx* ctx, char *data); +int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data); /** * Get a version string from the libunbound implementation. |