aboutsummaryrefslogtreecommitdiffstats
path: root/libglouglou/libglouglou.h
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-11-26 23:16:22 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-11-26 23:16:22 +0100
commit234daed1807eff0e9d383ee601334f40dcc35851 (patch)
tree44d581504f093426e88a2180632efa0c12b3c4d6 /libglouglou/libglouglou.h
parentupdate to new architecture (diff)
downloadglouglou-234daed1807eff0e9d383ee601334f40dcc35851.tar.xz
glouglou-234daed1807eff0e9d383ee601334f40dcc35851.zip
add skeleton from ARCHITECTURE.txt
Diffstat (limited to 'libglouglou/libglouglou.h')
-rw-r--r--libglouglou/libglouglou.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglouglou/libglouglou.h b/libglouglou/libglouglou.h
index 62d601c..4906bab 100644
--- a/libglouglou/libglouglou.h
+++ b/libglouglou/libglouglou.h
@@ -48,3 +48,16 @@ struct packet {
#define name_fqdn pdat.name.fqdn
};
+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,
+ struct gg_packet *p);
+void gg_server_stop(struct gg_server *s);
+
+struct gg_client *gg_client_connect(char *ip, int port,
+ int (*handle_conn)(struct gg_client *c, int status),
+ int (*handle_packet)(struct gg_client *c,
+ struct gg_packet *p));
+int gg_client_send(struct gg_client *c, struct gg_packet *p);
+void gg_client_disconnect(struct gg_client *c);