version 1.1.2.4, 2010/10/27 15:23:49
|
version 1.1.2.7, 2010/10/27 16:45:35
|
Line 5
|
Line 5
|
sl_config cfg; |
sl_config cfg; |
int Verbose, Kill, nif; |
int Verbose, Kill, nif; |
char **ifs, szConfig[MAXPATHLEN] = DWDS_CONFIG; |
char **ifs, szConfig[MAXPATHLEN] = DWDS_CONFIG; |
struct dwds_if *wds; |
|
extern char compiled[], compiledby[], compilehost[]; |
extern char compiled[], compiledby[], compilehost[]; |
|
|
|
|
Line 54 sigHandler(int sig)
|
Line 53 sigHandler(int sig)
|
} |
} |
|
|
static int |
static int |
RtMsg(struct rt_msghdr *msg, size_t len) | RtMsg(struct dwds_if *wds, struct rt_msghdr *msg, size_t len) |
{ |
{ |
return 0; |
return 0; |
} |
} |
Line 69 main(int argc, char **argv)
|
Line 68 main(int argc, char **argv)
|
int s; |
int s; |
struct sigaction sa; |
struct sigaction sa; |
size_t len; |
size_t len; |
|
struct dwds_if *wds = NULL; |
|
|
while ((ch = getopt(argc, argv, "hvfc:")) != -1) |
while ((ch = getopt(argc, argv, "hvfc:")) != -1) |
switch (ch) { |
switch (ch) { |
Line 101 main(int argc, char **argv)
|
Line 101 main(int argc, char **argv)
|
return 1; |
return 1; |
} |
} |
|
|
if (fg) | if (!fg) |
switch (fork()) { |
switch (fork()) { |
case -1: |
case -1: |
printf("Error:: when fork() #%d - %s\n", errno, strerror(errno)); |
printf("Error:: when fork() #%d - %s\n", errno, strerror(errno)); |
Line 134 main(int argc, char **argv)
|
Line 134 main(int argc, char **argv)
|
goto end; |
goto end; |
} |
} |
|
|
|
if (!(wds = wifi_buildWDS(s, ifs, nif))) { |
|
syslog(LOG_ERR, "Error:: Go to dead ...\n"); |
|
goto end; |
|
} |
|
|
while (!Kill) { |
while (!Kill) { |
len = read(s, (void*) msg, sizeof msg); |
len = read(s, (void*) msg, sizeof msg); |
if (len == -1) { |
if (len == -1) { |
syslog(LOG_ERR, "Error:: read() #%d - %s\n", errno, strerror(errno)); |
syslog(LOG_ERR, "Error:: read() #%d - %s\n", errno, strerror(errno)); |
Kill++; |
Kill++; |
} else |
} else |
RtMsg((struct rt_msghdr*) msg, len); | RtMsg(wds, (struct rt_msghdr*) msg, len); |
} |
} |
|
|
close(s); |
close(s); |