From 505bf00dc22351d2b276c93403cac0e370a171a3 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 28 Dec 2008 02:03:57 +0000 Subject: added udp socket --- src/uanytun.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/uanytun.c') 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; -- cgit v1.2.3