summaryrefslogtreecommitdiff
path: root/src/uanytun.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-12-28 02:03:57 +0000
committerChristian Pointner <equinox@anytun.org>2008-12-28 02:03:57 +0000
commit505bf00dc22351d2b276c93403cac0e370a171a3 (patch)
tree972ace1d215af07f76f82abbb0bb85b7f88f12c8 /src/uanytun.c
parentadded datatypes.h (diff)
added udp socket
Diffstat (limited to 'src/uanytun.c')
-rw-r--r--src/uanytun.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/uanytun.c b/src/uanytun.c
index 009325e..ca16446 100644
--- a/src/uanytun.c
+++ b/src/uanytun.c
@@ -40,6 +40,7 @@
#include "log.h"
#include "signal.h"
#include "tun.h"
+#include "udp.h"
#include "daemon.h"
#include "sysexec.h"
@@ -63,6 +64,13 @@ int main(int argc, char* argv[])
/* int ret = exec_script("post-up.sh", dev->actual_name_); */
/* log_printf(NOTICE, "post-up script returned %d", ret); */
+ udp_socket_t* sock;
+ udp_init(&sock, NULL, "4444");
+ if(!sock) {
+ log_printf(ERR, "error on udp_init");
+ exit(-1);
+ }
+
log_printf(INFO, "entering main loop");
u_int8_t buf[1600];
int len = 0;