summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/daemon/source/daemon.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/daemon.cc b/noncore/net/wellenreiter/daemon/source/daemon.cc
index 4407436..5cf4e97 100644
--- a/noncore/net/wellenreiter/daemon/source/daemon.cc
+++ b/noncore/net/wellenreiter/daemon/source/daemon.cc
@@ -42,3 +42,5 @@ int main(int argc, char **argv)
42 42
43 if(!card_into_monitormode(&handletopcap, cardtype.iface, cardtype.type)) 43 /* set card into monitor mode */
44 if(!card_into_monitormode(&handletopcap, cardtype.iface,
45 cardtype.type))
44 { 46 {
@@ -49,5 +51,5 @@ int main(int argc, char **argv)
49 51
50 52 /* setup pcap */
51 /////// following line will be moved to lib as soon as possible //////////// 53 if((handletopcap = pcap_open_live(cardtype.iface,
52 if((handletopcap = pcap_open_live(cardtype.iface, BUFSIZ, 1, 0, NULL)) == NULL) 54 BUFSIZ, 1, 0, NULL)) == NULL)
53 { 55 {
@@ -60,4 +62,2 @@ int main(int argc, char **argv)
60#endif 62#endif
61 ////////////////////////////////////////
62
63 63
@@ -72,3 +72,4 @@ int main(int argc, char **argv)
72 /* Create channelswitching thread */ 72 /* Create channelswitching thread */
73 if(pthread_create(&sub, NULL, channel_switcher, (void *)&cardtype) != 0) 73 if(pthread_create(&sub, NULL, channel_switcher,
74 (void *)&cardtype) != 0)
74 { 75 {
@@ -97,4 +98,5 @@ int main(int argc, char **argv)
97 98
98 /* socket or pcap handle bigger? Will be cleaned up, have to check pcap */ 99 /* maxfd = biggest filefd */
99 maxfd = (sock > pcap_fileno(handletopcap) ? sock + 1: pcap_fileno(handletopcap)) + 1; 100 maxfd = (sock > pcap_fileno(handletopcap) ?
101 sock + 1 : pcap_fileno(handletopcap)) + 1;
100 102
@@ -150,3 +152,4 @@ int main(int argc, char **argv)
150 152
151void usage(void) 153void
154usage(void)
152{ 155{