aboutsummaryrefslogtreecommitdiffstats
path: root/ARCHITECTURE.txt
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-11-06 00:46:12 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-11-06 00:46:12 +0100
commit3f83f1cab4e761316fc12e914de423466ea28fc1 (patch)
treefb896768f2720b3c4e0e2f73cbb31d2ef0873228 /ARCHITECTURE.txt
parentadd some notes (diff)
downloadglouglou-3f83f1cab4e761316fc12e914de423466ea28fc1.tar.xz
glouglou-3f83f1cab4e761316fc12e914de423466ea28fc1.zip
new architecture doc
Diffstat (limited to '')
-rw-r--r--ARCHITECTURE.txt48
1 files changed, 48 insertions, 0 deletions
diff --git a/ARCHITECTURE.txt b/ARCHITECTURE.txt
new file mode 100644
index 0000000..2948f4e
--- /dev/null
+++ b/ARCHITECTURE.txt
@@ -0,0 +1,48 @@
+===============================================================================
+2012-11-06_00-19
+
+refer to architecture.xoj for big picture
+* libglouglou
+* viz clients
+* probes (trackproc, netsniff, fwsniff)
+
+===============================================================================
+libglouglou/includes
+* protocol version
+* packet structure
+* common constants
+
+===============================================================================
+libglouglou/lib
+* client and server code
+* tools
+
+/*
+ * start a server
+ * totaly unblocking, using libevent
+ */
+struct gg_server *
+gg_server_start(char *ip, int port,
+ int (*handle_conn)(struct gg_server *s, int client_id, struct sockaddr_in *addr),
+ int (*handle_packet)(struct gg_server *s, struct gg_packet *p));
+
+int
+gg_server_send(struct gg_server *s, int client_id, void *p);
+
+void
+gg_server_stop(struct gg_server *s);
+
+/*
+ * connect to a server
+ * totaly unblocking, using libevent
+ */
+struct gg_client *
+gg_client_connect(char *ip, int port,
+ int (*handle_conn)(struct gg_client *c, struct sockaddr_in *addr),
+ int (*handle_packet)(struct gg_client *c, struct gg_packet *p));
+
+int
+gg_client_send(struct gg_client *c, void *p);
+
+void
+gg_client_disconnect(struct gg_client *c);