--- embedtools/src/dwds.c 2010/10/27 16:35:54 1.1.2.5 +++ embedtools/src/dwds.c 2010/10/27 16:39:47 1.1.2.6 @@ -53,10 +53,8 @@ sigHandler(int sig) } static int -RtMsg(struct rt_msghdr *msg, size_t len) +RtMsg(struct dwds_if *wds, struct rt_msghdr *msg, size_t len) { - struct dwds_if *wds = NULL; - return 0; } @@ -70,6 +68,7 @@ main(int argc, char **argv) int s; struct sigaction sa; size_t len; + struct dwds_if *wds = NULL; while ((ch = getopt(argc, argv, "hvfc:")) != -1) switch (ch) { @@ -135,13 +134,16 @@ main(int argc, char **argv) goto end; } + if (!(wds = wifi_buildWDS(s, ifs, nif))) + goto end; + while (!Kill) { len = read(s, (void*) msg, sizeof msg); if (len == -1) { syslog(LOG_ERR, "Error:: read() #%d - %s\n", errno, strerror(errno)); Kill++; } else - RtMsg((struct rt_msghdr*) msg, len); + RtMsg(wds, (struct rt_msghdr*) msg, len); } close(s);