diff options
author | Stef Walter <stef@memberwebs.com> | 2006-01-26 09:54:31 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-01-26 09:54:31 +0000 |
commit | 1ded2732d4c290dbff64d8091def1f70b76f6282 (patch) | |
tree | 4aa4dfa403304e9ee59cce693263ca607b36502f /src/common/server-mainloop.h | |
parent | 7fcead4473bc224bc8c6a66e2db3b3ee87f751d4 (diff) |
SNMP support coded in.
Diffstat (limited to 'src/common/server-mainloop.h')
-rw-r--r-- | src/common/server-mainloop.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/common/server-mainloop.h b/src/common/server-mainloop.h new file mode 100644 index 0000000..ceff28d --- /dev/null +++ b/src/common/server-mainloop.h @@ -0,0 +1,27 @@ + +#ifndef __SERVER_MAINLOOP_H__ +#define __SERVER_MAINLOOP_H__ + +#include <stdint.h> + +/* TODO: Prefix functions with svr */ + +#define SERVER_READ 0x01 +#define SERVER_WRITE 0x02 + +typedef void (*server_socket_callback)(int fd, int type, void* arg); +/* TODO: We should declare our own time type: 'mstime' */ +typedef int (*server_timer_callback)(uint64_t when, void* arg); + +void server_init(); +void server_uninit(); +int server_run(); +void server_stop(); +int server_stopped(); +int server_watch(int fd, int type, server_socket_callback callback, void* arg); +void server_unwatch(int fd); +int server_timer(int length, server_timer_callback callback, void* arg); +int server_oneshot(int length, server_timer_callback callback, void* arg); +uint64_t server_get_time(); + +#endif /* __SERVER_MAINLOOP_H__ */ |