Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / rp-l2tp / libevent / eventpriv.h
blob193e1b330e3b2caa180ccff519dc801d3cc3ff87
1 /***********************************************************************
3 * eventpriv.h
5 * Abstraction of select call into "event-handling" to make programming
6 * easier. This header includes "private" definitions which users
7 * of the event-handling code should not care about.
9 * Copyright (C) 2001 Roaring Penguin Software Inc.
11 * This program may be distributed according to the terms of the GNU
12 * General Public License, version 2 or (at your option) any later version.
14 * $Id: eventpriv.h,v 1.1.48.1 2005/08/08 12:05:25 honor Exp $
16 * LIC: GPL
18 ***********************************************************************/
20 #ifndef INCLUDE_EVENTPRIV_H
21 #define INCLUDE_EVENTPRIV_H 1
22 #include <sys/time.h>
23 #include <sys/types.h>
24 #include <unistd.h>
26 /* Handler structure */
27 typedef struct EventHandler_t {
28 struct EventHandler_t *next; /* Link in list */
29 int fd; /* File descriptor for select */
30 unsigned int flags; /* Select on read or write; enable timeout */
31 struct timeval tmout; /* Absolute time for timeout */
32 EventCallbackFunc fn; /* Callback function */
33 void *data; /* Extra data to pass to callback */
34 } EventHandler;
36 /* Selector structure */
37 typedef struct EventSelector_t {
38 EventHandler *handlers; /* Linked list of EventHandlers */
39 int nestLevel; /* Event-handling nesting level */
40 int opsPending; /* True if operations are pending */
41 int destroyPending; /* If true, a destroy is pending */
42 } EventSelector;
44 /* Private flags */
45 #define EVENT_FLAG_DELETED 256
46 #endif