summaryrefslogtreecommitdiffstats
path: root/daemon/innbbsd/daemon.h
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-20 19:33:49 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-20 19:33:49 +0800
commit6c7b18b32d87c2a835f7e5c48faac4a8ad44668b (patch)
treee88e1b2b1007f4ddcd348a4a1bf1d13c515c4564 /daemon/innbbsd/daemon.h
parentf59699c22c130373cda3cc4cb6fab5bae510bd5a (diff)
downloadpttbbs-piaip.newlayout.tar
pttbbs-piaip.newlayout.tar.gz
pttbbs-piaip.newlayout.tar.bz2
pttbbs-piaip.newlayout.tar.lz
pttbbs-piaip.newlayout.tar.xz
pttbbs-piaip.newlayout.tar.zst
pttbbs-piaip.newlayout.zip
- (internal/exp) first draft of new layoutpiaip.newlayout
git-svn-id: http://opensvn.csie.org/pttbbs/branches/piaip.newlayout@4013 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'daemon/innbbsd/daemon.h')
-rw-r--r--daemon/innbbsd/daemon.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/daemon/innbbsd/daemon.h b/daemon/innbbsd/daemon.h
new file mode 100644
index 00000000..36384a20
--- /dev/null
+++ b/daemon/innbbsd/daemon.h
@@ -0,0 +1,54 @@
+#ifndef DAEMON_H
+#define DAEMON_H
+
+#include <stdio.h>
+#include <time.h>
+
+#ifndef ARG
+#ifdef __STDC__
+#define ARG(x) x
+#else
+#define ARG(x) ()
+#endif
+#endif
+
+
+struct Argv_t {
+ FILE *in, *out;
+ int argc;
+ char **argv;
+ char *inputline;
+ struct Daemoncmd *dc;
+};
+
+typedef struct Argv_t argv_t;
+
+typedef struct Buffer_t {
+ char *data;
+ int used, left, lastread;
+} buffer_t;
+
+typedef struct ClientType {
+ char hostname[1024];
+ char username[32];
+ char buffer[4096];
+ int mode;
+ argv_t Argv;
+ int fd, access, lastread, midcheck;
+ buffer_t in, out;
+ int ihavecount, ihavesize, ihaveduplicate, ihavefail;
+ int statcount, statfail;
+ time_t begin;
+} ClientType;
+
+typedef struct Daemoncmd {
+ char *name;
+ char *usage;
+ int argc, argno, errorcode, normalcode;
+ int (*main) ARG((ClientType *));
+} daemoncmd_t;
+
+extern void installdaemon ARG((daemoncmd_t *, int, char *));
+extern ClientType *Channel;
+
+#endif