mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Updates to fdwatch code to support DHCP/DDNS code, ticket rt20253.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: msgs.h,v 1.17 2008/08/08 06:28:59 tbox Exp $ */
|
||||
/* $Id: msgs.h,v 1.18 2009/10/01 01:30:01 sar Exp $ */
|
||||
|
||||
#ifndef ISC_MSGS_H
|
||||
#define ISC_MSGS_H 1
|
||||
@@ -156,7 +156,7 @@
|
||||
#define ISC_MSG_FILTER 1421 /*%< setsockopt(SO_ACCEPTFILTER): %s */
|
||||
|
||||
#define ISC_MSG_TOOMANYHANDLES 1422 /*%< %s: too many open WSA event handles: %s */
|
||||
|
||||
#define ISC_MSG_POKED 1423 /*%< "poked flags: %d" */
|
||||
|
||||
#define ISC_MSG_AWAKE 1502 /*%< "awake" */
|
||||
#define ISC_MSG_WORKING 1503 /*%< "working" */
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: namespace.h,v 1.4 2009/09/02 23:48:03 tbox Exp $ */
|
||||
/* $Id: namespace.h,v 1.5 2009/10/01 01:30:01 sar Exp $ */
|
||||
|
||||
#ifndef ISCAPI_NAMESPACE_H
|
||||
#define ISCAPI_NAMESPACE_H 1
|
||||
@@ -109,7 +109,6 @@
|
||||
#define isc_socket_listen isc__socket_listen
|
||||
#define isc_socket_accept isc__socket_accept
|
||||
#define isc_socket_connect isc__socket_connect
|
||||
#define isc_socket_fdwatchcreate isc__socket_fdwatchcreate
|
||||
#define isc_socket_getname isc__socket_getname
|
||||
#define isc_socket_gettag isc__socket_gettag
|
||||
#define isc_socket_getpeername isc__socket_getpeername
|
||||
@@ -123,6 +122,8 @@
|
||||
#define isc_socketmgr_setstats isc__socketmgr_setstats
|
||||
#define isc_socketmgr_setreserved isc__socketmgr_setreserved
|
||||
#define isc__socketmgr_maxudp isc___socketmgr_maxudp
|
||||
#define isc_socket_fdwatchcreate isc__socket_fdwatchcreate
|
||||
#define isc_socket_fdwatchpoke isc__socket_fdwatchpoke
|
||||
|
||||
#define isc_task_create isc__task_create
|
||||
#define isc_task_attach isc__task_attach
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.h,v 1.93 2009/09/02 23:43:54 each Exp $ */
|
||||
/* $Id: socket.h,v 1.94 2009/10/01 01:30:01 sar Exp $ */
|
||||
|
||||
#ifndef ISC_SOCKET_H
|
||||
#define ISC_SOCKET_H 1
|
||||
@@ -266,6 +266,11 @@ typedef struct isc_socketmgrmethods {
|
||||
isc_result_t (*socketcreate)(isc_socketmgr_t *manager, int pf,
|
||||
isc_sockettype_t type,
|
||||
isc_socket_t **socketp);
|
||||
isc_result_t (*fdwatchcreate)(isc_socketmgr_t *manager, int fd,
|
||||
int flags,
|
||||
isc_sockfdwatch_t callback,
|
||||
void *cbarg, isc_task_t *task,
|
||||
isc_socket_t **socketp);
|
||||
} isc_socketmgrmethods_t;
|
||||
|
||||
typedef struct isc_socketmethods {
|
||||
@@ -290,6 +295,7 @@ typedef struct isc_socketmethods {
|
||||
isc_sockaddr_t *addressp);
|
||||
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_socketmethods_t;
|
||||
|
||||
/*%
|
||||
@@ -379,6 +385,35 @@ isc_socket_fdwatchcreate(isc_socketmgr_t *manager,
|
||||
*\li #ISC_R_UNEXPECTED
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
isc_socket_fdwatchpoke(isc_socket_t *sock,
|
||||
int flags);
|
||||
/*%<
|
||||
* Poke a file descriptor watch socket informing the manager that it
|
||||
* should restart watching the socket
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
*\li 'sock' is the socket returned by isc_socket_fdwatchcreate
|
||||
*
|
||||
*\li 'flags' indicates what the manager should watch for on the socket
|
||||
* in addition to what it may already be watching. It can be one or
|
||||
* both of ISC_SOCKFDWATCH_READ and ISC_SOCKFDWATCH_WRITE. To
|
||||
* temporarily disable watching on a socket the value indicating
|
||||
* no more data should be returned from the call back routine.
|
||||
*
|
||||
*\li This function is not available on Windows.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
*\li 'sock' is a valid isc socket
|
||||
*
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
isc_socket_create(isc_socketmgr_t *manager,
|
||||
int pf,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: types.h,v 1.50 2009/09/01 18:40:25 jinmei Exp $ */
|
||||
/* $Id: types.h,v 1.51 2009/10/01 01:30:01 sar Exp $ */
|
||||
|
||||
#ifndef ISC_TYPES_H
|
||||
#define ISC_TYPES_H 1
|
||||
@@ -98,7 +98,7 @@ typedef struct isc_timer isc_timer_t; /*%< Timer */
|
||||
typedef struct isc_timermgr isc_timermgr_t; /*%< Timer Manager */
|
||||
|
||||
typedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
|
||||
typedef int (*isc_sockfdwatch_t)(isc_task_t *, isc_socket_t *, void *);
|
||||
typedef int (*isc_sockfdwatch_t)(isc_task_t *, isc_socket_t *, void *, int);
|
||||
|
||||
/* The following cannot be listed alphabetically due to forward reference */
|
||||
typedef isc_result_t (isc_httpdaction_t)(const char *url,
|
||||
|
Reference in New Issue
Block a user