summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/isc/include
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/dig/lib/isc/include')
-rw-r--r--usr.bin/dig/lib/isc/include/isc/boolean.h30
-rw-r--r--usr.bin/dig/lib/isc/include/isc/hash.h6
-rw-r--r--usr.bin/dig/lib/isc/include/isc/heap.h12
-rw-r--r--usr.bin/dig/lib/isc/include/isc/hmacsha.h12
-rw-r--r--usr.bin/dig/lib/isc/include/isc/list.h5
-rw-r--r--usr.bin/dig/lib/isc/include/isc/log.h8
-rw-r--r--usr.bin/dig/lib/isc/include/isc/netaddr.h16
-rw-r--r--usr.bin/dig/lib/isc/include/isc/serial.h10
-rw-r--r--usr.bin/dig/lib/isc/include/isc/sockaddr.h24
-rw-r--r--usr.bin/dig/lib/isc/include/isc/symtab.h4
-rw-r--r--usr.bin/dig/lib/isc/include/isc/timer.h4
-rw-r--r--usr.bin/dig/lib/isc/include/isc/types.h7
12 files changed, 50 insertions, 88 deletions
diff --git a/usr.bin/dig/lib/isc/include/isc/boolean.h b/usr.bin/dig/lib/isc/include/isc/boolean.h
deleted file mode 100644
index 3b71b47a0a5..00000000000
--- a/usr.bin/dig/lib/isc/include/isc/boolean.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: boolean.h,v 1.1 2020/02/07 09:58:54 florian Exp $ */
-
-#ifndef ISC_BOOLEAN_H
-#define ISC_BOOLEAN_H 1
-
-/*! \file isc/boolean.h */
-
-typedef enum { isc_boolean_false = 0, isc_boolean_true = 1 } isc_boolean_t;
-
-#define ISC_FALSE isc_boolean_false
-#define ISC_TRUE isc_boolean_true
-#define ISC_TF(x) ((x) ? ISC_TRUE : ISC_FALSE)
-
-#endif /* ISC_BOOLEAN_H */
diff --git a/usr.bin/dig/lib/isc/include/isc/hash.h b/usr.bin/dig/lib/isc/include/isc/hash.h
index 99cf707c83a..fbc103b1b22 100644
--- a/usr.bin/dig/lib/isc/include/isc/hash.h
+++ b/usr.bin/dig/lib/isc/include/isc/hash.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hash.h,v 1.3 2020/02/17 18:58:39 jung Exp $ */
+/* $Id: hash.h,v 1.4 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_HASH_H
#define ISC_HASH_H 1
@@ -98,7 +98,7 @@
uint32_t
isc_hash_function_reverse(const void *data, size_t length,
- isc_boolean_t case_sensitive,
+ int case_sensitive,
const uint32_t *previous_hashp);
/*!<
* \brief Calculate a hash over data.
@@ -119,7 +119,7 @@ isc_hash_function_reverse(const void *data, size_t length,
* 'length' is the size of the data to be hashed.
*
* 'case_sensitive' specifies whether the hash key should be treated as
- * case_sensitive values. It should typically be ISC_FALSE if the hash key
+ * case_sensitive values. It should typically be 0 if the hash key
* is a DNS name.
*
* 'previous_hashp' is a pointer to a previous hash value returned by
diff --git a/usr.bin/dig/lib/isc/include/isc/heap.h b/usr.bin/dig/lib/isc/include/isc/heap.h
index 014ec656596..a94a2a8e9fd 100644
--- a/usr.bin/dig/lib/isc/include/isc/heap.h
+++ b/usr.bin/dig/lib/isc/include/isc/heap.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: heap.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */
+/* $Id: heap.h,v 1.4 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_HEAP_H
#define ISC_HEAP_H 1
@@ -24,10 +24,10 @@
#include <isc/types.h>
/*%
- * The comparison function returns ISC_TRUE if the first argument has
- * higher priority than the second argument, and ISC_FALSE otherwise.
+ * The comparison function returns 1 if the first argument has
+ * higher priority than the second argument, and 0 otherwise.
*/
-typedef isc_boolean_t (*isc_heapcompare_t)(void *, void *);
+typedef int (*isc_heapcompare_t)(void *, void *);
/*%
* The index function allows the client of the heap to receive a callback
@@ -61,8 +61,8 @@ isc_heap_create(isc_heapcompare_t compare,
* Requires:
*\li "mctx" is valid.
*\li "compare" is a function which takes two void * arguments and
- * returns ISC_TRUE if the first argument has a higher priority than
- * the second, and ISC_FALSE otherwise.
+ * returns 1 if the first argument has a higher priority than
+ * the second, and 0 otherwise.
*\li "index" is a function which takes a void *, and an unsigned int
* argument. This function will be called whenever an element's
* index value changes, so it may continue to delete itself from the
diff --git a/usr.bin/dig/lib/isc/include/isc/hmacsha.h b/usr.bin/dig/lib/isc/include/isc/hmacsha.h
index 5ac88fcb6f2..a91d08301e2 100644
--- a/usr.bin/dig/lib/isc/include/isc/hmacsha.h
+++ b/usr.bin/dig/lib/isc/include/isc/hmacsha.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacsha.h,v 1.5 2020/02/25 05:00:43 jsg Exp $ */
+/* $Id: hmacsha.h,v 1.6 2020/09/14 08:40:44 florian Exp $ */
/*! \file isc/hmacsha.h
* This is the header file for the HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
@@ -59,7 +59,7 @@ isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
void
isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
-isc_boolean_t
+int
isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
void
@@ -76,7 +76,7 @@ isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
void
isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
-isc_boolean_t
+int
isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
void
@@ -93,7 +93,7 @@ isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
void
isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
-isc_boolean_t
+int
isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
void
@@ -110,7 +110,7 @@ isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
void
isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
-isc_boolean_t
+int
isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
void
@@ -127,7 +127,7 @@ isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
void
isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
-isc_boolean_t
+int
isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
#endif /* ISC_HMACSHA_H */
diff --git a/usr.bin/dig/lib/isc/include/isc/list.h b/usr.bin/dig/lib/isc/include/isc/list.h
index 9007e371c3b..1c0758041ce 100644
--- a/usr.bin/dig/lib/isc/include/isc/list.h
+++ b/usr.bin/dig/lib/isc/include/isc/list.h
@@ -14,11 +14,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: list.h,v 1.2 2020/02/13 16:56:09 florian Exp $ */
+/* $Id: list.h,v 1.3 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_LIST_H
#define ISC_LIST_H 1
-#include <isc/boolean.h>
#include <isc/assertions.h>
#define ISC_LIST(type) struct { type *head, *tail; }
@@ -37,7 +36,7 @@
#define ISC_LIST_HEAD(list) ((list).head)
#define ISC_LIST_TAIL(list) ((list).tail)
-#define ISC_LIST_EMPTY(list) ISC_TF((list).head == NULL)
+#define ISC_LIST_EMPTY(list) ((list).head == NULL)
#define __ISC_LIST_PREPENDUNSAFE(list, elt, link) \
do { \
diff --git a/usr.bin/dig/lib/isc/include/isc/log.h b/usr.bin/dig/lib/isc/include/isc/log.h
index 792cb542786..44214d9bf4f 100644
--- a/usr.bin/dig/lib/isc/include/isc/log.h
+++ b/usr.bin/dig/lib/isc/include/isc/log.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.h,v 1.7 2020/02/25 05:00:43 jsg Exp $ */
+/* $Id: log.h,v 1.8 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_LOG_H
#define ISC_LOG_H 1
@@ -123,7 +123,7 @@ typedef struct isc_logfile {
* to a size large enough for the largest possible file on a system.
*/
off_t maximum_size;
- isc_boolean_t maximum_reached; /*%< Private. */
+ int maximum_reached; /*%< Private. */
} isc_logfile_t;
/*%
@@ -540,13 +540,13 @@ isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
*\li The debugging level is set to the requested value.
*/
-isc_boolean_t
+int
isc_log_wouldlog(isc_log_t *lctx, int level);
/*%<
* Determine whether logging something to 'lctx' at 'level' would
* actually cause something to be logged somewhere.
*
- * If #ISC_FALSE is returned, it is guaranteed that nothing would
+ * If #0 is returned, it is guaranteed that nothing would
* be logged, allowing the caller to omit unnecessary
* isc_log_write() calls and possible message preformatting.
*/
diff --git a/usr.bin/dig/lib/isc/include/isc/netaddr.h b/usr.bin/dig/lib/isc/include/isc/netaddr.h
index 120b8825faa..44b75b73672 100644
--- a/usr.bin/dig/lib/isc/include/isc/netaddr.h
+++ b/usr.bin/dig/lib/isc/include/isc/netaddr.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.h,v 1.5 2020/09/14 08:39:12 florian Exp $ */
+/* $Id: netaddr.h,v 1.6 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_NETADDR_H
#define ISC_NETADDR_H 1
@@ -42,7 +42,7 @@ struct isc_netaddr {
/*%<
* Compare the 'prefixlen' most significant bits of the network
* addresses 'a' and 'b'. If 'b''s scope is zero then 'a''s scope is
- * ignored. Return #ISC_TRUE if they are equal, #ISC_FALSE if not.
+ * ignored. Return #1 if they are equal, #0 if not.
*/
isc_result_t
@@ -74,22 +74,22 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size);
void
isc_netaddr_fromsockaddr(isc_netaddr_t *netaddr, const isc_sockaddr_t *source);
-isc_boolean_t
+int
isc_netaddr_ismulticast(isc_netaddr_t *na);
/*%<
- * Returns ISC_TRUE if the address is a multicast address.
+ * Returns 1 if the address is a multicast address.
*/
-isc_boolean_t
+int
isc_netaddr_islinklocal(isc_netaddr_t *na);
/*%<
- * Returns #ISC_TRUE if the address is a link local address.
+ * Returns #1 if the address is a link local address.
*/
-isc_boolean_t
+int
isc_netaddr_issitelocal(isc_netaddr_t *na);
/*%<
- * Returns #ISC_TRUE if the address is a site local address.
+ * Returns #1 if the address is a site local address.
*/
#endif /* ISC_NETADDR_H */
diff --git a/usr.bin/dig/lib/isc/include/isc/serial.h b/usr.bin/dig/lib/isc/include/isc/serial.h
index 032b6a79937..a32eb645d9a 100644
--- a/usr.bin/dig/lib/isc/include/isc/serial.h
+++ b/usr.bin/dig/lib/isc/include/isc/serial.h
@@ -14,31 +14,29 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: serial.h,v 1.4 2020/02/17 18:58:39 jung Exp $ */
+/* $Id: serial.h,v 1.5 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_SERIAL_H
#define ISC_SERIAL_H 1
#include <inttypes.h>
-#include <isc/boolean.h>
-
/*! \file isc/serial.h
* \brief Implement 32 bit serial space arithmetic comparison functions.
- * Note: Undefined results are returned as ISC_FALSE.
+ * Note: Undefined results are returned as 0.
*/
/***
*** Functions
***/
-isc_boolean_t
+int
isc_serial_gt(uint32_t a, uint32_t b);
/*%<
* Return true if 'a' > 'b' otherwise false.
*/
-isc_boolean_t
+int
isc_serial_ge(uint32_t a, uint32_t b);
/*%<
* Return true if 'a' >= 'b' otherwise false.
diff --git a/usr.bin/dig/lib/isc/include/isc/sockaddr.h b/usr.bin/dig/lib/isc/include/isc/sockaddr.h
index 45165ffe91d..5563af090fc 100644
--- a/usr.bin/dig/lib/isc/include/isc/sockaddr.h
+++ b/usr.bin/dig/lib/isc/include/isc/sockaddr.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.h,v 1.4 2020/09/14 08:39:12 florian Exp $ */
+/* $Id: sockaddr.h,v 1.5 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
@@ -48,7 +48,7 @@ struct isc_sockaddr {
#define ISC_SOCKADDR_CMPSCOPEZERO 0x0008 /*%< when comparing scopes
* zero scopes always match */
-isc_boolean_t
+int
isc_sockaddr_compare(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
unsigned int flags);
/*%<
@@ -58,16 +58,16 @@ isc_sockaddr_compare(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
* 'flags' is set from ISC_SOCKADDR_CMP*.
*/
-isc_boolean_t
+int
isc_sockaddr_equal(const isc_sockaddr_t *a, const isc_sockaddr_t *b);
/*%<
- * Return ISC_TRUE iff the socket addresses 'a' and 'b' are equal.
+ * Return 1 iff the socket addresses 'a' and 'b' are equal.
*/
-isc_boolean_t
+int
isc_sockaddr_eqaddr(const isc_sockaddr_t *a, const isc_sockaddr_t *b);
/*%<
- * Return ISC_TRUE iff the address parts of the socket addresses
+ * Return 1 iff the address parts of the socket addresses
* 'a' and 'b' are equal, ignoring the ports.
*/
@@ -149,22 +149,22 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size);
* The resulting string is guaranteed to be null-terminated.
*/
-isc_boolean_t
+int
isc_sockaddr_ismulticast(const isc_sockaddr_t *sa);
/*%<
- * Returns #ISC_TRUE if the address is a multicast address.
+ * Returns #1 if the address is a multicast address.
*/
-isc_boolean_t
+int
isc_sockaddr_islinklocal(const isc_sockaddr_t *sa);
/*%<
- * Returns ISC_TRUE if the address is a link local address.
+ * Returns 1 if the address is a link local address.
*/
-isc_boolean_t
+int
isc_sockaddr_issitelocal(const isc_sockaddr_t *sa);
/*%<
- * Returns ISC_TRUE if the address is a sitelocal address.
+ * Returns 1 if the address is a sitelocal address.
*/
#define ISC_SOCKADDR_FORMATSIZE \
diff --git a/usr.bin/dig/lib/isc/include/isc/symtab.h b/usr.bin/dig/lib/isc/include/isc/symtab.h
index 7d628000424..d92fd7e9d5c 100644
--- a/usr.bin/dig/lib/isc/include/isc/symtab.h
+++ b/usr.bin/dig/lib/isc/include/isc/symtab.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.h,v 1.3 2020/02/17 18:58:39 jung Exp $ */
+/* $Id: symtab.h,v 1.4 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_SYMTAB_H
#define ISC_SYMTAB_H 1
@@ -110,7 +110,7 @@ typedef enum {
isc_result_t
isc_symtab_create(unsigned int size,
isc_symtabaction_t undefine_action, void *undefine_arg,
- isc_boolean_t case_sensitive, isc_symtab_t **symtabp);
+ int case_sensitive, isc_symtab_t **symtabp);
/*% Destroy a symbol table. */
void
diff --git a/usr.bin/dig/lib/isc/include/isc/timer.h b/usr.bin/dig/lib/isc/include/isc/timer.h
index a32996fb0d6..1fd5ca41b5d 100644
--- a/usr.bin/dig/lib/isc/include/isc/timer.h
+++ b/usr.bin/dig/lib/isc/include/isc/timer.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.h,v 1.12 2020/02/25 05:00:43 jsg Exp $ */
+/* $Id: timer.h,v 1.13 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_TIMER_H
#define ISC_TIMER_H 1
@@ -165,7 +165,7 @@ isc_timer_create(isc_timermgr_t *manager,
isc_result_t
isc_timer_reset(isc_timer_t *timer,
const struct timespec *interval,
- isc_boolean_t purge);
+ int purge);
/*%<
* Change the timer's type, expires, and interval values to the given
* values. If 'purge' is TRUE, any pending events from this timer
diff --git a/usr.bin/dig/lib/isc/include/isc/types.h b/usr.bin/dig/lib/isc/include/isc/types.h
index 7feaaa58b50..0352aee05fa 100644
--- a/usr.bin/dig/lib/isc/include/isc/types.h
+++ b/usr.bin/dig/lib/isc/include/isc/types.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: types.h,v 1.4 2020/02/25 13:18:31 jsg Exp $ */
+/* $Id: types.h,v 1.5 2020/09/14 08:40:44 florian Exp $ */
#ifndef ISC_TYPES_H
#define ISC_TYPES_H 1
@@ -25,11 +25,6 @@
*/
/*
- * XXXDCL should isc_boolean_t be moved here, requiring an explicit include
- * of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
- */
-#include <isc/boolean.h>
-/*
* XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
* list macros too.
*/