summaryrefslogtreecommitdiff
Diffstat
-rwxr-xr-xAndroid.mk39
-rw-r--r--README90
-rwxr-xr-xSERVPOET18
-rwxr-xr-xconfigs/firewall-masq71
-rwxr-xr-xconfigs/firewall-standalone34
-rwxr-xr-xconfigs/pap-secrets10
-rwxr-xr-xconfigs/pppoe-server-options6
-rwxr-xr-xconfigs/pppoe.conf140
-rwxr-xr-xdoc/CHANGES339
-rwxr-xr-xdoc/HOW-TO-CONNECT268
-rwxr-xr-xdoc/KERNEL-MODE-PPPOE98
-rwxr-xr-xdoc/LICENSE341
-rwxr-xr-xdoc/PROBLEMS5
-rwxr-xr-xman/pppoe-connect.866
-rwxr-xr-xman/pppoe-relay.8124
-rwxr-xr-xman/pppoe-server.8184
-rwxr-xr-xman/pppoe-setup.823
-rwxr-xr-xman/pppoe-sniff.877
-rwxr-xr-xman/pppoe-start.827
-rwxr-xr-xman/pppoe-status.825
-rwxr-xr-xman/pppoe-stop.821
-rwxr-xr-xman/pppoe.8236
-rwxr-xr-xman/pppoe.conf.5167
-rw-r--r--pstart3
-rw-r--r--pstop21
-rwxr-xr-xscripts/pppoe-connect319
-rwxr-xr-xscripts/pppoe-connect.in319
-rwxr-xr-xscripts/pppoe-init66
-rwxr-xr-xscripts/pppoe-init-suse64
-rwxr-xr-xscripts/pppoe-init-suse.in64
-rwxr-xr-xscripts/pppoe-init-turbolinux64
-rwxr-xr-xscripts/pppoe-init-turbolinux.in64
-rwxr-xr-xscripts/pppoe-init.in66
-rwxr-xr-xscripts/pppoe-setup352
-rwxr-xr-xscripts/pppoe-setup.in352
-rwxr-xr-xscripts/pppoe-start196
-rwxr-xr-xscripts/pppoe-start.in196
-rwxr-xr-xscripts/pppoe-status84
-rwxr-xr-xscripts/pppoe-stop96
-rwxr-xr-xscripts/pppoe-stop.in96
-rwxr-xr-xsrc/common.c651
-rwxr-xr-xsrc/config.h146
-rwxr-xr-xsrc/debug.c152
-rwxr-xr-xsrc/discovery.c736
-rwxr-xr-xsrc/if.c352
-rwxr-xr-xsrc/libevent/Makefile42
-rwxr-xr-xsrc/libevent/Makefile.in42
-rwxr-xr-xsrc/libevent/event.c645
-rwxr-xr-xsrc/libevent/event.h114
-rwxr-xr-xsrc/libevent/event_sig.c265
-rwxr-xr-xsrc/libevent/event_tcp.c577
-rwxr-xr-xsrc/libevent/event_tcp.h87
-rwxr-xr-xsrc/libevent/eventpriv.h46
-rwxr-xr-xsrc/libevent/hash.c266
-rwxr-xr-xsrc/libevent/hash.h54
-rwxr-xr-xsrc/md5.c249
-rwxr-xr-xsrc/md5.h34
-rwxr-xr-xsrc/plugin.c469
-rwxr-xr-xsrc/ppp.c262
-rwxr-xr-xsrc/pppoe-server.c2137
-rwxr-xr-xsrc/pppoe-server.h156
-rwxr-xr-xsrc/pppoe-sniff.c266
-rwxr-xr-xsrc/pppoe.c959
-rwxr-xr-xsrc/pppoe.h347
-rwxr-xr-xsrc/relay.c1559
-rwxr-xr-xsrc/relay.h99
66 files changed, 15542 insertions, 1 deletions
diff --git a/src/libevent/event.h b/src/libevent/event.h
new file mode 100755
index 0000000..fad5b95
--- a/dev/null
+++ b/src/libevent/event.h
@@ -0,0 +1,114 @@
+/***********************************************************************
+*
+* event.h
+*
+* Abstraction of select call into "event-handling" to make programming
+* easier.
+*
+* Copyright (C) 2001 Roaring Penguin Software Inc.
+*
+* This program may be distributed according to the terms of the GNU
+* General Public License, version 2 or (at your option) any later version.
+*
+* $Id$
+*
+* LIC: GPL
+*
+***********************************************************************/
+
+#define DEBUG_EVENT
+
+#ifndef INCLUDE_EVENT_H
+#define INCLUDE_EVENT_H 1
+
+/* Solaris moans if we don't do this... */
+#ifdef __sun
+#define __EXTENSIONS__ 1
+#endif
+
+struct EventSelector_t;
+
+/* Callback function */
+typedef void (*EventCallbackFunc)(struct EventSelector_t *es,
+ int fd, unsigned int flags,
+ void *data);
+
+#include "eventpriv.h"
+
+/* Create an event selector */
+extern EventSelector *Event_CreateSelector(void);
+
+/* Destroy the event selector */
+extern void Event_DestroySelector(EventSelector *es);
+
+/* Handle one event */
+extern int Event_HandleEvent(EventSelector *es);
+
+/* Add a handler for a ready file descriptor */
+extern EventHandler *Event_AddHandler(EventSelector *es,
+ int fd,
+ unsigned int flags,
+ EventCallbackFunc fn, void *data);
+
+/* Add a handler for a ready file descriptor with associated timeout*/
+extern EventHandler *Event_AddHandlerWithTimeout(EventSelector *es,
+ int fd,
+ unsigned int flags,
+ struct timeval t,
+ EventCallbackFunc fn,
+ void *data);
+
+
+/* Add a timer handler */
+extern EventHandler *Event_AddTimerHandler(EventSelector *es,
+ struct timeval t,
+ EventCallbackFunc fn,
+ void *data);
+
+/* Change the timeout of a timer handler */
+void Event_ChangeTimeout(EventHandler *handler, struct timeval t);
+
+/* Delete a handler */
+extern int Event_DelHandler(EventSelector *es,
+ EventHandler *eh);
+
+/* Retrieve callback function from a handler */
+extern EventCallbackFunc Event_GetCallback(EventHandler *eh);
+
+/* Retrieve data field from a handler */
+extern void *Event_GetData(EventHandler *eh);
+
+/* Set callback and data to new values */
+extern void Event_SetCallbackAndData(EventHandler *eh,
+ EventCallbackFunc fn,
+ void *data);
+
+/* Handle a signal synchronously in event loop */
+int Event_HandleSignal(EventSelector *es, int sig, void (*handler)(int sig));
+
+/* Reap children synchronously in event loop */
+int Event_HandleChildExit(EventSelector *es, pid_t pid,
+ void (*handler)(pid_t, int, void *), void *data);
+
+extern int Event_EnableDebugging(char const *fname);
+
+#ifdef DEBUG_EVENT
+extern void Event_DebugMsg(char const *fmt, ...);
+#define EVENT_DEBUG(x) Event_DebugMsg x
+#else
+#define EVENT_DEBUG(x) ((void) 0)
+#endif
+
+/* Flags */
+#define EVENT_FLAG_READABLE 1
+#define EVENT_FLAG_WRITEABLE 2
+#define EVENT_FLAG_WRITABLE EVENT_FLAG_WRITEABLE
+
+/* This is strictly a timer event */
+#define EVENT_FLAG_TIMER 4
+
+/* This is a read or write event with an associated timeout */
+#define EVENT_FLAG_TIMEOUT 8
+
+#define EVENT_TIMER_BITS (EVENT_FLAG_TIMER | EVENT_FLAG_TIMEOUT)
+#endif