- Fix #574: unbound-checkconf reports fatal error if interface names
are used as value for interfaces:
- Fix #574: Review fixes for it.
+ - Fix #576: [FR] UB_* error codes in unbound.h
15 November 2021: Tom
- Improve EDNS option handling, now also works for synthesised
struct ub_result* res;
};
-/**
- * The error constants
- */
-enum ub_ctx_err {
- /** no error */
- UB_NOERROR = 0,
- /** socket operation. Set to -1, so that if an error from _fd() is
- * passed (-1) it gives a socket error. */
- UB_SOCKET = -1,
- /** alloc failure */
- UB_NOMEM = -2,
- /** syntax error */
- UB_SYNTAX = -3,
- /** DNS service failed */
- UB_SERVFAIL = -4,
- /** fork() failed */
- UB_FORKFAIL = -5,
- /** cfg change after finalize() */
- UB_AFTERFINAL = -6,
- /** initialization failed (bad settings) */
- UB_INITFAIL = -7,
- /** error in pipe communication with async bg worker */
- UB_PIPE = -8,
- /** error reading from file (resolv.conf) */
- UB_READFILE = -9,
- /** error async_id does not exist or result already been delivered */
- UB_NOID = -10
-};
-
/**
* Command codes for libunbound pipe.
*
*/
typedef void (*ub_callback_type)(void*, int, struct ub_result*);
+/**
+ * The error constants
+ */
+enum ub_ctx_err {
+ /** no error */
+ UB_NOERROR = 0,
+ /** socket operation. Set to -1, so that if an error from _fd() is
+ * passed (-1) it gives a socket error. */
+ UB_SOCKET = -1,
+ /** alloc failure */
+ UB_NOMEM = -2,
+ /** syntax error */
+ UB_SYNTAX = -3,
+ /** DNS service failed */
+ UB_SERVFAIL = -4,
+ /** fork() failed */
+ UB_FORKFAIL = -5,
+ /** cfg change after finalize() */
+ UB_AFTERFINAL = -6,
+ /** initialization failed (bad settings) */
+ UB_INITFAIL = -7,
+ /** error in pipe communication with async bg worker */
+ UB_PIPE = -8,
+ /** error reading from file (resolv.conf) */
+ UB_READFILE = -9,
+ /** error async_id does not exist or result already been delivered */
+ UB_NOID = -10
+};
+
/**
* Create a resolving and validation context.
* The information from /etc/resolv.conf and /etc/hosts is not utilised by
/**
* Convert error value to a human readable string.
* @param err: error code from one of the libunbound functions.
+ * The error codes are from the type enum ub_ctx_err.
* @return pointer to constant text string, zero terminated.
*/
const char* ub_strerror(int err);