--- /dev/null
+/* group.h
+ * awiebe, 2008
+ */
+
+#ifndef GROUP_H
+#define GROUP_H
+
+typedef struct _group Group;
+
+struct _clink {
+ Client *c;
+ struct _clink *next, *prev, *head;
+};
+
+struct _glink {
+ Group *c;
+ struct _glink *next, *prev, *head;
+};
+
+struct _group {
+ struct _clink clients; /* clients in this group */
+ struct _glink groups; /* subgroups to this group */
+
+ int (*add)();
+ int (*remove)();
+ Group *(*create_subgroup)();
+ int (*destroy)();
+};
+#endif
--- /dev/null
+/* listener.h
+ * awiebe, 2008
+ */
+
+#ifndef LISTENER_H
+#define LISTENER_H
+
+
+typedef struct _listener aListener;
+
+struct _llink {
+ Listener *c;
+ struct _llink *next, *prev, *head;
+}
+
+struct _listener {
+ int fd; /* file descriptor of the listener */
+ u_short port; /* port of the descriptor */
+ unsigned int count; /* count of the clients connected */
+ union {
+ struct in_addr v4;
+ struct in6_addr v6;
+ } ip; /* address to bind to */
+ time_t last; /* TS of last connect */
+
+ int flags; /* flags? */
+
+ int (*qopts)(); /* function to set options */
+ int (*set_packeter)(); /* function to set packeter */
+ int (*set_parser)(); /* function to set parser */
+
+
+ char *(*packeter)(); /* the packeter */
+ int (*parser)(); /* the parser */
+
+};
+
+#endif
--- /dev/null
+/* sockeng.h
+ * awiebe, 2008
+ */
+
+#ifndef SOCKENG_H
+#define SOCKENG_H
+
+#include "client.h"
+#include "listener.h"
+#include "group.h"
+
+typedef struct _sockeng SockEng;
+
+struct _sockeng {
+
+ struct _glink *groups;
+ struct _clink *clients;
+ struct _llink *listeners;
+
+ /* functions */
+ int (*create_listener)();
+ Group *(*create_group)();
+ int (*poll)();
+};
+
+#endif