author | mickeyl <mickeyl> | 2002-12-10 01:24:42 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-10 01:24:42 (UTC) |
commit | 448426777d9e35826898791d03b4bc71335427ff (patch) (unidiff) | |
tree | dfc55fb0b22ea22e4b873da8b4329dc31f15ad8b | |
parent | 8641065755bbb1e2ff96e7fb964d4b0cd91c65b6 (diff) | |
download | opie-448426777d9e35826898791d03b4bc71335427ff.zip opie-448426777d9e35826898791d03b4bc71335427ff.tar.gz opie-448426777d9e35826898791d03b4bc71335427ff.tar.bz2 |
towards an alpha version
-rw-r--r-- | noncore/net/wellenreiter/README | 37 | ||||
-rw-r--r-- | noncore/net/wellenreiter/config.in | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/contrib/.cvsignore | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/contrib/orinoco_hopper/.cvsignore | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/contrib/orinoco_hopper/Makefile.in | 101 | ||||
-rw-r--r-- | noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c | 118 | ||||
-rw-r--r-- | noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.o | bin | 0 -> 35856 bytes | |||
-rw-r--r-- | noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro | 11 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 307 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gui.pro | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 24 | ||||
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | 3 | ||||
-rw-r--r-- | noncore/net/wellenreiter/opie-wellenreiter.control | 2 |
13 files changed, 605 insertions, 12 deletions
diff --git a/noncore/net/wellenreiter/README b/noncore/net/wellenreiter/README new file mode 100644 index 0000000..4ed5c28 --- a/dev/null +++ b/noncore/net/wellenreiter/README | |||
@@ -0,0 +1,37 @@ | |||
1 | /*************************************************************************/ | ||
2 | /* W e l l e n r e i t e r I I */ | ||
3 | /* =============================== */ | ||
4 | /* */ | ||
5 | /* Version: Opie-ALPHA */ | ||
6 | /*************************************************************************/ | ||
7 | |||
8 | Release Notes for Opie-ALPHA Version December 2002 | ||
9 | -------------------------------------------------- | ||
10 | |||
11 | = Supported Devices = | ||
12 | |||
13 | * low-level orinoco_cs-based (including prism2 and spectrum_cs) | ||
14 | |||
15 | = Build = | ||
16 | |||
17 | To compile Wellenreiter within the Opie build environment, add the | ||
18 | following directories to $OPIEDIR/Makefile, e.g. to 'NONAPPS=' | ||
19 | |||
20 | noncore/net/wellenreiter/libwellenreiter \ | ||
21 | noncore/net/wellenreiter/daemon \ | ||
22 | noncore/net/wellenreiter/contrib/orinoco_hopper \ | ||
23 | noncore/net/wellenreiter/gui | ||
24 | |||
25 | ./configure and rebuild. | ||
26 | |||
27 | = Run = | ||
28 | |||
29 | 1. Place card in monitor mode: iwpriv <interface> 2 1 | ||
30 | 2. Start $OPIEDIR/bin/orinoco_hopper <interface> | ||
31 | 3. Start Wellenreiter | ||
32 | |||
33 | = Credits = | ||
34 | |||
35 | Sniffer: Max Moser <max@remote-exploit.org> | ||
36 | Communication and Protocol: Martin J. Muench <mjm@remote-exploit.org> | ||
37 | GUI: Michael Lauer <mickeyl@handhelds.org> | ||
diff --git a/noncore/net/wellenreiter/config.in b/noncore/net/wellenreiter/config.in index d6b48d8..3c33b68 100644 --- a/noncore/net/wellenreiter/config.in +++ b/noncore/net/wellenreiter/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # config #WELLENREITER | 1 | # config WELLENREITER |
2 | # boolean "wellenreiter" | 2 | # boolean "wellenreiter" |
3 | # default "y" | 3 | # default "y" |
4 | # depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | # depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LIBPCAP |
diff --git a/noncore/net/wellenreiter/contrib/.cvsignore b/noncore/net/wellenreiter/contrib/.cvsignore new file mode 100644 index 0000000..0e45b67 --- a/dev/null +++ b/noncore/net/wellenreiter/contrib/.cvsignore | |||
@@ -0,0 +1,4 @@ | |||
1 | *.o | ||
2 | *~ | ||
3 | moc_* | ||
4 | Makefile.* | ||
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/.cvsignore b/noncore/net/wellenreiter/contrib/orinoco_hopper/.cvsignore new file mode 100644 index 0000000..0e45b67 --- a/dev/null +++ b/noncore/net/wellenreiter/contrib/orinoco_hopper/.cvsignore | |||
@@ -0,0 +1,4 @@ | |||
1 | *.o | ||
2 | *~ | ||
3 | moc_* | ||
4 | Makefile.* | ||
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/Makefile.in b/noncore/net/wellenreiter/contrib/orinoco_hopper/Makefile.in new file mode 100644 index 0000000..c542a59 --- a/dev/null +++ b/noncore/net/wellenreiter/contrib/orinoco_hopper/Makefile.in | |||
@@ -0,0 +1,101 @@ | |||
1 | ############################################################################# | ||
2 | |||
3 | ####### Compiler, tools and options | ||
4 | |||
5 | CXX =$(SYSCONF_CXX) $(QT_CXX_MT) | ||
6 | CXXFLAGS=$(SYSCONF_CXXFLAGS) | ||
7 | CC =$(SYSCONF_CC) $(QT_C_MT) | ||
8 | CFLAGS =$(SYSCONF_CFLAGS) | ||
9 | INCPATH = | ||
10 | LFLAGS =$(SYSCONF_LFLAGS) $(QT_LFLAGS_MT) | ||
11 | LIBS =$(SUBLIBS) $(SYSCONF_LIBS) $(SYSCONF_LIBS_QTAPP) | ||
12 | MOC =$(SYSCONF_MOC) | ||
13 | UIC =$(SYSCONF_UIC) | ||
14 | |||
15 | ####### Target | ||
16 | |||
17 | DESTDIR = $(OPIEDIR)/bin/ | ||
18 | VER_MAJ = 1 | ||
19 | VER_MIN = 0 | ||
20 | VER_PATCH = 0 | ||
21 | TARGET= orinoco_hopper | ||
22 | TARGET1 = lib$(TARGET).so.$(VER_MAJ) | ||
23 | |||
24 | ####### Files | ||
25 | |||
26 | HEADERS = | ||
27 | SOURCES =orinoco_hopper.c | ||
28 | OBJECTS =orinoco_hopper.o | ||
29 | INTERFACES = | ||
30 | UICDECLS = | ||
31 | UICIMPLS = | ||
32 | SRCMOC = | ||
33 | OBJMOC = | ||
34 | |||
35 | |||
36 | ####### Implicit rules | ||
37 | |||
38 | .SUFFIXES: .cpp .cxx .cc .C .c | ||
39 | |||
40 | .cpp.o: | ||
41 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
42 | |||
43 | .cxx.o: | ||
44 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
45 | |||
46 | .cc.o: | ||
47 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
48 | |||
49 | .C.o: | ||
50 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
51 | |||
52 | .c.o: | ||
53 | $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | ||
54 | |||
55 | ####### Build rules | ||
56 | |||
57 | |||
58 | all: $(DESTDIR)$(TARGET) | ||
59 | |||
60 | $(DESTDIR)$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) | ||
61 | $(SYSCONF_LINK) $(LFLAGS) -o $(DESTDIR)$(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | ||
62 | |||
63 | moc: $(SRCMOC) | ||
64 | |||
65 | tmake: | ||
66 | tmake orinoco_hopper.pro | ||
67 | |||
68 | clean: | ||
69 | -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) | ||
70 | -rm -f *~ core | ||
71 | -rm -f allmoc.cpp | ||
72 | |||
73 | ####### Extension Modules | ||
74 | |||
75 | listpromodules: | ||
76 | @echo | ||
77 | |||
78 | listallmodules: | ||
79 | @echo | ||
80 | |||
81 | listaddonpromodules: | ||
82 | @echo | ||
83 | |||
84 | listaddonentmodules: | ||
85 | @echo | ||
86 | |||
87 | |||
88 | REQUIRES= | ||
89 | |||
90 | ####### Sub-libraries | ||
91 | |||
92 | |||
93 | ###### Combined headers | ||
94 | |||
95 | |||
96 | |||
97 | ####### Compile | ||
98 | |||
99 | orinoco_hopper.o: orinoco_hopper.c | ||
100 | |||
101 | |||
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c new file mode 100644 index 0000000..78f0299 --- a/dev/null +++ b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* orinoco_hopper.c | ||
2 | * orinoco wireless nic channel scanning utility | ||
3 | * | ||
4 | * By Snax <snax@shmoo.com> | ||
5 | * Copyright (c) 2002 Snax | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * For a copy of the GNU General Public License write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #include <stdio.h> | ||
22 | #include <stdlib.h> | ||
23 | #include <sys/time.h> | ||
24 | #include <signal.h> | ||
25 | #include <string.h> | ||
26 | #include <sys/ioctl.h> | ||
27 | #include <sys/socket.h> | ||
28 | #include <linux/wireless.h> | ||
29 | #include <unistd.h> | ||
30 | #include <getopt.h> | ||
31 | |||
32 | #ifndef SIOCIWFIRSTPRIV | ||
33 | #define SIOCIWFIRSTPRIV SIOCDEVPRIVATE | ||
34 | #endif | ||
35 | |||
36 | void changeChannel(int); | ||
37 | int setChannel( unsigned char channel ); | ||
38 | |||
39 | int max = 11; | ||
40 | int mode = 2; | ||
41 | char dev[32]; | ||
42 | |||
43 | void changeChannel(int x) { | ||
44 | static int chan = 0; | ||
45 | chan = (chan % max) + 1; | ||
46 | setChannel(chan); | ||
47 | } | ||
48 | |||
49 | int setChannel( unsigned char channel ) | ||
50 | { | ||
51 | int result = 0; | ||
52 | int fd; | ||
53 | struct iwreq ireq; //for Orinoco | ||
54 | int *ptr; | ||
55 | |||
56 | /* get a socket */ | ||
57 | fd = socket(AF_INET, SOCK_STREAM, 0); | ||
58 | |||
59 | if ( fd == -1 ) { | ||
60 | return -1; | ||
61 | } | ||
62 | ptr = (int *) ireq.u.name; | ||
63 | ptr[0] = mode; | ||
64 | ptr[1] = channel; | ||
65 | strcpy(ireq.ifr_ifrn.ifrn_name, dev); | ||
66 | result = ioctl( fd, SIOCIWFIRSTPRIV + 0x8, &ireq); | ||
67 | close(fd); | ||
68 | return result; | ||
69 | } | ||
70 | |||
71 | void usage(char *cmd) { | ||
72 | fprintf(stderr, | ||
73 | "Usage: %s <iface> [-p] [-i <interval millisec>] [-n]\n -n = international channels\n -p = keep prism headers\n", cmd); | ||
74 | exit(1); | ||
75 | } | ||
76 | |||
77 | int main (int argc, char *argv[]) | ||
78 | { | ||
79 | struct itimerval tval; | ||
80 | int ms, r; | ||
81 | |||
82 | //this will be the channel scanning interval, currently 0.2 sec | ||
83 | struct timeval interval = {0, 200000}; | ||
84 | |||
85 | if (argc < 2) usage(argv[0]); | ||
86 | strncpy(dev, argv[1], 32); | ||
87 | dev[31] = 0; | ||
88 | |||
89 | while (1) { | ||
90 | r = getopt(argc,argv,"i:np"); | ||
91 | if (r < 0) break; | ||
92 | switch (r) { | ||
93 | case 'n': | ||
94 | max = 14; | ||
95 | break; | ||
96 | case 'p': | ||
97 | mode = 1; | ||
98 | break; | ||
99 | case 'i': | ||
100 | ms = atoi(optarg); | ||
101 | interval.tv_sec = ms / 1000; | ||
102 | interval.tv_usec = (ms % 1000) * 1000; | ||
103 | break; | ||
104 | default: | ||
105 | usage(argv[0]); | ||
106 | } | ||
107 | } | ||
108 | |||
109 | //this sets up the kchannel scanning stuff | ||
110 | signal(SIGALRM, changeChannel); | ||
111 | tval.it_interval = interval; | ||
112 | tval.it_value = interval; | ||
113 | setitimer(ITIMER_REAL, &tval, NULL); | ||
114 | while (1) pause(); | ||
115 | |||
116 | return 0; | ||
117 | } | ||
118 | |||
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.o b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.o new file mode 100644 index 0000000..dd90c62 --- a/dev/null +++ b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.o | |||
Binary files differ | |||
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro new file mode 100644 index 0000000..a85520c --- a/dev/null +++ b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro | |||
@@ -0,0 +1,11 @@ | |||
1 | DESTDIR = $(OPIEDIR)/bin | ||
2 | TEMPLATE = app | ||
3 | CONFIG = warn_on debug | ||
4 | #CONFIG = warn_on release | ||
5 | HEADERS = | ||
6 | SOURCES = orinoco_hopper.c | ||
7 | INCLUDEPATH += | ||
8 | DEPENDPATH += | ||
9 | LIBS += | ||
10 | INTERFACES = | ||
11 | TARGET = orinoco_hopper | ||
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui new file mode 100644 index 0000000..8f38252 --- a/dev/null +++ b/noncore/net/wellenreiter/gui/configbase.ui | |||
@@ -0,0 +1,307 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>Form1</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>Form1</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>226</width> | ||
15 | <height>300</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Form1</string> | ||
21 | </property> | ||
22 | <vbox> | ||
23 | <property stdset="1"> | ||
24 | <name>margin</name> | ||
25 | <number>11</number> | ||
26 | </property> | ||
27 | <property stdset="1"> | ||
28 | <name>spacing</name> | ||
29 | <number>6</number> | ||
30 | </property> | ||
31 | <widget> | ||
32 | <class>QGroupBox</class> | ||
33 | <property stdset="1"> | ||
34 | <name>name</name> | ||
35 | <cstring>GroupBox1</cstring> | ||
36 | </property> | ||
37 | <property stdset="1"> | ||
38 | <name>title</name> | ||
39 | <string>Sniffer Options</string> | ||
40 | </property> | ||
41 | <grid> | ||
42 | <property stdset="1"> | ||
43 | <name>margin</name> | ||
44 | <number>11</number> | ||
45 | </property> | ||
46 | <property stdset="1"> | ||
47 | <name>spacing</name> | ||
48 | <number>6</number> | ||
49 | </property> | ||
50 | <widget row="0" column="0" > | ||
51 | <class>QLayoutWidget</class> | ||
52 | <property stdset="1"> | ||
53 | <name>name</name> | ||
54 | <cstring>Layout1</cstring> | ||
55 | </property> | ||
56 | <grid> | ||
57 | <property stdset="1"> | ||
58 | <name>margin</name> | ||
59 | <number>0</number> | ||
60 | </property> | ||
61 | <property stdset="1"> | ||
62 | <name>spacing</name> | ||
63 | <number>6</number> | ||
64 | </property> | ||
65 | <widget row="2" column="0" > | ||
66 | <class>QSpinBox</class> | ||
67 | <property stdset="1"> | ||
68 | <name>name</name> | ||
69 | <cstring>hopInterval</cstring> | ||
70 | </property> | ||
71 | <property stdset="1"> | ||
72 | <name>suffix</name> | ||
73 | <string> ms</string> | ||
74 | </property> | ||
75 | <property stdset="1"> | ||
76 | <name>maxValue</name> | ||
77 | <number>2000</number> | ||
78 | </property> | ||
79 | <property stdset="1"> | ||
80 | <name>minValue</name> | ||
81 | <number>100</number> | ||
82 | </property> | ||
83 | <property stdset="1"> | ||
84 | <name>lineStep</name> | ||
85 | <number>100</number> | ||
86 | </property> | ||
87 | </widget> | ||
88 | <widget row="2" column="1" > | ||
89 | <class>QLabel</class> | ||
90 | <property stdset="1"> | ||
91 | <name>name</name> | ||
92 | <cstring>TextLabel3</cstring> | ||
93 | </property> | ||
94 | <property stdset="1"> | ||
95 | <name>text</name> | ||
96 | <string>Hop Interval</string> | ||
97 | </property> | ||
98 | </widget> | ||
99 | <widget row="0" column="0" > | ||
100 | <class>QComboBox</class> | ||
101 | <item> | ||
102 | <property> | ||
103 | <name>text</name> | ||
104 | <string><select></string> | ||
105 | </property> | ||
106 | </item> | ||
107 | <item> | ||
108 | <property> | ||
109 | <name>text</name> | ||
110 | <string>eth0</string> | ||
111 | </property> | ||
112 | </item> | ||
113 | <item> | ||
114 | <property> | ||
115 | <name>text</name> | ||
116 | <string>eth1</string> | ||
117 | </property> | ||
118 | </item> | ||
119 | <item> | ||
120 | <property> | ||
121 | <name>text</name> | ||
122 | <string>wlan0</string> | ||
123 | </property> | ||
124 | </item> | ||
125 | <item> | ||
126 | <property> | ||
127 | <name>text</name> | ||
128 | <string>wlan1</string> | ||
129 | </property> | ||
130 | </item> | ||
131 | <item> | ||
132 | <property> | ||
133 | <name>text</name> | ||
134 | <string>wifi0</string> | ||
135 | </property> | ||
136 | </item> | ||
137 | <item> | ||
138 | <property> | ||
139 | <name>text</name> | ||
140 | <string>wifi1</string> | ||
141 | </property> | ||
142 | </item> | ||
143 | <property stdset="1"> | ||
144 | <name>name</name> | ||
145 | <cstring>interfaceName</cstring> | ||
146 | </property> | ||
147 | </widget> | ||
148 | <widget row="0" column="1" > | ||
149 | <class>QLabel</class> | ||
150 | <property stdset="1"> | ||
151 | <name>name</name> | ||
152 | <cstring>TextLabel1</cstring> | ||
153 | </property> | ||
154 | <property stdset="1"> | ||
155 | <name>text</name> | ||
156 | <string>Interface Name</string> | ||
157 | </property> | ||
158 | </widget> | ||
159 | <widget row="1" column="0" > | ||
160 | <class>QComboBox</class> | ||
161 | <item> | ||
162 | <property> | ||
163 | <name>text</name> | ||
164 | <string><select></string> | ||
165 | </property> | ||
166 | </item> | ||
167 | <item> | ||
168 | <property> | ||
169 | <name>text</name> | ||
170 | <string>cisco</string> | ||
171 | </property> | ||
172 | </item> | ||
173 | <item> | ||
174 | <property> | ||
175 | <name>text</name> | ||
176 | <string>orinoco</string> | ||
177 | </property> | ||
178 | </item> | ||
179 | <item> | ||
180 | <property> | ||
181 | <name>text</name> | ||
182 | <string>prism</string> | ||
183 | </property> | ||
184 | </item> | ||
185 | <item> | ||
186 | <property> | ||
187 | <name>text</name> | ||
188 | <string><manual></string> | ||
189 | </property> | ||
190 | </item> | ||
191 | <property stdset="1"> | ||
192 | <name>name</name> | ||
193 | <cstring>deviceType</cstring> | ||
194 | </property> | ||
195 | </widget> | ||
196 | <widget row="1" column="1" > | ||
197 | <class>QLabel</class> | ||
198 | <property stdset="1"> | ||
199 | <name>name</name> | ||
200 | <cstring>TextLabel2</cstring> | ||
201 | </property> | ||
202 | <property stdset="1"> | ||
203 | <name>text</name> | ||
204 | <string>Device Type</string> | ||
205 | </property> | ||
206 | </widget> | ||
207 | </grid> | ||
208 | </widget> | ||
209 | </grid> | ||
210 | </widget> | ||
211 | <widget> | ||
212 | <class>QGroupBox</class> | ||
213 | <property stdset="1"> | ||
214 | <name>name</name> | ||
215 | <cstring>GroupBox8</cstring> | ||
216 | </property> | ||
217 | <property stdset="1"> | ||
218 | <name>title</name> | ||
219 | <string>Advanced Options</string> | ||
220 | </property> | ||
221 | <widget> | ||
222 | <class>QCheckBox</class> | ||
223 | <property stdset="1"> | ||
224 | <name>name</name> | ||
225 | <cstring>additionalInfo</cstring> | ||
226 | </property> | ||
227 | <property stdset="1"> | ||
228 | <name>geometry</name> | ||
229 | <rect> | ||
230 | <x>11</x> | ||
231 | <y>19</y> | ||
232 | <width>147</width> | ||
233 | <height>19</height> | ||
234 | </rect> | ||
235 | </property> | ||
236 | <property stdset="1"> | ||
237 | <name>text</name> | ||
238 | <string>Gather Additional Info</string> | ||
239 | </property> | ||
240 | </widget> | ||
241 | <widget> | ||
242 | <class>QCheckBox</class> | ||
243 | <property stdset="1"> | ||
244 | <name>name</name> | ||
245 | <cstring>activeScanning</cstring> | ||
246 | </property> | ||
247 | <property stdset="1"> | ||
248 | <name>geometry</name> | ||
249 | <rect> | ||
250 | <x>11</x> | ||
251 | <y>44</y> | ||
252 | <width>175</width> | ||
253 | <height>19</height> | ||
254 | </rect> | ||
255 | </property> | ||
256 | <property stdset="1"> | ||
257 | <name>text</name> | ||
258 | <string>Active Scanning (caution!)</string> | ||
259 | </property> | ||
260 | </widget> | ||
261 | </widget> | ||
262 | <widget> | ||
263 | <class>QGroupBox</class> | ||
264 | <property stdset="1"> | ||
265 | <name>name</name> | ||
266 | <cstring>GroupBox3</cstring> | ||
267 | </property> | ||
268 | <property stdset="1"> | ||
269 | <name>title</name> | ||
270 | <string>GUI Options</string> | ||
271 | </property> | ||
272 | <vbox> | ||
273 | <property stdset="1"> | ||
274 | <name>margin</name> | ||
275 | <number>11</number> | ||
276 | </property> | ||
277 | <property stdset="1"> | ||
278 | <name>spacing</name> | ||
279 | <number>6</number> | ||
280 | </property> | ||
281 | <widget> | ||
282 | <class>QCheckBox</class> | ||
283 | <property stdset="1"> | ||
284 | <name>name</name> | ||
285 | <cstring>groupNetworks</cstring> | ||
286 | </property> | ||
287 | <property stdset="1"> | ||
288 | <name>text</name> | ||
289 | <string>Group Detected Networks</string> | ||
290 | </property> | ||
291 | </widget> | ||
292 | <widget> | ||
293 | <class>QCheckBox</class> | ||
294 | <property stdset="1"> | ||
295 | <name>name</name> | ||
296 | <cstring>enableActivity</cstring> | ||
297 | </property> | ||
298 | <property stdset="1"> | ||
299 | <name>text</name> | ||
300 | <string>Enable Activity Display</string> | ||
301 | </property> | ||
302 | </widget> | ||
303 | </vbox> | ||
304 | </widget> | ||
305 | </vbox> | ||
306 | </widget> | ||
307 | </UI> | ||
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro index 8f14bc1..a047433 100644 --- a/noncore/net/wellenreiter/gui/gui.pro +++ b/noncore/net/wellenreiter/gui/gui.pro | |||
@@ -6,6 +6,6 @@ HEADERS = wellenreiterbase.h wellenreiter.h scanlistitem.h scanlist.h lo | |||
6 | SOURCES = main.cpp wellenreiterbase.cpp wellenreiter.cpp scanlistitem.cpp scanlist.cpp logwindow.cpp hexwindow.cpp | 6 | SOURCES = main.cpp wellenreiterbase.cpp wellenreiter.cpp scanlistitem.cpp scanlist.cpp logwindow.cpp hexwindow.cpp |
7 | INCLUDEPATH += $(OPIEDIR)/include ../daemon | 7 | INCLUDEPATH += $(OPIEDIR)/include ../daemon |
8 | DEPENDPATH += $(OPIEDIR)/include ../daemon | 8 | DEPENDPATH += $(OPIEDIR)/include ../daemon |
9 | LIBS += -lqpe -lopie -lwellenreiter | 9 | LIBS += -lqpe -lopie -lwellenreiter |
10 | INTERFACES = wellenreitertemplate.ui | 10 | INTERFACES = configbase.ui |
11 | TARGET = wellenreiter | 11 | TARGET = wellenreiter |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 6d62fa8..3453d18 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -19,9 +19,11 @@ | |||
19 | 19 | ||
20 | // Standard | 20 | // Standard |
21 | 21 | ||
22 | #include <assert.h> | 22 | #include <assert.h> |
23 | #include <errno.h> | ||
23 | #include <unistd.h> | 24 | #include <unistd.h> |
25 | #include <string.h> | ||
24 | #include <sys/types.h> | 26 | #include <sys/types.h> |
25 | 27 | ||
26 | // Local | 28 | // Local |
27 | 29 | ||
@@ -130,25 +132,33 @@ bool Wellenreiter::hasMessage() | |||
130 | struct timeval tv; | 132 | struct timeval tv; |
131 | tv.tv_sec = 0; | 133 | tv.tv_sec = 0; |
132 | tv.tv_usec = 10; | 134 | tv.tv_usec = 10; |
133 | int result = select( daemon_fd+1, &rfds, NULL, NULL, &tv ); | 135 | int result = select( daemon_fd+1, &rfds, NULL, NULL, &tv ); |
134 | return FD_ISSET( daemon_fd, &rfds ); | 136 | |
137 | if ( result == 0 ) | ||
138 | { | ||
139 | return false; | ||
140 | } | ||
141 | else if ( result == -1 ) | ||
142 | { | ||
143 | qDebug( "selected returned: %s", strerror( errno ) ); | ||
144 | return false; | ||
145 | } | ||
146 | else | ||
147 | return true; //FD_ISSET( daemon_fd, &rfds ); gibbet 'eh nur einen Deskriptor | ||
135 | } | 148 | } |
136 | 149 | ||
137 | void Wellenreiter::timerEvent( QTimerEvent* e ) | 150 | void Wellenreiter::timerEvent( QTimerEvent* e ) |
138 | { | 151 | { |
139 | qDebug( "checking for message..." ); | 152 | qDebug( "checking for message..." ); |
140 | 153 | if ( hasMessage() ) | |
141 | int result = hasMessage(); | ||
142 | qDebug( "hasMessage() returned %d", result ); | ||
143 | |||
144 | if ( result ) | ||
145 | { | 154 | { |
155 | qDebug( "got message" ); | ||
146 | handleMessage(); | 156 | handleMessage(); |
147 | } | 157 | } |
148 | else | 158 | else |
149 | { | 159 | { |
150 | qDebug( "no message :(" ); | 160 | qDebug( "no message..." ); |
151 | } | 161 | } |
152 | } | 162 | } |
153 | 163 | ||
154 | void Wellenreiter::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) | 164 | void Wellenreiter::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) |
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc index 6b0fffb..84caf12 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | |||
@@ -93,9 +93,10 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack | |||
93 | pinfoptr->isvalid = 0; | 93 | pinfoptr->isvalid = 0; |
94 | return; | 94 | return; |
95 | } | 95 | } |
96 | 96 | ||
97 | 97 | printf( "cap_ESS is %d, cap_IBSS is %d\n", pinfoptr->cap_ESS, pinfoptr->cap_IBSS ); | |
98 | |||
98 | /* Here should be the infos to the gui issued */ | 99 | /* Here should be the infos to the gui issued */ |
99 | if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0) | 100 | if (pinfoptr->cap_ESS == 1 &&pinfoptr->cap_IBSS ==0) |
100 | { | 101 | { |
101 | wl_loginfo("Found an access point"); | 102 | wl_loginfo("Found an access point"); |
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control index da83359..83bfd0e 100644 --- a/noncore/net/wellenreiter/opie-wellenreiter.control +++ b/noncore/net/wellenreiter/opie-wellenreiter.control | |||
@@ -1,5 +1,5 @@ | |||
1 | Files: bin/wellenreiter bin/wellenreiterd pics/wellenreiter $QTDIR/lib/libwellenreiter.* | 1 | Files: bin/wellenreiter bin/wellenreiterd bin/orinoco_hopper pics/wellenreiter $QTDIR/lib/libwellenreiter.* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Michael Lauer <mickeyl@handhelds.org> | 4 | Maintainer: Michael Lauer <mickeyl@handhelds.org> |
5 | Architecture: arm | 5 | Architecture: arm |