diff options
| author | christos <christos@NetBSD.org> | 2011-09-11 18:55:24 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2011-09-11 18:55:24 +0000 |
| commit | d4ecc50fcd7f252a8bb7d9ee91a0fec6246e0bd2 (patch) | |
| tree | 2dec4b792c2ba583292531441bd69b0dd9ed1ce8 /external/bsd/bind/dist/lib/isc/include | |
| parent | 9feded47959dc7443fc9ce7c3c26af5d36f2523a (diff) | |
merge bind-9.9.0a1
Diffstat (limited to 'external/bsd/bind/dist/lib/isc/include')
7 files changed, 105 insertions, 24 deletions
diff --git a/external/bsd/bind/dist/lib/isc/include/isc/file.h b/external/bsd/bind/dist/lib/isc/include/isc/file.h index 475774e7c30..a261b6a3ba5 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/file.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/file.h @@ -1,4 +1,4 @@ -/* $NetBSD: file.h,v 1.2 2011/02/16 03:47:12 christos Exp $ */ +/* $NetBSD: file.h,v 1.3 2011/09/11 18:55:41 christos Exp $ */ /* * Copyright (C) 2004-2007, 2009, 2011 Internet Systems Consortium, Inc. ("ISC") @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: file.h,v 1.39 2011-01-11 23:47:14 tbox Exp */ +/* Id: file.h,v 1.41 2011-03-04 23:47:47 tbox Exp */ #ifndef ISC_FILE_H #define ISC_FILE_H 1 @@ -187,6 +187,27 @@ isc_file_isabsolute(const char *filename); * \brief Return #ISC_TRUE if the given file name is absolute. */ +isc_result_t +isc_file_isplainfile(const char *name); +/*!< + * \brief Check that the file is a plain file + * + * Returns: + *\li #ISC_R_SUCCESS + * Success. The file is a plain file. + *\li #ISC_R_INVALIDFILE + * The path specified was not usable by the operating system. + *\li #ISC_R_FILENOTFOUND + * The file does not exist. This return code comes from + * errno=ENOENT when stat returns -1. This code is mentioned + * here, because in logconf.c, it is the one rcode that is + * permitted in addition to ISC_R_SUCCESS. This is done since + * the next call in logconf.c is to isc_stdio_open(), which + * will create the file if it can. + *\li #other ISC_R_* errors translated from errno + * These occur when stat returns -1 and an errno. + */ + isc_boolean_t isc_file_iscurrentdir(const char *filename); /*!< diff --git a/external/bsd/bind/dist/lib/isc/include/isc/mem.h b/external/bsd/bind/dist/lib/isc/include/isc/mem.h index 5fae0e40db3..211199cd6cb 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/mem.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/mem.h @@ -1,7 +1,7 @@ -/* $NetBSD: mem.h,v 1.6 2011/02/16 03:47:12 christos Exp $ */ +/* $NetBSD: mem.h,v 1.7 2011/09/11 18:55:41 christos Exp $ */ /* - * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1997-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: mem.h,v 1.89 2010-08-11 22:54:58 jinmei Exp */ +/* Id: mem.h,v 1.91 2011-08-09 23:46:39 tbox Exp */ #ifndef ISC_MEM_H #define ISC_MEM_H 1 @@ -336,7 +336,7 @@ isc_mem_createx2(size_t max_size, size_t target_size, * ISC_MEMFLAG_INTERNAL is not set, 'target_size' is ignored. * * 'max_size' is also used to size the statistics arrays and the array - * used to record active memory when ISC_MEM_DEBUGRECORD is set. Settin + * used to record active memory when ISC_MEM_DEBUGRECORD is set. Setting * 'max_size' too low can have detrimental effects on performance. * * A memory context created using isc_mem_createx() will obtain diff --git a/external/bsd/bind/dist/lib/isc/include/isc/namespace.h b/external/bsd/bind/dist/lib/isc/include/isc/namespace.h index 469919094f0..c59bd68853f 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/namespace.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/namespace.h @@ -1,7 +1,7 @@ -/* $NetBSD: namespace.h,v 1.2 2011/02/16 03:47:12 christos Exp $ */ +/* $NetBSD: namespace.h,v 1.3 2011/09/11 18:55:41 christos Exp $ */ /* - * Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2009-2011 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 @@ -16,7 +16,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: namespace.h,v 1.9 2010-12-04 13:25:59 marka Exp */ +/* Id: namespace.h,v 1.12 2011-08-23 17:02:53 each Exp */ #ifndef ISCAPI_NAMESPACE_H #define ISCAPI_NAMESPACE_H 1 @@ -90,6 +90,7 @@ #define isc_mempool_getfillcount isc__mempool_getfillcount #define isc_socket_create isc__socket_create +#define isc_socket_dup isc__socket_dup #define isc_socket_attach isc__socket_attach #define isc_socket_detach isc__socket_detach #define isc_socketmgr_create isc__socketmgr_create @@ -112,6 +113,7 @@ #define isc_socket_listen isc__socket_listen #define isc_socket_accept isc__socket_accept #define isc_socket_connect isc__socket_connect +#define isc_socket_getfd isc__socket_getfd #define isc_socket_getname isc__socket_getname #define isc_socket_gettag isc__socket_gettag #define isc_socket_getpeername isc__socket_getpeername diff --git a/external/bsd/bind/dist/lib/isc/include/isc/socket.h b/external/bsd/bind/dist/lib/isc/include/isc/socket.h index 2c5f3a4f4cb..fa60782de21 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/socket.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/socket.h @@ -1,7 +1,7 @@ -/* $NetBSD: socket.h,v 1.2 2011/02/16 03:47:12 christos Exp $ */ +/* $NetBSD: socket.h,v 1.3 2011/09/11 18:55:41 christos Exp $ */ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: socket.h,v 1.94 2009-10-01 01:30:01 sar Exp */ +/* Id: socket.h,v 1.98 2011-08-24 23:17:52 marka Exp */ #ifndef ISC_SOCKET_H #define ISC_SOCKET_H 1 @@ -298,6 +298,9 @@ typedef struct isc_socketmethods { isc_sockettype_t (*gettype)(isc_socket_t *sock); void (*ipv6only)(isc_socket_t *sock, isc_boolean_t yes); isc_result_t (*fdwatchpoke)(isc_socket_t *sock, int flags); + isc_result_t (*dup)(isc_socket_t *socket, + isc_socket_t **socketp); + int (*getfd)(isc_socket_t *socket); } isc_socketmethods_t; /*% @@ -451,6 +454,12 @@ isc_socket_create(isc_socketmgr_t *manager, *\li #ISC_R_UNEXPECTED */ +isc_result_t +isc_socket_dup(isc_socket_t *sock0, isc_socket_t **socketp); +/*%< + * Duplicate an existing socket, reusing its file descriptor. + */ + void isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how); @@ -1104,6 +1113,11 @@ void *isc_socket_gettag(isc_socket_t *socket); * Get the tag associated with a socket, if any. */ +int isc_socket_getfd(isc_socket_t *socket); +/*%< + * Get the file descriptor associated with a socket + */ + void isc__socketmgr_setreserved(isc_socketmgr_t *mgr, isc_uint32_t); /*%< diff --git a/external/bsd/bind/dist/lib/isc/include/isc/task.h b/external/bsd/bind/dist/lib/isc/include/isc/task.h index 6b9693697ed..78ec8f236ec 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/task.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/task.h @@ -1,4 +1,4 @@ -/* $NetBSD: task.h,v 1.3 2011/07/05 21:59:19 spz Exp $ */ +/* $NetBSD: task.h,v 1.4 2011/09/11 18:55:41 christos Exp $ */ /* * Copyright (C) 2004-2007, 2009-2011 Internet Systems Consortium, Inc. ("ISC") @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: task.h,v 1.69.14.1.2.1 2011-06-02 23:47:36 tbox Exp */ +/* Id: task.h,v 1.71 2011-02-03 12:18:12 tbox Exp */ #ifndef ISC_TASK_H #define ISC_TASK_H 1 diff --git a/external/bsd/bind/dist/lib/isc/include/isc/taskpool.h b/external/bsd/bind/dist/lib/isc/include/isc/taskpool.h index 6a9e70482b3..063dd8110a6 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/taskpool.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/taskpool.h @@ -1,7 +1,7 @@ -/* $NetBSD: taskpool.h,v 1.2 2011/02/16 03:47:13 christos Exp $ */ +/* $NetBSD: taskpool.h,v 1.3 2011/09/11 18:55:42 christos Exp $ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: taskpool.h,v 1.15 2007-06-19 23:47:18 tbox Exp */ +/* Id: taskpool.h,v 1.17 2011-07-07 23:47:50 tbox Exp */ #ifndef ISC_TASKPOOL_H #define ISC_TASKPOOL_H 1 @@ -85,11 +85,50 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx, *\li #ISC_R_UNEXPECTED */ -void -isc_taskpool_gettask(isc_taskpool_t *pool, unsigned int hash, - isc_task_t **targetp); +void +isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp); +/*%< + * Attach to a task from the pool. Currently the next task is chosen + * from the pool at random. (This may be changed in the future to + * something that guaratees balance.) + */ + +int +isc_taskpool_size(isc_taskpool_t *pool); +/*%< + * Returns the number of tasks in the task pool 'pool'. + */ + +isc_result_t +isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size, + isc_taskpool_t **targetp); + /*%< - * Attach to the task corresponding to the hash value "hash". + * If 'size' is larger than the number of tasks in the pool pointed to by + * 'sourcep', then a new taskpool of size 'size' is allocated, the existing + * tasks from are moved into it, additional tasks are created to bring the + * total number up to 'size', and the resulting pool is attached to + * 'targetp'. + * + * If 'size' is less than or equal to the tasks in pool 'source', then + * 'sourcep' is attached to 'targetp' without any other action being taken. + * + * In either case, 'sourcep' is detached. + * + * Requires: + * + * \li 'sourcep' is not NULL and '*source' is not NULL + * \li 'targetp' is not NULL and '*source' is NULL + * + * Ensures: + * + * \li On success, '*targetp' points to a valid task pool. + * \li On success, '*sourcep' points to NULL. + * + * Returns: + * + * \li #ISC_R_SUCCESS + * \li #ISC_R_NOMEMORY */ void diff --git a/external/bsd/bind/dist/lib/isc/include/isc/util.h b/external/bsd/bind/dist/lib/isc/include/isc/util.h index 597575463e0..03ee9034b31 100644 --- a/external/bsd/bind/dist/lib/isc/include/isc/util.h +++ b/external/bsd/bind/dist/lib/isc/include/isc/util.h @@ -1,7 +1,7 @@ -/* $NetBSD: util.h,v 1.4 2011/02/16 03:47:13 christos Exp $ */ +/* $NetBSD: util.h,v 1.5 2011/09/11 18:55:42 christos Exp $ */ /* - * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2010, 2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: util.h,v 1.32 2010-01-11 23:48:37 tbox Exp */ +/* Id: util.h,v 1.34 2011-03-12 04:59:49 tbox Exp */ #ifndef ISC_UTIL_H #define ISC_UTIL_H 1 @@ -50,6 +50,11 @@ */ #define UNUSED(x) (void)&(x) +/*% + * The opposite: silent warnings about stored values which are never read. + */ +#define POST(x) (void)(x) + #define ISC_MAX(a, b) ((a) > (b) ? (a) : (b)) #define ISC_MIN(a, b) ((a) < (b) ? (a) : (b)) |
