fix date formatting in mail messages (thanks Marcus for reporting)
[openwrt.git] / package / kismet / patches / 100-cleanup.patch
1 diff -urN kismet.old/Makefile.in kismet.dev/Makefile.in
2 --- kismet.old/Makefile.in 2005-07-25 16:19:44.000000000 +0200
3 +++ kismet.dev/Makefile.in 2005-08-15 00:16:38.100369736 +0200
4 @@ -39,26 +39,26 @@
5 DEPEND = .depend
6
7 # Objects
8 -PSO = util.o ringbuf.o configfile.o speech.o ifcontrol.o iwcontrol.o packet.o \
9 - pcapsource.o prism2source.o wtapfilesource.o wsp100source.o \
10 - dronesource.o vihasource.o packetsourcetracker.o kis_packsources.o \
11 - wtapdump.o wtaplocaldump.o gpsdump.o airsnortdump.o fifodump.o \
12 - gpsd.o manuf.o \
13 +PSO = util.o ringbuf.o configfile.o ifcontrol.o iwcontrol.o packet.o \
14 + pcapsource.o \
15 + dronesource.o packetsourcetracker.o kis_packsources.o \
16 + wtaplocaldump.o fifodump.o \
17 + manuf.o \
18 packetracker.o timetracker.o alertracker.o finitestate.o \
19 getopt.o \
20 tcpserver.o server_protocols.o server_globals.o kismet_server.o
21 PS = kismet_server
22
23 DRONEO = util.o ringbuf.o configfile.o getopt.o ifcontrol.o iwcontrol.o packet.o \
24 - tcpstreamer.o prism2source.o pcapsource.o wtapfilesource.o wsp100source.o \
25 - dronesource.o vihasource.o packetsourcetracker.o kis_packsources.o \
26 - timetracker.o gpsd.o server_globals.o kismet_drone.o
27 + tcpstreamer.o pcapsource.o wtapfilesource.o \
28 + dronesource.o packetsourcetracker.o kis_packsources.o \
29 + timetracker.o server_globals.o kismet_drone.o
30 DRONE = kismet_drone
31
32 NCO = util.o configfile.o speech.o manuf.o tcpclient.o \
33 frontend.o cursesfront.o \
34 panelfront.o panelfront_display.o panelfront_input.o \
35 - gpsd.o getopt.o kismet_client.o
36 + getopt.o kismet_client.o
37 NC = kismet_client
38
39 GPSLO = getopt.o util.o configfile.o expat.o manuf.o \
40 diff -urN kismet.old/cursesfront.cc kismet.dev/cursesfront.cc
41 --- kismet.old/cursesfront.cc 2005-07-25 16:19:44.000000000 +0200
42 +++ kismet.dev/cursesfront.cc 2005-08-15 01:08:49.461799648 +0200
43 @@ -30,7 +30,6 @@
44 // Enable the protocols we can use
45 void NCurseFront::AddClient(TcpClient *in_client) {
46 client = in_client;
47 - client->EnableProtocol("GPS");
48 client->EnableProtocol("INFO");
49 client->EnableProtocol("REMOVE");
50 client->EnableProtocol("NETWORK");
51 @@ -88,32 +87,8 @@
52 mvwaddstr(netborder, 1, 2, " SSID T W Ch Data LLC Crypt Wk Flags");
53 }
54
55 - char gpsdata[1024];
56 - float lat, lon, alt, spd, heading;
57 int mode;
58
59 - client->FetchLoc(&lat, &lon, &alt, &spd, &heading, &mode);
60 -
61 - if (!(lat == 0 && lon == 0 && alt == 0 && spd == 0 && mode == 0)) {
62 -
63 - char fix[16];
64 -
65 - if (mode == -1)
66 - snprintf(fix, 16, "No signal");
67 - else if (mode == 2)
68 - snprintf(fix, 5, "2D");
69 - else if (mode == 3)
70 - snprintf(fix, 5, "3D");
71 - else
72 - snprintf(fix, 5, "NONE");
73 -
74 - snprintf(gpsdata, 1024, "Lat %.3f Lon %.3f Alt %.3f Spd %.3f Fix %s",
75 - lat, lon, alt, spd, fix);
76 -
77 - mvwaddstr(netborder, LINES-statheight-1, 2, gpsdata);
78 -
79 - }
80 -
81 box(infoborder, '|', '-');
82 mvwaddstr(infoborder, 0, 2, "Info");
83
84 diff -urN kismet.old/dronesource.cc kismet.dev/dronesource.cc
85 --- kismet.old/dronesource.cc 2005-07-25 16:19:44.000000000 +0200
86 +++ kismet.dev/dronesource.cc 2005-08-15 00:06:41.235746912 +0200
87 @@ -201,9 +201,6 @@
88 return -1;
89 }
90
91 - // Grab the GPS info
92 - gps_enabled = vpkt.gps_enabled;
93 -
94 stream_recv_bytes = 0;
95
96 // printf("debug - version packet valid\n\n");
97 @@ -336,25 +333,6 @@
98 packet->encoding = (encoding_type) phdr.encoding;
99 packet->datarate = (uint32_t) ntohl(phdr.datarate);
100
101 - if (gps_enabled) {
102 - // If the drone is sending us GPS data, use it
103 - packet->gps_lat = Pair2Float((int16_t) ntohs(phdr.gps_lat),
104 - (int64_t) kis_ntoh64(phdr.gps_lat_mant));
105 - packet->gps_lon = Pair2Float((int16_t) ntohs(phdr.gps_lon),
106 - (int64_t) kis_ntoh64(phdr.gps_lon_mant));
107 - packet->gps_alt = Pair2Float((int16_t) ntohs(phdr.gps_alt),
108 - (int64_t) kis_ntoh64(phdr.gps_alt_mant));
109 - packet->gps_spd = Pair2Float((int16_t) ntohs(phdr.gps_spd),
110 - (int64_t) kis_ntoh64(phdr.gps_spd_mant));
111 - packet->gps_heading = Pair2Float((int16_t) ntohs(phdr.gps_heading),
112 - (int64_t) kis_ntoh64(phdr.gps_heading_mant));
113 - packet->gps_fix = phdr.gps_fix;
114 - } else if (gpsd != NULL) {
115 - // Otherwise, no
116 - gpsd->FetchLoc(&packet->gps_lat, &packet->gps_lon, &packet->gps_alt,
117 - &packet->gps_spd, &packet->gps_heading, &packet->gps_fix);
118 - }
119 -
120 packet->data = data;
121 packet->moddata = moddata;
122 packet->modified = 0;
123 diff -urN kismet.old/dronesource.h kismet.dev/dronesource.h
124 --- kismet.old/dronesource.h 2005-07-25 16:19:44.000000000 +0200
125 +++ kismet.dev/dronesource.h 2005-08-15 00:06:56.589412800 +0200
126 @@ -80,8 +80,6 @@
127
128 unsigned int resyncing;
129
130 - // Is the drone pushing GPS data to us?
131 - int gps_enabled;
132 };
133
134 // Nothing but a registrant for us
135 diff -urN kismet.old/frontend.cc kismet.dev/frontend.cc
136 --- kismet.old/frontend.cc 2005-07-25 16:19:44.000000000 +0200
137 +++ kismet.dev/frontend.cc 2005-08-15 01:07:50.236803216 +0200
138 @@ -248,33 +248,6 @@
139
140 }
141
142 - // Aggregate the GPS data
143 - if (wnet->aggregate_points > 0) {
144 - dnet->virtnet->aggregate_lat += wnet->aggregate_lat;
145 - dnet->virtnet->aggregate_lon += wnet->aggregate_lon;
146 - dnet->virtnet->aggregate_alt += wnet->aggregate_alt;
147 - dnet->virtnet->aggregate_points += wnet->aggregate_points;
148 - }
149 -
150 - if (wnet->gps_fixed > dnet->virtnet->gps_fixed)
151 - dnet->virtnet->gps_fixed = wnet->gps_fixed;
152 - if (wnet->min_lat < dnet->virtnet->min_lat || dnet->virtnet->min_lat == 0)
153 - dnet->virtnet->min_lat = wnet->min_lat;
154 - if (wnet->min_lon < dnet->virtnet->min_lon || dnet->virtnet->min_lon == 0)
155 - dnet->virtnet->min_lon = wnet->min_lon;
156 - if (wnet->min_alt < dnet->virtnet->min_alt || dnet->virtnet->min_alt == 0)
157 - dnet->virtnet->min_alt = wnet->min_alt;
158 - if (wnet->min_spd < dnet->virtnet->min_spd || dnet->virtnet->min_spd == 0)
159 - dnet->virtnet->min_spd = wnet->min_spd;
160 - if (wnet->max_lat > dnet->virtnet->max_lat || dnet->virtnet->max_lat == 0)
161 - dnet->virtnet->max_lat = wnet->max_lat;
162 - if (wnet->max_lon > dnet->virtnet->max_lon || dnet->virtnet->max_lon == 0)
163 - dnet->virtnet->max_lon = wnet->max_lon;
164 - if (wnet->max_alt > dnet->virtnet->max_alt || dnet->virtnet->max_alt == 0)
165 - dnet->virtnet->max_alt = wnet->max_alt;
166 - if (wnet->max_spd > dnet->virtnet->max_spd || dnet->virtnet->max_spd == 0)
167 - dnet->virtnet->max_spd = wnet->max_spd;
168 -
169 // Aggregate the carriers and encodings
170 dnet->virtnet->carrier_set |= wnet->carrier_set;
171 dnet->virtnet->encoding_set |= wnet->encoding_set;
172 diff -urN kismet.old/kis_packsources.cc kismet.dev/kis_packsources.cc
173 --- kismet.old/kis_packsources.cc 2005-07-25 16:19:44.000000000 +0200
174 +++ kismet.dev/kis_packsources.cc 2005-08-15 00:15:11.107594648 +0200
175 @@ -60,13 +60,6 @@
176
177 #if defined(HAVE_LIBPCAP) && defined(HAVE_LINUX_WIRELESS)
178 // Linux wext-driven cards
179 - sourcetracker->RegisterPacketsource("cisco", 1, "IEEE80211b", 6,
180 - pcapsource_wext_registrant,
181 - monitor_cisco, unmonitor_cisco,
182 - chancontrol_wext, 1);
183 - sourcetracker->RegisterPacketsource("cisco_wifix", 1, "IEEE80211b", 6,
184 - pcapsource_ciscowifix_registrant,
185 - monitor_cisco_wifix, NULL, NULL, 1);
186 sourcetracker->RegisterPacketsource("hostap", 1, "IEEE80211b", 6,
187 pcapsource_wext_registrant,
188 monitor_hostap, unmonitor_hostap,
189 @@ -79,6 +72,14 @@
190 pcapsource_wext_registrant,
191 monitor_orinoco, unmonitor_orinoco,
192 chancontrol_orinoco, 1);
193 +#if 0
194 + sourcetracker->RegisterPacketsource("cisco", 1, "IEEE80211b", 6,
195 + pcapsource_wext_registrant,
196 + monitor_cisco, unmonitor_cisco,
197 + chancontrol_wext, 1);
198 + sourcetracker->RegisterPacketsource("cisco_wifix", 1, "IEEE80211b", 6,
199 + pcapsource_ciscowifix_registrant,
200 + monitor_cisco_wifix, NULL, NULL, 1);
201 sourcetracker->RegisterPacketsource("acx100", 1, "IEEE80211b", 6,
202 pcapsource_wextfcs_registrant,
203 monitor_acx100, unmonitor_acx100,
204 @@ -94,7 +95,13 @@
205 pcapsource_wext_registrant,
206 monitor_wext, unmonitor_wext,
207 chancontrol_wext, 1);
208 -
209 +#else
210 + REG_EMPTY_CARD(sourcetracker, "cisco");
211 + REG_EMPTY_CARD(sourcetracker, "cisco_wifix");
212 + REG_EMPTY_CARD(sourcetracker, "acx100");
213 + REG_EMPTY_CARD(sourcetracker, "vtar5k");
214 +#endif
215 +
216 sourcetracker->RegisterPacketsource("madwifi_a", 1, "IEEE80211a", 36,
217 pcapsource_wextfcs_registrant,
218 monitor_madwifi_a, unmonitor_madwifi,
219 @@ -121,11 +128,12 @@
220 monitor_prism54g, unmonitor_prism54g,
221 chancontrol_prism54g, 1);
222
223 +#if 0
224 sourcetracker->RegisterPacketsource("wlanng_wext", 1, "IEEE80211b", 6,
225 pcapsource_wlanng_registrant,
226 monitor_wlanng_avs, NULL,
227 chancontrol_wext, 1);
228 -
229 +
230 sourcetracker->RegisterPacketsource("ipw2100", 1, "IEEE80211b", 6,
231 pcapsource_wext_registrant,
232 monitor_ipw2100, unmonitor_ipw2100,
233 @@ -153,6 +161,16 @@
234 pcapsource_wext_registrant,
235 monitor_wext, unmonitor_wext,
236 chancontrol_wext, 1);
237 +#else
238 + REG_EMPTY_CARD(sourcetracker, "wlanng_wext");
239 + REG_EMPTY_CARD(sourcetracker, "ipw2100");
240 + REG_EMPTY_CARD(sourcetracker, "ipw2200");
241 + REG_EMPTY_CARD(sourcetracker, "ipw2915");
242 +
243 + REG_EMPTY_CARD(sourcetracker, "rt2400");
244 + REG_EMPTY_CARD(sourcetracker, "rt2500");
245 + REG_EMPTY_CARD(sourcetracker, "rt8180");
246 +#endif
247
248 #else
249 // Register the linuxwireless pcap stuff as null
250 @@ -183,6 +201,7 @@
251 #endif
252
253 #if defined(HAVE_LIBPCAP) && defined(SYS_LINUX)
254 +#if 0
255 sourcetracker->RegisterPacketsource("wlanng", 1, "IEEE80211b", 6,
256 pcapsource_wlanng_registrant,
257 monitor_wlanng, NULL, chancontrol_wlanng, 1);
258 @@ -190,6 +209,10 @@
259 pcapsource_wlanng_registrant,
260 monitor_wlanng_avs, NULL,
261 chancontrol_wlanng_avs, 1);
262 +#else
263 + REG_EMPTY_CARD(sourcetracker, "wlanng");
264 + REG_EMPTY_CARD(sourcetracker, "wlanng_avs");
265 +#endif
266 sourcetracker->RegisterPacketsource("wrt54g", 1, "na", 0,
267 pcapsource_wrt54g_registrant,
268 monitor_wrt54g, NULL, NULL, 0);
269 @@ -199,7 +222,8 @@
270 REG_EMPTY_CARD(sourcetracker, "wrt54g");
271 #endif
272
273 -#if defined(SYS_LINUX) && defined(HAVE_LINUX_NETLINK)
274 +//#if defined(SYS_LINUX) && defined(HAVE_LINUX_NETLINK)
275 +#if 0
276 sourcetracker->RegisterPacketsource("wlanng_legacy", 1, "IEEE80211b", 6,
277 prism2source_registrant,
278 monitor_wlanng_legacy, NULL,
279 @@ -240,7 +264,8 @@
280 REG_EMPTY_CARD(sourcetracker, "radiotap_bsd_b");
281 #endif
282
283 -#if defined(HAVE_LIBWIRETAP)
284 +// #if defined(HAVE_LIBWIRETAP)
285 +#if 0
286 sourcetracker->RegisterPacketsource("wtapfile", 0, "na", 0,
287 wtapfilesource_registrant,
288 NULL, NULL, NULL, 0);
289 @@ -248,7 +273,8 @@
290 REG_EMPTY_CARD(sourcetracker, "wtapfile");
291 #endif
292
293 -#if defined(HAVE_WSP100)
294 +#if 0
295 +//#if defined(HAVE_WSP100)
296 sourcetracker->RegisterPacketsource("wsp100", 0, "IEEE80211b", 6,
297 wsp100source_registrant,
298 monitor_wsp100, NULL, chancontrol_wsp100, 0);
299 @@ -256,7 +282,9 @@
300 REG_EMPTY_CARD(sourcetracker, "wsp100");
301 #endif
302
303 -#if defined(HAVE_VIHAHEADERS)
304 +
305 +#if 0
306 +//#if defined(HAVE_VIHAHEADERS)
307 sourcetracker->RegisterPacketsource("viha", 1, "IEEE80211b", 6,
308 vihasource_registrant,
309 NULL, NULL, chancontrol_viha, 0);
310 diff -urN kismet.old/kis_packsources.h kismet.dev/kis_packsources.h
311 --- kismet.old/kis_packsources.h 2005-07-25 16:19:44.000000000 +0200
312 +++ kismet.dev/kis_packsources.h 2005-08-15 00:15:54.831947536 +0200
313 @@ -22,11 +22,7 @@
314 #include "config.h"
315
316 #include "packetsource.h"
317 -#include "prism2source.h"
318 #include "pcapsource.h"
319 -#include "wtapfilesource.h"
320 -#include "wsp100source.h"
321 -#include "vihasource.h"
322 #include "dronesource.h"
323 #include "packetsourcetracker.h"
324
325 diff -urN kismet.old/kismet_client.cc kismet.dev/kismet_client.cc
326 --- kismet.old/kismet_client.cc 2005-07-25 16:19:44.000000000 +0200
327 +++ kismet.dev/kismet_client.cc 2005-08-15 00:20:21.533402752 +0200
328 @@ -28,7 +28,6 @@
329 #include "cursesfront.h"
330 #include "panelfront.h"
331 #include "configfile.h"
332 -#include "speech.h"
333
334 #ifndef exec_name
335 char *exec_name;
336 @@ -47,11 +46,7 @@
337 char *configfile;
338 char *uiconfigfile;
339 char *server = NULL;
340 -int sound = -1;
341 -int speech = -1;
342 int flite = 0;
343 -int speech_encoding = 0;
344 -string speech_sentence_encrypted, speech_sentence_unencrypted;
345 unsigned int metric = 0;
346 unsigned int reconnect = 0;
347
348 @@ -59,20 +54,9 @@
349 string configdir, groupfile;
350 FILE *group_file = NULL;
351
352 -// Pipe file descriptor pairs and fd's
353 -int soundpair[2];
354 -int speechpair[2];
355 -pid_t soundpid = -1, speechpid = -1;
356 -
357 // Catch our interrupt
358 void CatchShutdown(int sig) {
359
360 - // Kill our sound players
361 - if (soundpid > 0)
362 - kill(soundpid, 9);
363 - if (speechpid > 0)
364 - kill(speechpid, 9);
365 -
366 if (group_track) {
367 if ((group_file = fopen(groupfile.c_str(), "w")) == NULL) {
368 fprintf(stderr, "WARNING: Unable to open '%s' for writing, groups will not be saved.\n",
369 @@ -116,215 +100,6 @@
370 exit(0);
371 }
372
373 -// Subprocess sound handler
374 -void SoundHandler(int *fds, const char *player, map<string, string> soundmap) {
375 - int read_sock = fds[0];
376 -
377 - close(fds[1]);
378 -
379 - signal(SIGPIPE, PipeHandler);
380 -
381 - fd_set rset;
382 -
383 - char data[1024];
384 -
385 - pid_t sndpid = -1;
386 - int harvested = 1;
387 -
388 - while (1) {
389 - FD_ZERO(&rset);
390 - FD_SET(read_sock, &rset);
391 - char *end;
392 -
393 - memset(data, 0, 1024);
394 -
395 - if (harvested == 0) {
396 - // We consider a wait error to be a sign that the child pid died
397 - // so we flag it as harvested and keep on going
398 - pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG);
399 - if (harvestpid == -1 || harvestpid == sndpid)
400 - harvested = 1;
401 - }
402 -
403 - struct timeval tim;
404 - tim.tv_sec = 1;
405 - tim.tv_usec = 0;
406 -
407 - if (select(read_sock + 1, &rset, NULL, NULL, &tim) < 0) {
408 - if (errno != EINTR) {
409 - exit(1);
410 - }
411 - }
412 -
413 - if (FD_ISSET(read_sock, &rset)) {
414 - int ret;
415 - ret = read(read_sock, data, 1024);
416 -
417 - // We'll die off if we get a read error, and we'll let kismet on the
418 - // other side detact that it died
419 - if (ret <= 0 && (errno != EAGAIN && errno != EPIPE))
420 - exit(1);
421 -
422 - if ((end = strstr(data, "\n")) == NULL)
423 - continue;
424 -
425 - end[0] = '\0';
426 - }
427 -
428 - if (data[0] == '\0')
429 - continue;
430 -
431 - // If we've harvested the process, spawn a new one and watch it
432 - // instead. Otherwise, we just let go of the data we read
433 - if (harvested == 1) {
434 - // Only take the first line
435 - char *nl;
436 - if ((nl = strchr(data, '\n')) != NULL)
437 - *nl = '\0';
438 -
439 - char snd[1024];
440 -
441 - if (soundmap.size() == 0)
442 - snprintf(snd, 1024, "%s", data);
443 - if (soundmap.find(data) != soundmap.end())
444 - snprintf(snd, 1024, "%s", soundmap[data].c_str());
445 - else
446 - continue;
447 -
448 - char plr[1024];
449 - snprintf(plr, 1024, "%s", player);
450 -
451 - harvested = 0;
452 - if ((sndpid = fork()) == 0) {
453 - // Suppress errors
454 - int nulfd = open("/dev/null", O_RDWR);
455 - dup2(nulfd, 1);
456 - dup2(nulfd, 2);
457 -
458 - char * const echoarg[] = { plr, snd, NULL };
459 - execve(echoarg[0], echoarg, NULL);
460 - }
461 - }
462 -
463 - data[0] = '\0';
464 - }
465 -}
466 -
467 -// Subprocess speech handler
468 -void SpeechHandler(int *fds, const char *player) {
469 - int read_sock = fds[0];
470 - close(fds[1]);
471 -
472 - fd_set rset;
473 -
474 - char data[1024];
475 -
476 - pid_t sndpid = -1;
477 - int harvested = 1;
478 -
479 - while (1) {
480 - FD_ZERO(&rset);
481 - FD_SET(read_sock, &rset);
482 - //char *end;
483 -
484 - memset(data, 0, 1024);
485 -
486 - struct timeval tim;
487 - tim.tv_sec = 1;
488 - tim.tv_usec = 0;
489 -
490 - if (select(read_sock + 1, &rset, NULL, NULL, &tim) < 0) {
491 - if (errno != EINTR) {
492 - exit(1);
493 - }
494 - }
495 -
496 - if (harvested == 0) {
497 - // We consider a wait error to be a sign that the child pid died
498 - // so we flag it as harvested and keep on going
499 - pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG);
500 - if (harvestpid == -1 || harvestpid == sndpid)
501 - harvested = 1;
502 - }
503 -
504 - if (FD_ISSET(read_sock, &rset)) {
505 - int ret;
506 - ret = read(read_sock, data, 1024);
507 -
508 - // We'll die off if we get a read error, and we'll let kismet on the
509 - // other side detact that it died
510 - if (ret <= 0 && (errno != EAGAIN && errno != EPIPE))
511 - exit(1);
512 -
513 - data[ret] = '\0';
514 -
515 - }
516 -
517 - if (data[0] == '\0')
518 - continue;
519 -
520 - // If we've harvested the process, spawn a new one and watch it
521 - // instead. Otherwise, we just let go of the data we read
522 - if (harvested == 1) {
523 - harvested = 0;
524 - if ((sndpid = fork()) == 0) {
525 - // Only take the first line
526 - char *nl;
527 - if ((nl = strchr(data, '\n')) != NULL)
528 - *nl = '\0';
529 -
530 - // Make sure it's shell-clean
531 - MungeToShell(data, strlen(data));
532 - char spk_call[1024];
533 - snprintf(spk_call, 1024, "echo \"(%s\\\"%s\\\")\" | %s "
534 - ">/dev/null 2>/dev/null",
535 - flite ? "": "SayText ", data, player);
536 -
537 - system(spk_call);
538 -
539 - exit(0);
540 - }
541 - }
542 -
543 - data[0] = '\0';
544 - }
545 -}
546 -
547 -
548 -int PlaySound(string in_sound) {
549 -
550 - char snd[1024];
551 -
552 - snprintf(snd, 1024, "%s\n", in_sound.c_str());
553 -
554 - if (write(soundpair[1], snd, strlen(snd)) < 0) {
555 - char status[STATUS_MAX];
556 - snprintf(status, STATUS_MAX,
557 - "ERROR: Could not write to sound pipe. Stopping sound.");
558 - gui->WriteStatus(status);
559 -
560 - return 0;
561 - }
562 -
563 - return 1;
564 -}
565 -
566 -int SayText(string in_text) {
567 - char snd[1024];
568 -
569 - snprintf(snd, 1024, "%s\n", in_text.c_str());
570 -
571 - if (write(speechpair[1], snd, strlen(snd)) < 0) {
572 - char status[STATUS_MAX];
573 - snprintf(status, STATUS_MAX,
574 - "ERROR: Could not write to speech pipe. Stopping speech.");
575 - gui->WriteStatus(status);
576 -
577 - return 0;
578 - }
579 -
580 - return 1;
581 -}
582
583 int main(int argc, char *argv[]) {
584 exec_name = argv[0];
585 @@ -345,8 +120,6 @@
586 char guihost[1024];
587 int guiport = -1;
588
589 - int gpsmode = -1;
590 -
591 configfile = NULL;
592 uiconfigfile = NULL;
593
594 @@ -391,7 +164,6 @@
595 fprintf(stderr, "Using alternate UI config file: %s\n", uiconfigfile);
596 break;
597 case 'q':
598 - sound = 0;
599 break;
600 case 'g':
601 reqgui = strdup(optarg);
602 @@ -515,70 +287,6 @@
603 server = strdup(gui_conf->FetchOpt("host").c_str());
604 }
605
606 - if (gui_conf->FetchOpt("sound") == "true" && sound == -1) {
607 - if (gui_conf->FetchOpt("soundplay") != "") {
608 - sndplay = gui_conf->FetchOpt("soundplay");
609 - sound = 1;
610 -
611 - if (gui_conf->FetchOpt("soundopts") != "")
612 - sndplay += " " + gui_conf->FetchOpt("soundopts");
613 -
614 - if (gui_conf->FetchOpt("sound_new") != "")
615 - wav_map["new"] = gui_conf->FetchOpt("sound_new");
616 - if (gui_conf->FetchOpt("sound_new_wep") != "")
617 - wav_map["new_wep"] = gui_conf->FetchOpt("sound_new_wep");
618 - if (gui_conf->FetchOpt("sound_traffic") != "")
619 - wav_map["traffic"] = gui_conf->FetchOpt("sound_traffic");
620 - if (gui_conf->FetchOpt("sound_junktraffic") != "")
621 - wav_map["junktraffic"] = gui_conf->FetchOpt("sound_junktraffic");
622 - if (gui_conf->FetchOpt("sound_gpslock") != "")
623 - wav_map["gpslock"] = gui_conf->FetchOpt("sound_gpslock");
624 - if (gui_conf->FetchOpt("sound_gpslost") != "")
625 - wav_map["gpslost"] = gui_conf->FetchOpt("sound_gpslost");
626 - if (gui_conf->FetchOpt("sound_alert") != "")
627 - wav_map["alert"] = gui_conf->FetchOpt("sound_alert");
628 -
629 - } else {
630 - fprintf(stderr, "ERROR: Sound alerts enabled but no sound playing binary specified.\n");
631 - sound = 0;
632 - }
633 - } else if (sound == -1)
634 - sound = 0;
635 -
636 - /* Added by Shaw Innes 17/2/02 */
637 - if (gui_conf->FetchOpt("speech") == "true" && speech == -1) {
638 - if (gui_conf->FetchOpt("festival") != "") {
639 - festival = strdup(gui_conf->FetchOpt("festival").c_str());
640 - speech = 1;
641 -
642 - if (gui_conf->FetchOpt("flite") == "true")
643 - flite = 1;
644 -
645 - string speechtype = gui_conf->FetchOpt("speech_type");
646 -
647 - if (!strcasecmp(speechtype.c_str(), "nato"))
648 - speech_encoding = SPEECH_ENCODING_NATO;
649 - else if (!strcasecmp(speechtype.c_str(), "spell"))
650 - speech_encoding = SPEECH_ENCODING_SPELL;
651 - else
652 - speech_encoding = SPEECH_ENCODING_NORMAL;
653 -
654 - // Make sure we have encrypted text lines
655 - if (gui_conf->FetchOpt("speech_encrypted") == "" || gui_conf->FetchOpt("speech_unencrypted") == "") {
656 - fprintf(stderr, "ERROR: Speech request but speech_encrypted or speech_unencrypted line missing.\n");
657 - speech = 0;
658 - }
659 -
660 - speech_sentence_encrypted = gui_conf->FetchOpt("speech_encrypted");
661 - speech_sentence_unencrypted = gui_conf->FetchOpt("speech_unencrypted");
662 -
663 - } else {
664 - fprintf(stderr, "ERROR: Speech alerts enabled but no path to festival has been specified.\n");
665 - speech = 0;
666 - }
667 - } else if (speech == -1)
668 - speech = 0;
669 -
670 if (gui_conf->FetchOpt("decay") != "") {
671 if (sscanf(gui_conf->FetchOpt("decay").c_str(), "%d", &decay) != 1) {
672 fprintf(stderr, "FATAL: Illegal config file value for decay.\n");
673 @@ -636,45 +344,6 @@
674 }
675 }
676
677 - // Fork and find the sound options
678 - if (sound) {
679 - if (pipe(soundpair) == -1) {
680 - fprintf(stderr, "WARNING: Unable to create pipe for audio. Disabling sound.\n");
681 - sound = 0;
682 - } else {
683 - soundpid = fork();
684 -
685 - if (soundpid < 0) {
686 - fprintf(stderr, "WARNING: Unable to fork for audio. Disabling sound.\n");
687 - sound = 0;
688 - } else if (soundpid == 0) {
689 - SoundHandler(soundpair, sndplay.c_str(), wav_map);
690 - exit(0);
691 - }
692 -
693 - close(soundpair[0]);
694 - }
695 - }
696 -
697 - if (speech) {
698 - if (pipe(speechpair) == -1) {
699 - fprintf(stderr, "WARNING: Unable to create pipe for speech. Disabling speech.\n");
700 - speech = 0;
701 - } else {
702 - speechpid = fork();
703 -
704 - if (speechpid < 0) {
705 - fprintf(stderr, "WARNING: Unable to fork for speech. Disabling speech.\n");
706 - speech = 0;
707 - } else if (speechpid == 0) {
708 - SpeechHandler(speechpair, festival);
709 - exit(0);
710 - }
711 -
712 - close(speechpair[0]);
713 - }
714 - }
715 -
716 if (kismet_serv.Connect(guiport, guihost) < 0) {
717 fprintf(stderr, "FATAL: Could not connect to %s:%d.\n", guihost, guiport);
718 CatchShutdown(-1);
719 @@ -884,53 +553,14 @@
720 }
721
722 if (pollret != 0) {
723 - if (pollret == CLIENT_ALERT)
724 - if (sound == 1)
725 - sound = PlaySound("alert");
726
727 if (strlen(tcpcli->FetchStatus()) != 0) {
728 gui->WriteStatus(tcpcli->FetchStatus());
729 // gui->DrawDisplay();
730 }
731
732 - // The GPS only gets updated for the primary client
733 - if (tcpcli == primary_client) {
734 - if (tcpcli->FetchMode() == 0 && gpsmode != 0) {
735 - if (sound == 1 && gpsmode != -1)
736 - sound = PlaySound("gpslost");
737 - gpsmode = 0;
738 - } else if (tcpcli->FetchMode() != 0 && gpsmode == 0) {
739 - if (sound == 1 && gpsmode != -1)
740 - sound = PlaySound("gpslock");
741 - gpsmode = 1;
742 - }
743 - }
744 -
745 if (tcpcli->FetchDeltaNumNetworks() > 0) {
746 wireless_network *newnet = tcpcli->FetchLastNewNetwork();
747 -
748 - if (sound == 1 && newnet != lastspoken) {
749 - if (newnet->crypt_set &&
750 - wav_map.find("new_wep") != wav_map.end())
751 - sound = PlaySound("new_wep");
752 - else
753 - sound = PlaySound("new");
754 - }
755 -
756 - if (speech == 1 && newnet != lastspoken) {
757 - string text;
758 -
759 - if (newnet != NULL) {
760 - if (newnet->crypt_set)
761 - text = ExpandSpeechString(speech_sentence_encrypted, newnet, speech_encoding);
762 - else
763 - text = ExpandSpeechString(speech_sentence_unencrypted, newnet, speech_encoding);
764 -
765 - speech = SayText(text.c_str());
766 - }
767 - }
768 -
769 - lastspoken = newnet;
770 }
771
772 num_networks += tcpcli->FetchNumNetworks();
773 @@ -938,17 +568,7 @@
774 num_noise += tcpcli->FetchNumNoise();
775 num_dropped += tcpcli->FetchNumDropped();
776
777 - if (tcpcli->FetchDeltaNumPackets() != 0) {
778 - if (time(0) - last_click >= decay && sound == 1) {
779 - if (tcpcli->FetchDeltaNumPackets() > tcpcli->FetchDeltaNumDropped()) {
780 - sound = PlaySound("traffic");
781 - } else {
782 - sound = PlaySound("junktraffic");
783 - }
784 -
785 - last_click = time(0);
786 - }
787 - }
788 + tcpcli->FetchDeltaNumPackets();
789 }
790 }
791 } else {
792 diff -urN kismet.old/kismet_drone.cc kismet.dev/kismet_drone.cc
793 --- kismet.old/kismet_drone.cc 2005-07-25 16:19:44.000000000 +0200
794 +++ kismet.dev/kismet_drone.cc 2005-08-15 01:04:06.114874928 +0200
795 @@ -32,16 +32,11 @@
796 #include "packet.h"
797
798 #include "packetsource.h"
799 -#include "prism2source.h"
800 #include "pcapsource.h"
801 -#include "wtapfilesource.h"
802 -#include "wsp100source.h"
803 -#include "vihasource.h"
804 #include "dronesource.h"
805 #include "packetsourcetracker.h"
806 #include "kis_packsources.h"
807
808 -#include "gpsd.h"
809 #include "tcpstreamer.h"
810 #include "configfile.h"
811
812 @@ -53,10 +48,6 @@
813
814 const char *config_base = "kismet_drone.conf";
815
816 -GPSD *gps = NULL;
817 -int gpsmode = 0;
818 -int gps_enable = 0;
819 -
820 // Timetracker
821 Timetracker timetracker;
822
823 @@ -81,26 +72,6 @@
824 exit(0);
825 }
826
827 -int GpsEvent(Timetracker::timer_event *evt, void *parm) {
828 - // The GPS only provides us a new update once per second we might
829 - // as well only update it here once a second
830 - if (gps_enable) {
831 - int gpsret;
832 - gpsret = gps->Scan();
833 - if (gpsret < 0) {
834 - if (!silent)
835 - fprintf(stderr, "GPS error fetching data: %s\n",
836 - gps->FetchError());
837 -
838 - gps_enable = 0;
839 - }
840 -
841 - }
842 -
843 - // We want to be rescheduled
844 - return 1;
845 -}
846 -
847 // Handle channel hopping... this is actually really simple.
848 int ChannelHopEvent(Timetracker::timer_event *evt, void *parm) {
849 sourcetracker.AdvanceChannel();
850 @@ -148,9 +119,6 @@
851
852 TcpStreamer streamer;
853
854 - char gpshost[1024];
855 - int gpsport = -1;
856 -
857 int channel_hop = -1;
858 int channel_velocity = 1;
859 int channel_dwell = 0;
860 @@ -351,46 +319,7 @@
861 exit(1);
862 }
863
864 - if (conf->FetchOpt("gps") == "true") {
865 - if (sscanf(conf->FetchOpt("gpshost").c_str(), "%1023[^:]:%d", gpshost, &gpsport) != 2) {
866 - fprintf(stderr, "Invalid GPS host in config (host:port required)\n");
867 - exit(1);
868 - }
869 -
870 - gps_enable = 1;
871 - } else {
872 - gps_enable = 0;
873 - }
874 -
875 - if (gps_enable == 1) {
876 - // Open the GPS
877 - gps = new GPSD(gpshost, gpsport);
878 -
879 - // Lock GPS position
880 - if (conf->FetchOpt("gpsmodelock") == "true") {
881 - fprintf(stderr, "Enabling GPS position lock override (broken GPS unit reports 0 always)\n");
882 - gps->SetOptions(GPSD_OPT_FORCEMODE);
883 - }
884 -
885 - if (gps->OpenGPSD() < 0) {
886 - fprintf(stderr, "%s\n", gps->FetchError());
887 -
888 - gps_enable = 0;
889 - } else {
890 - fprintf(stderr, "Opened GPS connection to %s port %d\n",
891 - gpshost, gpsport);
892 -
893 - }
894 - }
895 -
896 - // Update GPS coordinates and handle signal loss if defined
897 - timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &GpsEvent, NULL);
898 -
899 - // Add the GPS to the tcpstreamer
900 - streamer.AddGpstracker(gps);
901 -
902 // Register the gps and timetracker with the sourcetracker
903 - sourcetracker.AddGpstracker(gps);
904 sourcetracker.AddTimetracker(&timetracker);
905
906 // Register the sources
907 diff -urN kismet.old/kismet_server.cc kismet.dev/kismet_server.cc
908 --- kismet.old/kismet_server.cc 2005-07-25 16:19:44.000000000 +0200
909 +++ kismet.dev/kismet_server.cc 2005-08-15 01:03:15.103629816 +0200
910 @@ -37,29 +37,19 @@
911 #include "packet.h"
912
913 #include "packetsource.h"
914 -#include "prism2source.h"
915 #include "pcapsource.h"
916 -#include "wtapfilesource.h"
917 -#include "wsp100source.h"
918 -#include "vihasource.h"
919 #include "dronesource.h"
920 #include "packetsourcetracker.h"
921 #include "kis_packsources.h"
922
923 #include "dumpfile.h"
924 -#include "wtapdump.h"
925 #include "wtaplocaldump.h"
926 -#include "airsnortdump.h"
927 #include "fifodump.h"
928 -#include "gpsdump.h"
929 -
930 -#include "gpsd.h"
931
932 #include "packetracker.h"
933 #include "timetracker.h"
934 #include "alertracker.h"
935
936 -#include "speech.h"
937 #include "tcpserver.h"
938 #include "server_globals.h"
939 #include "kismet_server.h"
940 @@ -73,13 +62,13 @@
941
942 // Some globals for command line options
943 char *configfile = NULL;
944 -int no_log = 0, noise_log = 0, data_log = 0, net_log = 0, crypt_log = 0, cisco_log = 0,
945 - gps_log = -1, gps_enable = 1, csv_log = 0, xml_log = 0, ssid_cloak_track = 0,
946 - ip_track = 0, waypoint = 0, fifo = 0, corrupt_log = 0;
947 +int no_log = 0, noise_log = 0, data_log = 0, net_log = 0, cisco_log = 0,
948 + csv_log = 0, xml_log = 0, ssid_cloak_track = 0,
949 + ip_track = 0, fifo = 0, corrupt_log = 0;
950 string logname, dumplogfile, netlogfile, cryptlogfile, ciscologfile,
951 - gpslogfile, csvlogfile, xmllogfile, ssidtrackfile, configdir, iptrackfile,
952 - waypointfile, fifofile;
953 -FILE *ssid_file = NULL, *ip_file = NULL, *waypoint_file = NULL, *pid_file = NULL;
954 + csvlogfile, xmllogfile, ssidtrackfile, configdir, iptrackfile,
955 + fifofile;
956 +FILE *ssid_file = NULL, *ip_file = NULL, *pid_file = NULL;
957
958 DumpFile *dumpfile, *cryptfile;
959 int packnum = 0, localdropnum = 0;
960 @@ -89,17 +78,8 @@
961 Alertracker alertracker;
962 Timetracker timetracker;
963
964 -GPSD *gps = NULL;
965 -int gpsmode = 0;
966 -GPSDump gpsdump;
967 -
968 -// Last time we tried to reconnect to the gps
969 -time_t last_gpsd_reconnect = 0;
970 -int gpsd_reconnect_attempt = 0;
971 -
972 FifoDumpFile fifodump;
973 TcpServer ui_server;
974 -int sound = -1;
975 packet_info last_info;
976 int decay;
977 channel_power channel_graph[CHANNEL_MAX];
978 @@ -113,16 +93,13 @@
979 macmap<wep_key_info *> bssid_wep_map;
980
981 // Pipe file descriptor pairs and fd's
982 -int soundpair[2];
983 -int speechpair[2];
984 int chanpair[2];
985 -pid_t soundpid = -1, speechpid = -1, chanpid = -1;
986
987 // Past alerts
988 unsigned int max_alerts = 50;
989
990 // Reference numbers for all of our builtin protocols
991 -int kismet_ref = -1, network_ref = -1, client_ref = -1, gps_ref = -1,
992 +int kismet_ref = -1, network_ref = -1, client_ref = -1,
993 time_ref = -1, error_ref = -1, info_ref = -1, cisco_ref = -1, terminate_ref = -1,
994 remove_ref = -1, capability_ref = -1, protocols_ref = -1, status_ref = -1,
995 alert_ref = -1, packet_ref = -1, string_ref = -1, ack_ref = -1, wepkey_ref = -1,
996 @@ -169,24 +146,12 @@
997 const char *logtypes = NULL, *dumptype = NULL;
998 int limit_logs = 0;
999
1000 -char gpshost[1024];
1001 -int gpsport = -1;
1002 -
1003 string allowed_hosts;
1004 string bind_addr;
1005 int tcpport = -1;
1006 int tcpmax;
1007
1008 -//const char *sndplay = NULL;
1009 -string sndplay;
1010 -
1011 -const char *festival = NULL;
1012 -int speech = -1;
1013 int flite = 0;
1014 -int speech_encoding = 0;
1015 -string speech_sentence_encrypted, speech_sentence_unencrypted;
1016 -
1017 -map<string, string> wav_map;
1018
1019 int beacon_log = 1;
1020 int phy_log = 1;
1021 @@ -336,28 +301,6 @@
1022 // delete dumpfile;
1023 }
1024
1025 - if (crypt_log) {
1026 - cryptfile->CloseDump();
1027 -
1028 - if (cryptfile->FetchDumped() == 0) {
1029 - fprintf(stderr, "Didn't see any weak encryption packets, unlinking weak file\n");
1030 - unlink(cryptlogfile.c_str());
1031 - }
1032 -
1033 - // delete cryptfile;
1034 - }
1035 -
1036 - if (gps_log == 1) {
1037 - if (gpsdump.CloseDump(1) < 0)
1038 - fprintf(stderr, "Didn't log any GPS coordinates, unlinking gps file\n");
1039 - }
1040 -
1041 - // Kill our sound players
1042 - if (soundpid > 0)
1043 - kill(soundpid, 9);
1044 - if (speechpid > 0)
1045 - kill(speechpid, 9);
1046 -
1047 // Shut down the packet sources
1048 sourcetracker.CloseSources();
1049
1050 @@ -368,228 +311,11 @@
1051 exit(0);
1052 }
1053
1054 -// Subprocess sound handler
1055 -void SoundHandler(int *fds, const char *player, map<string, string> soundmap) {
1056 - int read_sock = fds[0];
1057 - close(fds[1]);
1058 -
1059 - fd_set rset;
1060 -
1061 - char data[1024];
1062 -
1063 - pid_t sndpid = -1;
1064 - int harvested = 1;
1065 -
1066 - while (1) {
1067 - FD_ZERO(&rset);
1068 - FD_SET(read_sock, &rset);
1069 - char *end;
1070 -
1071 - memset(data, 0, 1024);
1072 -
1073 - struct timeval tm;
1074 - tm.tv_sec = 1;
1075 - tm.tv_usec = 0;
1076 -
1077 - if (select(read_sock + 1, &rset, NULL, NULL, &tm) < 0) {
1078 - if (errno != EINTR) {
1079 - exit(1);
1080 - }
1081 - }
1082 -
1083 - if (harvested == 0) {
1084 - // We consider a wait error to be a sign that the child pid died
1085 - // so we flag it as harvested and keep on going
1086 - pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG);
1087 - if (harvestpid == -1 || harvestpid == sndpid)
1088 - harvested = 1;
1089 - }
1090 -
1091 - if (FD_ISSET(read_sock, &rset)) {
1092 - int ret;
1093 - ret = read(read_sock, data, 1024);
1094 -
1095 - // We'll die off if we get a read error, and we'll let kismet on the
1096 - // other side detact that it died
1097 - if (ret <= 0 && (errno != EAGAIN && errno != EPIPE))
1098 - exit(1);
1099 -
1100 - if ((end = strstr(data, "\n")) == NULL)
1101 - continue;
1102 -
1103 - end[0] = '\0';
1104 - }
1105 -
1106 - if (data[0] == '\0')
1107 - continue;
1108 -
1109 -
1110 - // If we've harvested the process, spawn a new one and watch it
1111 - // instead. Otherwise, we just let go of the data we read
1112 - if (harvested == 1) {
1113 - // Only take the first line
1114 - char *nl;
1115 - if ((nl = strchr(data, '\n')) != NULL)
1116 - *nl = '\0';
1117 -
1118 - // Make sure it's shell-clean
1119 -
1120 - char snd[1024];
1121 -
1122 - if (soundmap.size() == 0)
1123 - snprintf(snd, 1024, "%s", data);
1124 - if (soundmap.find(data) != soundmap.end())
1125 - snprintf(snd, 1024, "%s", soundmap[data].c_str());
1126 - else
1127 - continue;
1128 -
1129 - char plr[1024];
1130 - snprintf(plr, 1024, "%s", player);
1131 -
1132 - harvested = 0;
1133 - if ((sndpid = fork()) == 0) {
1134 - // Suppress errors
1135 - if (silent) {
1136 - int nulfd = open("/dev/null", O_RDWR);
1137 - dup2(nulfd, 1);
1138 - dup2(nulfd, 2);
1139 - }
1140 -
1141 - char * const echoarg[] = { plr, snd, NULL };
1142 - execve(echoarg[0], echoarg, NULL);
1143 - }
1144 - }
1145 - data[0] = '\0';
1146 - }
1147 -}
1148 -
1149 -// Subprocess speech handler
1150 -void SpeechHandler(int *fds, const char *player) {
1151 - int read_sock = fds[0];
1152 - close(fds[1]);
1153 -
1154 - fd_set rset;
1155 -
1156 - char data[1024];
1157 -
1158 - pid_t sndpid = -1;
1159 - int harvested = 1;
1160 -
1161 - while (1) {
1162 - FD_ZERO(&rset);
1163 - FD_SET(read_sock, &rset);
1164 - //char *end;
1165 -
1166 - memset(data, 0, 1024);
1167 -
1168 - if (harvested == 0) {
1169 - // We consider a wait error to be a sign that the child pid died
1170 - // so we flag it as harvested and keep on going
1171 - pid_t harvestpid = waitpid(sndpid, NULL, WNOHANG);
1172 - if (harvestpid == -1 || harvestpid == sndpid)
1173 - harvested = 1;
1174 - }
1175 -
1176 - struct timeval tm;
1177 - tm.tv_sec = 1;
1178 - tm.tv_usec = 0;
1179 -
1180 - if (select(read_sock + 1, &rset, NULL, NULL, &tm) < 0) {
1181 - if (errno != EINTR) {
1182 - exit(1);
1183 - }
1184 - }
1185 -
1186 - if (FD_ISSET(read_sock, &rset)) {
1187 - int ret;
1188 - ret = read(read_sock, data, 1024);
1189 -
1190 - // We'll die off if we get a read error, and we'll let kismet on the
1191 - // other side detact that it died
1192 - if (ret <= 0 && (errno != EAGAIN && errno != EPIPE))
1193 - exit(1);
1194 -
1195 - data[ret] = '\0';
1196 - }
1197 -
1198 - if (data[0] == '\0')
1199 - continue;
1200 -
1201 - // If we've harvested the process, spawn a new one and watch it
1202 - // instead. Otherwise, we just let go of the data we read
1203 - if (harvested == 1) {
1204 - harvested = 0;
1205 - if ((sndpid = fork()) == 0) {
1206 - // Only take the first line
1207 - char *nl;
1208 - if ((nl = strchr(data, '\n')) != NULL)
1209 - *nl = '\0';
1210 -
1211 - // Make sure it's shell-clean
1212 - MungeToShell(data, strlen(data));
1213 - char spk_call[1024];
1214 - snprintf(spk_call, 1024, "echo \"(%s\\\"%s\\\")\" | %s "
1215 - ">/dev/null 2>/dev/null",
1216 - flite ? "" : "SayText ", data, player);
1217 - system(spk_call);
1218 -
1219 - exit(0);
1220 - }
1221 - }
1222 -
1223 - data[0] = '\0';
1224 - }
1225 -}
1226 -
1227 -
1228 -// Fork and run a system call to play a sound
1229 -int PlaySound(string in_sound) {
1230 -
1231 - char snd[1024];
1232 -
1233 - snprintf(snd, 1024, "%s\n", in_sound.c_str());
1234 -
1235 - if (write(soundpair[1], snd, strlen(snd)) < 0) {
1236 - char status[STATUS_MAX];
1237 - if (!silent)
1238 - fprintf(stderr, "ERROR: Write error, closing sound pipe.\n");
1239 - snprintf(status, STATUS_MAX, "ERROR: Write error on sound pipe, closing sound connection");
1240 - NetWriteStatus(status);
1241 -
1242 - return 0;
1243 - }
1244 -
1245 - return 1;
1246 -}
1247 -
1248 -int SayText(string in_text) {
1249 -
1250 - char snd[1024];
1251 -
1252 - snprintf(snd, 1024, "%s\n", in_text.c_str());
1253 - MungeToShell(snd, 1024);
1254 -
1255 - if (write(speechpair[1], snd, strlen(snd)) < 0) {
1256 - char status[STATUS_MAX];
1257 - if (!silent)
1258 - fprintf(stderr, "ERROR: Write error, closing speech pipe.\n");
1259 - snprintf(status, STATUS_MAX, "ERROR: Write error on speech pipe, closing speech connection");
1260 - NetWriteStatus(status);
1261 -
1262 - return 0;
1263 - }
1264 -
1265 - return 1;
1266 -}
1267 -
1268 void KisLocalAlert(const char *in_text) {
1269 time_t now = time(0);
1270 if (!silent)
1271 fprintf(stderr, "ALERT %.24s %s\n", ctime(&now), in_text);
1272
1273 - if (sound == 1)
1274 - sound = PlaySound("alert");
1275 -
1276 }
1277
1278 void KisLocalStatus(const char *in_status) {
1279 @@ -638,37 +364,6 @@
1280
1281 char tmpstr[32];
1282
1283 - GPS_data gdata;
1284 -
1285 - if (gps_enable) {
1286 - float lat, lon, alt, spd, hed;
1287 - int mode;
1288 -
1289 - gps->FetchLoc(&lat, &lon, &alt, &spd, &hed, &mode);
1290 -
1291 - snprintf(tmpstr, 32, "%f", lat);
1292 - gdata.lat = tmpstr;
1293 - snprintf(tmpstr, 32, "%f", lon);
1294 - gdata.lon = tmpstr;
1295 - snprintf(tmpstr, 32, "%f", alt);
1296 - gdata.alt = tmpstr;
1297 - snprintf(tmpstr, 32, "%f", spd);
1298 - gdata.spd = tmpstr;
1299 - snprintf(tmpstr, 32, "%f", hed);
1300 - gdata.heading = tmpstr;
1301 - snprintf(tmpstr, 32, "%d", mode);
1302 - gdata.mode = tmpstr;
1303 - } else {
1304 - gdata.lat = "0.0";
1305 - gdata.lon = "0.0";
1306 - gdata.alt = "0.0";
1307 - gdata.spd = "0.0";
1308 - gdata.heading = "0.0";
1309 - gdata.mode = "0";
1310 - }
1311 -
1312 - ui_server.SendToAll(gps_ref, (void *) &gdata);
1313 -
1314 INFO_data idata;
1315 snprintf(tmpstr, 32, "%d", tracker.FetchNumNetworks());
1316 idata.networks = tmpstr;
1317 @@ -789,82 +484,6 @@
1318 }
1319 }
1320
1321 -int GpsEvent(Timetracker::timer_event *evt, void *parm) {
1322 - char status[STATUS_MAX];
1323 -
1324 - // The GPS only provides us a new update once per second we might
1325 - // as well only update it here once a second
1326 -
1327 - // If we're disconnected, try to reconnect.
1328 - if (gpsd_reconnect_attempt > 0) {
1329 - // Increment the time between connection attempts
1330 - if (last_gpsd_reconnect + ((gpsd_reconnect_attempt - 1) * 2) < time(0)) {
1331 - if (gps->OpenGPSD() < 0) {
1332 - last_gpsd_reconnect = time(0);
1333 -
1334 - if (gpsd_reconnect_attempt < 20)
1335 - gpsd_reconnect_attempt++;
1336 -
1337 - snprintf(status, STATUS_MAX, "Unable to reconnect to GPSD, trying "
1338 - "again in %d seconds.", ((gpsd_reconnect_attempt - 1) * 2));
1339 -
1340 - if (!silent || NetWriteStatus(status) == 0)
1341 - fprintf(stderr, "WARNING: %s\n", status);
1342 -
1343 - return 1;
1344 - } else {
1345 - gpsd_reconnect_attempt = 0;
1346 -
1347 - snprintf(status, STATUS_MAX, "Reopened connection to GPSD");
1348 - if (!silent || NetWriteStatus(status) == 0)
1349 - fprintf(stderr, "NOTICE: %s\n", status);
1350 - }
1351 - } else {
1352 - // Don't process more if we haven't woken up yet
1353 - return 1;
1354 - }
1355 -
1356 - }
1357 -
1358 - if (gps_enable) {
1359 - int gpsret;
1360 - gpsret = gps->Scan();
1361 -
1362 - if (gpsret < 0) {
1363 - snprintf(status, STATUS_MAX, "GPS error requesting data: %s",
1364 - gps->FetchError());
1365 -
1366 - if (!silent || NetWriteStatus(status) == 0)
1367 - fprintf(stderr, "WARNING: %s\n", status);
1368 -
1369 - gpsd_reconnect_attempt = 1;
1370 - }
1371 -
1372 - if (gpsret == 0 && gpsmode != 0) {
1373 - if (!silent || NetWriteStatus("Lost GPS signal.") == 0)
1374 - fprintf(stderr, "Lost GPS signal.\n");
1375 - if (sound == 1)
1376 - sound = PlaySound("gpslost");
1377 -
1378 - gpsmode = 0;
1379 - } else if (gpsret != 0 && gpsmode == 0) {
1380 - if (!silent || NetWriteStatus("Acquired GPS signal.") == 0)
1381 - fprintf(stderr, "Acquired GPS signal.\n");
1382 - if (sound == 1)
1383 - sound = PlaySound("gpslock");
1384 -
1385 - gpsmode = 1;
1386 - }
1387 - }
1388 -
1389 - if (gps_log == 1 && gpsmode != 0 && gps != NULL) {
1390 - gpsdump.DumpTrack(gps);
1391 - }
1392 -
1393 - // We want to be rescheduled
1394 - return 1;
1395 -}
1396 -
1397 // Simple redirect to the network info drawer. We don't want to change netwriteinfo to a
1398 // timer event since we call it un-timed too
1399 int NetWriteEvent(Timetracker::timer_event *evt, void *parm) {
1400 @@ -884,13 +503,6 @@
1401 return 1;
1402 }
1403
1404 -// Write the waypoints for gpsdrive
1405 -int WaypointSyncEvent(Timetracker::timer_event *evt, void *parm) {
1406 - tracker.WriteGpsdriveWaypt(waypoint_file);
1407 -
1408 - return 1;
1409 -}
1410 -
1411 // Handle tracker maintenance
1412 int TrackerTickEvent(Timetracker::timer_event *evt, void *parm) {
1413 tracker.Tick();
1414 @@ -1159,11 +771,10 @@
1415 " -c, --capture-source <src> Packet capture source line (type,interface,name)\n"
1416 " -C, --enable-capture-sources Comma separated list of named packet sources to use.\n"
1417 " -l, --log-types <types> Comma separated list of types to log,\n"
1418 - " (ie, dump,cisco,weak,network,gps)\n"
1419 + " (ie, dump,cisco,network)\n"
1420 " -d, --dump-type <type> Dumpfile type (wiretap)\n"
1421 " -m, --max-packets <num> Maximum number of packets before starting new dump\n"
1422 " -q, --quiet Don't play sounds\n"
1423 - " -g, --gps <host:port> GPS server (host:port or off)\n"
1424 " -p, --port <port> TCPIP server port for GUI connections\n"
1425 " -a, --allowed-hosts <hosts> Comma separated list of hosts allowed to connect\n"
1426 " -b, --bind-address <address> Bind to this address. Default INADDR_ANY\n."
1427 @@ -1288,18 +899,6 @@
1428 }
1429
1430
1431 - if (conf->FetchOpt("waypoints") == "true") {
1432 - if(conf->FetchOpt("waypointdata") == "") {
1433 - fprintf(stderr, "WARNING: Waypoint logging requested but no waypoint data file given.\n"
1434 - "Waypoint logging will be disabled.\n");
1435 - waypoint = 0;
1436 - } else {
1437 - waypointfile = conf->ExpandLogPath(conf->FetchOpt("waypointdata"), "", "", 0, 1);
1438 - waypoint = 1;
1439 - }
1440 -
1441 - }
1442 -
1443 if (conf->FetchOpt("metric") == "true") {
1444 fprintf(stderr, "Using metric measurements.\n");
1445 metric = 1;
1446 @@ -1379,16 +971,6 @@
1447
1448 }
1449
1450 - if (strstr(logtypes, "weak")) {
1451 - crypt_log = 1;
1452 -
1453 - if (conf->FetchOpt("logtemplate") == "") {
1454 - fprintf(stderr, "FATAL: Logging (weak packets) enabled but no logtemplate given in config.\n");
1455 - ErrorShutdown();
1456 - }
1457 -
1458 - }
1459 -
1460 if (strstr(logtypes, "csv")) {
1461 csv_log = 1;
1462
1463 @@ -1418,25 +1000,6 @@
1464
1465 }
1466
1467 - if (strstr(logtypes, "gps")) {
1468 - if (gps_log == 0) {
1469 - fprintf(stderr, "WARNING: Disabling GPS logging.\n");
1470 - } else {
1471 - gps_log = 1;
1472 -
1473 - if (conf->FetchOpt("logtemplate") == "") {
1474 - fprintf(stderr, "FATAL: Logging (gps coordinates) enabled but no logtemplate given in config.\n");
1475 - ErrorShutdown();
1476 - }
1477 - }
1478 -
1479 - }
1480 -
1481 - if (gps_log == 1 && !net_log) {
1482 - fprintf(stderr, "WARNING: Logging (gps coordinates) enabled but XML logging (networks) was not.\n"
1483 - "It will be enabled now.\n");
1484 - xml_log = 1;
1485 - }
1486 }
1487
1488 if (conf->FetchOpt("decay") != "") {
1489 @@ -1557,72 +1120,6 @@
1490 legal_ipblock_vec.push_back(ipb);
1491 }
1492
1493 - // Process sound stuff
1494 - if (conf->FetchOpt("sound") == "true" && sound == -1) {
1495 - if (conf->FetchOpt("soundplay") != "") {
1496 - sndplay = conf->FetchOpt("soundplay");
1497 -
1498 - if (conf->FetchOpt("soundopts") != "")
1499 - sndplay += " " + conf->FetchOpt("soundopts");
1500 -
1501 - sound = 1;
1502 -
1503 - if (conf->FetchOpt("sound_new") != "")
1504 - wav_map["new"] = conf->FetchOpt("sound_new");
1505 - if (conf->FetchOpt("sound_new_wep") != "")
1506 - wav_map["new_wep"] = conf->FetchOpt("sound_new_wep");
1507 - if (conf->FetchOpt("sound_traffic") != "")
1508 - wav_map["traffic"] = conf->FetchOpt("sound_traffic");
1509 - if (conf->FetchOpt("sound_junktraffic") != "")
1510 - wav_map["junktraffic"] = conf->FetchOpt("sound_traffic");
1511 - if (conf->FetchOpt("sound_gpslock") != "")
1512 - wav_map["gpslock"] = conf->FetchOpt("sound_gpslock");
1513 - if (conf->FetchOpt("sound_gpslost") != "")
1514 - wav_map["gpslost"] = conf->FetchOpt("sound_gpslost");
1515 - if (conf->FetchOpt("sound_alert") != "")
1516 - wav_map["alert"] = conf->FetchOpt("sound_alert");
1517 -
1518 - } else {
1519 - fprintf(stderr, "ERROR: Sound alerts enabled but no sound playing binary specified.\n");
1520 - sound = 0;
1521 - }
1522 - } else if (sound == -1)
1523 - sound = 0;
1524 -
1525 - /* Added by Shaw Innes 17/2/02 */
1526 - /* Modified by Andrew Etter 15/9/02 */
1527 - if (conf->FetchOpt("speech") == "true" && speech == -1) {
1528 - if (conf->FetchOpt("festival") != "") {
1529 - festival = strdup(conf->FetchOpt("festival").c_str());
1530 - speech = 1;
1531 -
1532 - if (conf->FetchOpt("flite") == "true")
1533 - flite = 1;
1534 -
1535 - string speechtype = conf->FetchOpt("speech_type");
1536 -
1537 - if (!strcasecmp(speechtype.c_str(), "nato"))
1538 - speech_encoding = SPEECH_ENCODING_NATO;
1539 - else if (!strcasecmp(speechtype.c_str(), "spell"))
1540 - speech_encoding = SPEECH_ENCODING_SPELL;
1541 - else
1542 - speech_encoding = SPEECH_ENCODING_NORMAL;
1543 -
1544 - // Make sure we have encrypted text lines
1545 - if (conf->FetchOpt("speech_encrypted") == "" || conf->FetchOpt("speech_unencrypted") == "") {
1546 - fprintf(stderr, "ERROR: Speech request but speech_encrypted or speech_unencrypted line missing.\n");
1547 - speech = 0;
1548 - }
1549 -
1550 - speech_sentence_encrypted = conf->FetchOpt("speech_encrypted");
1551 - speech_sentence_unencrypted = conf->FetchOpt("speech_unencrypted");
1552 - } else {
1553 - fprintf(stderr, "ERROR: Speech alerts enabled but no path to festival has been specified.\n");
1554 - speech = 0;
1555 - }
1556 - } else if (speech == -1)
1557 - speech = 0;
1558 -
1559 if (conf->FetchOpt("writeinterval") != "") {
1560 if (sscanf(conf->FetchOpt("writeinterval").c_str(), "%d", &datainterval) != 1) {
1561 fprintf(stderr, "FATAL: Illegal config file value for data interval.\n");
1562 @@ -1642,45 +1139,6 @@
1563 fprintf(stderr, "WARNING: No client_manuf file specified. Client manufacturers will not be detected.\n");
1564 }
1565
1566 - // Fork and find the sound options
1567 - if (sound) {
1568 - if (pipe(soundpair) == -1) {
1569 - fprintf(stderr, "WARNING: Unable to create pipe for audio. Disabling sound.\n");
1570 - sound = 0;
1571 - } else {
1572 - soundpid = fork();
1573 -
1574 - if (soundpid < 0) {
1575 - fprintf(stderr, "WARNING: Unable to fork for audio. Disabling sound.\n");
1576 - sound = 0;
1577 - } else if (soundpid == 0) {
1578 - SoundHandler(soundpair, sndplay.c_str(), wav_map);
1579 - exit(0);
1580 - }
1581 -
1582 - close(soundpair[0]);
1583 - }
1584 - }
1585 -
1586 - if (speech) {
1587 - if (pipe(speechpair) == -1) {
1588 - fprintf(stderr, "WARNING: Unable to create pipe for speech. Disabling speech.\n");
1589 - speech = 0;
1590 - } else {
1591 - speechpid = fork();
1592 -
1593 - if (speechpid < 0) {
1594 - fprintf(stderr, "WARNING: Unable to fork for speech. Disabling speech.\n");
1595 - speech = 0;
1596 - } else if (speechpid == 0) {
1597 - SpeechHandler(speechpair, festival);
1598 - exit(0);
1599 - }
1600 -
1601 - close(speechpair[0]);
1602 - }
1603 - }
1604 -
1605 // Grab the filtering
1606 string filter_bit;
1607
1608 @@ -1706,7 +1164,7 @@
1609 }
1610
1611 if ((filter_bit = conf->FetchOpt("filter_export")) != "") {
1612 - fprintf(stderr, "Enabling filtering on exported (csv, xml, network, gps) files.\n");
1613 + fprintf(stderr, "Enabling filtering on exported (csv, xml, network) files.\n");
1614 filter_export = 1;
1615 if (ConfigFile::ParseFilterLine(filter_bit, &filter_export_bssid, &filter_export_source,
1616 &filter_export_dest, &filter_export_bssid_invert,
1617 @@ -1812,14 +1270,6 @@
1618
1619 }
1620
1621 - if (waypoint) {
1622 - if ((waypoint_file = fopen(waypointfile.c_str(), "a")) == NULL) {
1623 - fprintf(stderr, "WARNING: Could not open waypoint file '%s' for writing: %s\n",
1624 - waypointfile.c_str(), strerror(errno));
1625 - waypoint = 0;
1626 - }
1627 - }
1628 -
1629 // Create all the logs and title/number them appropriately
1630 // We need to save this for after we toast the conf record
1631 int logfile_matched = 0;
1632 @@ -1839,13 +1289,6 @@
1633 continue;
1634 }
1635
1636 - if (crypt_log) {
1637 - cryptlogfile = conf->ExpandLogPath(conf->FetchOpt("logtemplate"), logname, "weak", run_num);
1638 -
1639 - if (cryptlogfile == "")
1640 - continue;
1641 - }
1642 -
1643 if (csv_log) {
1644 csvlogfile = conf->ExpandLogPath(conf->FetchOpt("logtemplate"), logname, "csv", run_num);
1645
1646 @@ -1867,13 +1310,6 @@
1647 continue;
1648 }
1649
1650 - if (gps_log == 1) {
1651 - gpslogfile = conf->ExpandLogPath(conf->FetchOpt("logtemplate"), logname, "gps", run_num);
1652 -
1653 - if (gpslogfile == "")
1654 - continue;
1655 - }
1656 -
1657 // if we made it this far we're cool -- all the logfiles we're writing to matched
1658 // this number
1659 logfile_matched = 1;
1660 @@ -1896,15 +1332,9 @@
1661 if (xml_log)
1662 fprintf(stderr, "Logging networks in XML format to %s\n", xmllogfile.c_str());
1663
1664 - if (crypt_log)
1665 - fprintf(stderr, "Logging cryptographically weak packets to %s\n", cryptlogfile.c_str());
1666 -
1667 if (cisco_log)
1668 fprintf(stderr, "Logging cisco product information to %s\n", ciscologfile.c_str());
1669
1670 - if (gps_log == 1)
1671 - fprintf(stderr, "Logging gps coordinates to %s\n", gpslogfile.c_str());
1672 -
1673 if (data_log)
1674 fprintf(stderr, "Logging data to %s\n", dumplogfile.c_str());
1675
1676 @@ -2051,7 +1481,6 @@
1677 { "dump-type", required_argument, 0, 'd' },
1678 { "max-packets", required_argument, 0, 'm' },
1679 { "quiet", no_argument, 0, 'q' },
1680 - { "gps", required_argument, 0, 'g' },
1681 { "port", required_argument, 0, 'p' },
1682 { "allowed-hosts", required_argument, 0, 'a' },
1683 { "bind-address", required_argument, 0, 'b'},
1684 @@ -2132,18 +1561,6 @@
1685 Usage(argv[0]);
1686 }
1687 break;
1688 - case 'g':
1689 - // GPS
1690 - if (strcmp(optarg, "off") == 0) {
1691 - gps_enable = 0;
1692 - }
1693 - else if (sscanf(optarg, "%1023[^:]:%d", gpshost, &gpsport) < 2) {
1694 - fprintf(stderr, "Invalid GPS host '%s' (host:port or off required)\n",
1695 - optarg);
1696 - gps_enable = 1;
1697 - Usage(argv[0]);
1698 - }
1699 - break;
1700 case 'p':
1701 // Port
1702 if (sscanf(optarg, "%d", &tcpport) != 1) {
1703 @@ -2165,7 +1582,6 @@
1704 break;
1705 case 'q':
1706 // Quiet
1707 - sound = 0;
1708 break;
1709 case 'v':
1710 // version
1711 @@ -2319,39 +1735,7 @@
1712 // And we're done
1713 fclose(pid_file);
1714
1715 -
1716 - // Set up the GPS object to give to the children
1717 - if (gpsport == -1 && gps_enable) {
1718 - if (conf->FetchOpt("gps") == "true") {
1719 - if (sscanf(conf->FetchOpt("gpshost").c_str(), "%1023[^:]:%d", gpshost,
1720 - &gpsport) != 2) {
1721 - fprintf(stderr, "Invalid GPS host in config (host:port required)\n");
1722 - exit(1);
1723 - }
1724 -
1725 - gps_enable = 1;
1726 - } else {
1727 - gps_enable = 0;
1728 - gps_log = 0;
1729 - }
1730 - }
1731 -
1732 - if (gps_enable == 1) {
1733 - gps = new GPSD(gpshost, gpsport);
1734 -
1735 - // Lock GPS position
1736 - if (conf->FetchOpt("gpsmodelock") == "true") {
1737 - fprintf(stderr, "Enabling GPS position lock override (broken GPS unit "
1738 - "reports 0 always)\n");
1739 - gps->SetOptions(GPSD_OPT_FORCEMODE);
1740 - }
1741 -
1742 - } else {
1743 - gps_log = 0;
1744 - }
1745 -
1746 // Register the gps and timetracker with the sourcetracker
1747 - sourcetracker.AddGpstracker(gps);
1748 sourcetracker.AddTimetracker(&timetracker);
1749
1750 // Handle errors here maybe in the future
1751 @@ -2518,13 +1902,6 @@
1752 fprintf(stderr, "Dump file format: %s\n", dumpfile->FetchType());
1753 }
1754
1755 - if (gps_enable && gps_log == 1) {
1756 - if (gpsdump.OpenDump(gpslogfile.c_str(), xmllogfile.c_str()) < 0) {
1757 - fprintf(stderr, "FATAL: GPS dump error: %s\n", gpsdump.FetchError());
1758 - ErrorShutdown();
1759 - }
1760 - }
1761 -
1762 // Open our files first to make sure we can, we'll unlink the empties later.
1763 FILE *testfile = NULL;
1764 if (net_log) {
1765 @@ -2567,18 +1944,6 @@
1766 fclose(testfile);
1767 }
1768
1769 - // Crypt log stays open like the dump log for continual writing
1770 - if (crypt_log) {
1771 - cryptfile = new AirsnortDumpFile;
1772 -
1773 - if (cryptfile->OpenDump(cryptlogfile.c_str()) < 0) {
1774 - fprintf(stderr, "FATAL: %s\n", cryptfile->FetchError());
1775 - ErrorShutdown();
1776 - }
1777 -
1778 - fprintf(stderr, "Crypt file format: %s\n", cryptfile->FetchType());
1779 -
1780 - }
1781
1782 snprintf(status, STATUS_MAX, "Kismet %s.%s.%s (%s)",
1783 VERSION_MAJOR, VERSION_MINOR, VERSION_TINY, servername);
1784 @@ -2595,15 +1960,13 @@
1785 }
1786 */
1787
1788 - if (data_log || net_log || crypt_log) {
1789 - snprintf(status, STATUS_MAX, "Logging%s%s%s%s%s%s%s",
1790 + if (data_log || net_log) {
1791 + snprintf(status, STATUS_MAX, "Logging%s%s%s%s%s",
1792 data_log ? " data" : "" ,
1793 net_log ? " networks" : "" ,
1794 csv_log ? " CSV" : "" ,
1795 xml_log ? " XML" : "" ,
1796 - crypt_log ? " weak" : "",
1797 - cisco_log ? " cisco" : "",
1798 - gps_log == 1 ? " gps" : "");
1799 + cisco_log ? " cisco" : "");
1800 fprintf(stderr, "%s\n", status);
1801 } else if (no_log) {
1802 snprintf(status, STATUS_MAX, "Not logging any data.");
1803 @@ -2621,23 +1984,6 @@
1804 }
1805 }
1806
1807 - if (gps_enable) {
1808 - // Open the GPS
1809 - if (gps->OpenGPSD() < 0) {
1810 - fprintf(stderr, "%s\n", gps->FetchError());
1811 -
1812 - gps_enable = 0;
1813 - gps_log = 0;
1814 - } else {
1815 - fprintf(stderr, "Opened GPS connection to %s port %d\n",
1816 - gpshost, gpsport);
1817 -
1818 - gpsmode = gps->FetchMode();
1819 -
1820 - last_gpsd_reconnect = time(0);
1821 - }
1822 - }
1823 -
1824 fprintf(stderr, "Listening on port %d.\n", tcpport);
1825 for (unsigned int ipvi = 0; ipvi < legal_ipblock_vec.size(); ipvi++) {
1826 char *netaddr = strdup(inet_ntoa(legal_ipblock_vec[ipvi]->network));
1827 @@ -2678,8 +2024,6 @@
1828 &Protocol_NETWORK, &ProtocolNetworkEnable);
1829 client_ref = ui_server.RegisterProtocol("CLIENT", 0, CLIENT_fields_text,
1830 &Protocol_CLIENT, &ProtocolClientEnable);
1831 - gps_ref = ui_server.RegisterProtocol("GPS", 0, GPS_fields_text,
1832 - &Protocol_GPS, NULL);
1833 info_ref = ui_server.RegisterProtocol("INFO", 0, INFO_fields_text,
1834 &Protocol_INFO, NULL);
1835 remove_ref = ui_server.RegisterProtocol("REMOVE", 0, REMOVE_fields_text,
1836 @@ -2734,14 +2078,9 @@
1837 // Write network info and tick the tracker once per second
1838 timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &NetWriteEvent, NULL);
1839 timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &TrackerTickEvent, NULL);
1840 - // Update GPS coordinates and handle signal loss if defined
1841 - timetracker.RegisterTimer(SERVER_TIMESLICES_SEC, NULL, 1, &GpsEvent, NULL);
1842 // Sync the data files if requested
1843 if (datainterval > 0 && no_log == 0)
1844 timetracker.RegisterTimer(datainterval * SERVER_TIMESLICES_SEC, NULL, 1, &ExportSyncEvent, NULL);
1845 - // Write waypoints if requested
1846 - if (waypoint)
1847 - timetracker.RegisterTimer(decay * SERVER_TIMESLICES_SEC, NULL, 1, &WaypointSyncEvent, NULL);
1848 // Channel hop if requested
1849 if (channel_hop) {
1850 if (channel_dwell)
1851 @@ -2765,7 +2104,6 @@
1852 snprintf(status, 1024, "%s", TIMESTAMP);
1853 kdata.timestamp = status;
1854
1855 - time_t last_click = 0;
1856 int num_networks = 0, num_packets = 0, num_noise = 0, num_dropped = 0;
1857
1858
1859 @@ -2914,54 +2252,12 @@
1860
1861 }
1862
1863 - if (gps_log == 1 && info.type != packet_noise &&
1864 - info.type != packet_unknown && info.type != packet_phy &&
1865 - info.corrupt == 0) {
1866 - if (gpsdump.DumpPacket(&info) < 0) {
1867 - snprintf(status, STATUS_MAX, "%s", gpsdump.FetchError());
1868 - if (!silent || NetWriteStatus(status) == 0)
1869 - fprintf(stderr, "%s\n", status);
1870 - }
1871 - }
1872 -
1873 // tracker.ProcessPacket(info);
1874 tracker.ProcessPacket(&packet, &info, &bssid_wep_map,
1875 wep_identity);
1876 -
1877 - if (tracker.FetchNumNetworks() > num_networks) {
1878 - if (sound == 1)
1879 - if (info.crypt_set &&
1880 - wav_map.find("new_wep") != wav_map.end())
1881 - sound = PlaySound("new_wep");
1882 - else
1883 - sound = PlaySound("new");
1884 - if (speech == 1) {
1885 - string text;
1886 -
1887 - if (info.crypt_set)
1888 - text = ExpandSpeechString(speech_sentence_encrypted, &info,
1889 - speech_encoding);
1890 - else
1891 - text = ExpandSpeechString(speech_sentence_unencrypted,
1892 - &info, speech_encoding);
1893 -
1894 - speech = SayText(MungeToShell(text).c_str());
1895 - }
1896 - }
1897 num_networks = tracker.FetchNumNetworks();
1898
1899 if (tracker.FetchNumPackets() != num_packets) {
1900 - if (cur_time - last_click >= decay && sound == 1) {
1901 - if (tracker.FetchNumPackets() - num_packets >
1902 - tracker.FetchNumDropped() + localdropnum - num_dropped) {
1903 - sound = PlaySound("traffic");
1904 - } else {
1905 - sound = PlaySound("junktraffic");
1906 - }
1907 -
1908 - last_click = cur_time;
1909 - }
1910 -
1911 num_packets = tracker.FetchNumPackets();
1912 num_noise = tracker.FetchNumNoise();
1913 num_dropped = tracker.FetchNumDropped() + localdropnum;
1914 @@ -3070,10 +2366,6 @@
1915 }
1916 }
1917
1918 - if (crypt_log) {
1919 - cryptfile->DumpPacket(&info, &packet);
1920 - }
1921 -
1922 } else if (ret < 0) {
1923 // Fail on error
1924 snprintf(status, STATUS_MAX, "FATAL: %s",
1925 diff -urN kismet.old/kismet_server.h kismet.dev/kismet_server.h
1926 --- kismet.old/kismet_server.h 2005-07-25 16:19:44.000000000 +0200
1927 +++ kismet.dev/kismet_server.h 2005-08-15 00:29:19.088681928 +0200
1928 @@ -33,10 +33,6 @@
1929 void handle_command(TcpServer *tcps, client_command *cc);
1930 int NetWriteStatus(const char *in_status);
1931 void NetWriteInfo();
1932 -int SayText(string in_text);
1933 -int PlaySound(string in_sound);
1934 -void SpeechHandler(int *fds, const char *player);
1935 -void SoundHandler(int *fds, const char *player, map<string, string> soundmap);
1936 void ProtocolAlertEnable(int in_fd);
1937 void ProtocolNetworkEnable(int in_fd);
1938 void ProtocolClientEnable(int in_fd);
1939 diff -urN kismet.old/packet.cc kismet.dev/packet.cc
1940 --- kismet.old/packet.cc 2005-07-25 16:19:44.000000000 +0200
1941 +++ kismet.dev/packet.cc 2005-08-15 00:30:26.190480904 +0200
1942 @@ -257,14 +257,6 @@
1943 ret_packinfo->encoding = packet->encoding;
1944 ret_packinfo->datarate = packet->datarate;
1945
1946 - // Assign the location info
1947 - ret_packinfo->gps_lat = packet->gps_lat;
1948 - ret_packinfo->gps_lon = packet->gps_lon;
1949 - ret_packinfo->gps_alt = packet->gps_alt;
1950 - ret_packinfo->gps_spd = packet->gps_spd;
1951 - ret_packinfo->gps_heading = packet->gps_heading;
1952 - ret_packinfo->gps_fix = packet->gps_fix;
1953 -
1954 // Assign a hardware channel if we're on an 802.11a carrier since the beacon doesn't
1955 // carry that tag
1956 if (packet->carrier == carrier_80211a)
1957 diff -urN kismet.old/packetracker.cc kismet.dev/packetracker.cc
1958 --- kismet.old/packetracker.cc 2005-07-25 16:19:44.000000000 +0200
1959 +++ kismet.dev/packetracker.cc 2005-08-15 00:58:01.441313736 +0200
1960 @@ -255,19 +255,6 @@
1961
1962 client->metric = net->metric;
1963
1964 - if (info->gps_fix >= 2) {
1965 - client->gps_fixed = info->gps_fix;
1966 - client->min_lat = client->max_lat = info->gps_lat;
1967 - client->min_lon = client->max_lon = info->gps_lon;
1968 - client->min_alt = client->max_alt = info->gps_alt;
1969 - client->min_spd = client->max_spd = info->gps_spd;
1970 -
1971 - client->aggregate_lat = info->gps_lat;
1972 - client->aggregate_lon = info->gps_lon;
1973 - client->aggregate_alt = info->gps_alt;
1974 - client->aggregate_points = 1;
1975 - }
1976 -
1977 // Classify the client. We'll call no-distrib packets (lucent)
1978 // inter-distrib clients since it's not an end-user bridge into the
1979 // network, it's a lucent AP talking to another one.
1980 @@ -410,19 +397,6 @@
1981 KisLocalStatus(status);
1982 }
1983
1984 - if (info->gps_fix >= 2) {
1985 - net->gps_fixed = info->gps_fix;
1986 - net->min_lat = net->max_lat = info->gps_lat;
1987 - net->min_lon = net->max_lon = info->gps_lon;
1988 - net->min_alt = net->max_alt = info->gps_alt;
1989 - net->min_spd = net->max_spd = info->gps_spd;
1990 -
1991 - net->aggregate_lat = info->gps_lat;
1992 - net->aggregate_lon = info->gps_lon;
1993 - net->aggregate_alt = info->gps_alt;
1994 - net->aggregate_points = 1;
1995 - }
1996 -
1997 // Find out what we can from what we know now...
1998 if (net->type != network_adhoc && net->type != network_probe) {
1999 net->manuf_ref = MatchBestManuf(ap_manuf_map, net->bssid, net->ssid,
2000 @@ -463,11 +437,6 @@
2001
2002 if (info->signal > net->best_signal || net->best_signal == 0) {
2003 net->best_signal = info->signal;
2004 - if (info->gps_fix >= 2) {
2005 - net->best_lat = info->gps_lat;
2006 - net->best_lon = info->gps_lon;
2007 - net->best_alt = info->gps_alt;
2008 - }
2009 }
2010
2011 net->noise = info->noise;
2012 @@ -477,41 +446,6 @@
2013 net->best_noise = info->noise;
2014 }
2015
2016 - if (info->gps_fix >= 2) {
2017 - // Don't aggregate slow-moving packets to prevent average "pulling"..
2018 - if (info->gps_spd <= 0.3) {
2019 - net->aggregate_lat += info->gps_lat;
2020 - net->aggregate_lon += info->gps_lon;
2021 - net->aggregate_alt += info->gps_alt;
2022 - net->aggregate_points += 1;
2023 - }
2024 -
2025 - net->gps_fixed = info->gps_fix;
2026 -
2027 - if (info->gps_lat < net->min_lat || net->min_lat == -90)
2028 - net->min_lat = info->gps_lat;
2029 - if (info->gps_lat > net->max_lat || net->max_lat == 90)
2030 - net->max_lat = info->gps_lat;
2031 -
2032 - if (info->gps_lon < net->min_lon || net->min_lon == -180)
2033 - net->min_lon = info->gps_lon;
2034 - if (info->gps_lon > net->max_lon || net->max_lon == 180)
2035 - net->max_lon = info->gps_lon;
2036 -
2037 - if (info->gps_alt < net->min_alt || net->min_alt == 0)
2038 - net->min_alt = info->gps_alt;
2039 - if (info->gps_alt > net->max_alt || net->max_alt == 0)
2040 - net->max_alt = info->gps_alt;
2041 -
2042 - if (info->gps_spd < net->min_spd || net->min_spd == 0)
2043 - net->min_spd = info->gps_spd;
2044 - if (info->gps_spd > net->max_spd || net->max_spd == 0)
2045 - net->max_spd = info->gps_spd;
2046 -
2047 - } else {
2048 - net->gps_fixed = 0;
2049 - }
2050 -
2051 // Handle the IV sets. 4-byte compare IV is fine
2052 if (info->encrypted) {
2053 map<uint32_t, int>::iterator ivitr = net->iv_map.find(info->ivset);
2054 @@ -834,50 +768,11 @@
2055 }
2056 }
2057
2058 - if (info->gps_fix >= 2) {
2059 - if (info->gps_spd <= 0.3) {
2060 - client->aggregate_lat += info->gps_lat;
2061 - client->aggregate_lon += info->gps_lon;
2062 - client->aggregate_alt += info->gps_alt;
2063 - client->aggregate_points += 1;
2064 - }
2065 -
2066 - client->gps_fixed = info->gps_fix;
2067 -
2068 - if (info->gps_lat < client->min_lat || client->min_lat == -90)
2069 - client->min_lat = info->gps_lat;
2070 - if (info->gps_lat > client->max_lat || client->max_lat == 90)
2071 - client->max_lat = info->gps_lat;
2072 -
2073 - if (info->gps_lon < client->min_lon || client->min_lon == -180)
2074 - client->min_lon = info->gps_lon;
2075 - if (info->gps_lon > client->max_lon == 180)
2076 - client->max_lon = info->gps_lon;
2077 -
2078 - if (info->gps_alt < client->min_alt || client->min_alt == 0)
2079 - client->min_alt = info->gps_alt;
2080 - if (info->gps_alt > client->max_alt || client->min_alt == 0)
2081 - client->max_alt = info->gps_alt;
2082 -
2083 - if (info->gps_spd < client->min_spd || client->min_spd == 0)
2084 - client->min_spd = info->gps_spd;
2085 - if (info->gps_spd > client->max_spd || client->max_spd == 0)
2086 - client->max_spd = info->gps_spd;
2087 -
2088 - } else {
2089 - client->gps_fixed = 0;
2090 - }
2091 -
2092 if (info->signal >= 0) {
2093 client->signal = info->signal;
2094
2095 if (info->signal > client->best_signal || client->best_signal == 0) {
2096 client->best_signal = info->signal;
2097 - if (info->gps_fix >= 2) {
2098 - client->best_lat = info->gps_lat;
2099 - client->best_lon = info->gps_lon;
2100 - client->best_alt = info->gps_alt;
2101 - }
2102 }
2103
2104 net->noise = info->noise;
2105 @@ -1416,17 +1311,6 @@
2106 (net->llc_packets + net->data_packets),
2107 ft, lt);
2108
2109 - if (net->gps_fixed != -1)
2110 - fprintf(netfile,
2111 - " Min Loc: Lat %f Lon %f Alt %f Spd %f\n"
2112 - " Max Loc: Lat %f Lon %f Alt %f Spd %f\n",
2113 - net->min_lat, net->min_lon,
2114 - metric ? net->min_alt / 3.3 : net->min_alt,
2115 - metric ? net->min_spd * 1.6093 : net->min_spd,
2116 - net->max_lat, net->max_lon,
2117 - metric ? net->max_alt / 3.3 : net->max_alt,
2118 - metric ? net->max_spd * 1.6093 : net->max_spd);
2119 -
2120 if (net->ipdata.atype == address_dhcp)
2121 fprintf(netfile, " Address found via DHCP %d.%d.%d.%d \n",
2122 net->ipdata.range_ip[0], net->ipdata.range_ip[1],
2123 @@ -1634,8 +1518,7 @@
2124
2125 fprintf(netfile, "Network;NetType;ESSID;BSSID;Info;Channel;Cloaked;Encryption;Decrypted;MaxRate;MaxSeenRate;Beacon;"
2126 "LLC;Data;Crypt;Weak;Total;Carrier;Encoding;FirstTime;LastTime;BestQuality;BestSignal;BestNoise;"
2127 - "GPSMinLat;GPSMinLon;GPSMinAlt;GPSMinSpd;GPSMaxLat;GPSMaxLon;GPSMaxAlt;GPSMaxSpd;"
2128 - "GPSBestLat;GPSBestLon;GPSBestAlt;DataSize;IPType;IP;\n\r");
2129 + "DataSize;IPType;IP;\n\r");
2130
2131 stable_sort(network_list.begin(), network_list.end(), SortFirstTimeLT());
2132
2133 @@ -1819,9 +1702,6 @@
2134 "%d;%d;%d;%d;%d;"
2135 "%s;%s;%s;%s;"
2136 "%d;%d;%d;"
2137 - "%f;%f;%f;%f;"
2138 - "%f;%f;%f;%f;"
2139 - "%f;%f;%f;"
2140 "%ld;%s;"
2141 "%hu.%hu.%hu.%hu;\n\r",
2142 netnum, type, SanitizeCSV(net->ssid).c_str(),
2143 @@ -1835,9 +1715,6 @@
2144 (net->llc_packets + net->data_packets),
2145 carrier.c_str(), encoding.c_str(), ft, lt,
2146 net->best_quality, net->best_signal, net->best_noise,
2147 - net->min_lat, net->min_lon, net->min_alt, net->min_spd,
2148 - net->max_lat, net->max_lon, net->max_alt, net->max_spd,
2149 - net->best_lat, net->best_lon, net->best_alt,
2150 net->datasize, iptype.c_str(),
2151 net->ipdata.range_ip[0], net->ipdata.range_ip[1],
2152 net->ipdata.range_ip[2], net->ipdata.range_ip[3]);
2153 @@ -2056,23 +1933,6 @@
2154
2155 fprintf(netfile, " <datasize>%ld</datasize>\n", net->datasize);
2156
2157 - if (net->gps_fixed != -1) {
2158 - fprintf(netfile, " <gps-info unit=\"%s\">\n", metric ? "metric" : "english");
2159 - fprintf(netfile, " <min-lat>%f</min-lat>\n", net->min_lat);
2160 - fprintf(netfile, " <min-lon>%f</min-lon>\n", net->min_lon);
2161 - fprintf(netfile, " <min-alt>%f</min-alt>\n",
2162 - metric ? net->min_alt / 3.3 : net->min_alt);
2163 - fprintf(netfile, " <min-spd>%f</min-spd>\n",
2164 - metric ? net->min_spd * 1.6093 : net->min_spd);
2165 - fprintf(netfile, " <max-lat>%f</max-lat>\n", net->max_lat);
2166 - fprintf(netfile, " <max-lon>%f</max-lon>\n", net->max_lon);
2167 - fprintf(netfile, " <max-alt>%f</max-alt>\n",
2168 - metric ? net->max_alt / 3.3 : net->max_alt);
2169 - fprintf(netfile, " <max-spd>%f</max-spd>\n",
2170 - metric ? net->max_spd * 1.6093 : net->max_spd);
2171 - fprintf(netfile, " </gps-info>\n");
2172 - }
2173 -
2174 if (net->ipdata.atype > address_factory) {
2175 char *addrtype;
2176 switch (net->ipdata.atype) {
2177 @@ -2171,23 +2031,6 @@
2178 if (cli->crypt_set & crypt_pptp)
2179 fprintf(netfile, " <client-encryption>PPTP</client-encryption>\n");
2180
2181 - if (cli->gps_fixed != -1) {
2182 - fprintf(netfile, " <client-gps-info unit=\"%s\">\n", metric ? "metric" : "english");
2183 - fprintf(netfile, " <client-min-lat>%f</client-min-lat>\n", cli->min_lat);
2184 - fprintf(netfile, " <client-min-lon>%f</client-min-lon>\n", cli->min_lon);
2185 - fprintf(netfile, " <client-min-alt>%f</client-min-alt>\n",
2186 - metric ? cli->min_alt / 3.3 : cli->min_alt);
2187 - fprintf(netfile, " <client-min-spd>%f</client-min-spd>\n",
2188 - metric ? cli->min_spd * 1.6093 : cli->min_spd);
2189 - fprintf(netfile, " <client-max-lat>%f</client-max-lat>\n", cli->max_lat);
2190 - fprintf(netfile, " <client-max-lon>%f</client-max-lon>\n", cli->max_lon);
2191 - fprintf(netfile, " <client-max-alt>%f</client-max-alt>\n",
2192 - metric ? cli->max_alt / 3.3 : cli->max_alt);
2193 - fprintf(netfile, " <client-max-spd>%f</client-max-spd>\n",
2194 - metric ? cli->max_spd * 1.6093 : cli->max_spd);
2195 - fprintf(netfile, " </client-gps-info>\n");
2196 - }
2197 -
2198 fprintf(netfile, " <client-datasize>%ld</client-datasize>\n", cli->datasize);
2199 fprintf(netfile, " <client-maxrate>%2.1f</client-maxrate>\n", cli->maxrate);
2200 fprintf(netfile, " <client-maxseenrate>%ld</client-maxseenrate>\n", (long) cli->maxseenrate * 100);
2201 @@ -2437,23 +2280,3 @@
2202
2203 }
2204
2205 -// Write a gpsdrive compatable waypoint file
2206 -int Packetracker::WriteGpsdriveWaypt(FILE *in_file) {
2207 - fseek(in_file, 0L, SEEK_SET);
2208 - ftruncate(fileno(in_file), 0);
2209 -
2210 - // Convert the map to a vector and sort it
2211 - for (map<mac_addr, wireless_network *>::const_iterator i = bssid_map.begin();
2212 - i != bssid_map.end(); ++i) {
2213 - wireless_network *net = i->second;
2214 -
2215 - float lat, lon;
2216 - lat = (net->min_lat + net->max_lat) / 2;
2217 - lon = (net->min_lon + net->max_lon) / 2;
2218 - fprintf(in_file, "%s\t%f %f\n", net->bssid.Mac2String().c_str(), lat, lon);
2219 - }
2220 -
2221 - fflush(in_file);
2222 -
2223 - return 1;
2224 -}
2225 diff -urN kismet.old/packetracker.h kismet.dev/packetracker.h
2226 --- kismet.old/packetracker.h 2005-07-25 16:19:44.000000000 +0200
2227 +++ kismet.dev/packetracker.h 2005-08-15 00:32:27.876981744 +0200
2228 @@ -30,7 +30,6 @@
2229 #include <string>
2230
2231 #include "util.h"
2232 -#include "gpsd.h"
2233 #include "packet.h"
2234 #include "tracktypes.h"
2235 #include "manuf.h"
2236 @@ -85,8 +84,6 @@
2237 int WriteXMLNetworks(string in_fname);
2238 int WriteCisco(string in_fname);
2239
2240 - int WriteGpsdriveWaypt(FILE *in_file);
2241 -
2242 void WriteSSIDMap(FILE *in_file);
2243 void ReadSSIDMap(FILE *in_file);
2244
2245 diff -urN kismet.old/packetsourcetracker.cc kismet.dev/packetsourcetracker.cc
2246 --- kismet.old/packetsourcetracker.cc 2005-07-25 16:19:44.000000000 +0200
2247 +++ kismet.dev/packetsourcetracker.cc 2005-08-15 00:33:14.628874376 +0200
2248 @@ -24,7 +24,6 @@
2249 Packetsourcetracker::Packetsourcetracker() {
2250 next_packsource_id = 0;
2251 next_meta_id = 0;
2252 - gpsd = NULL;
2253 timetracker = NULL;
2254 chanchild_pid = 0;
2255 sockpair[0] = sockpair[1] = 0;
2256 @@ -691,7 +690,6 @@
2257
2258 // Register the trackers with it
2259 meta->capsource->AddTimetracker(timetracker);
2260 - meta->capsource->AddGpstracker(gpsd);
2261
2262 // Open it
2263 fprintf(stderr, "Source %d (%s): Opening %s source interface %s...\n",
2264 diff -urN kismet.old/packetsourcetracker.h kismet.dev/packetsourcetracker.h
2265 --- kismet.old/packetsourcetracker.h 2005-07-25 16:19:44.000000000 +0200
2266 +++ kismet.dev/packetsourcetracker.h 2005-08-15 00:33:28.304795320 +0200
2267 @@ -30,7 +30,6 @@
2268 #include <string>
2269
2270 #include "timetracker.h"
2271 -#include "gpsd.h"
2272 #include "packetsource.h"
2273
2274 // Sentinel for starting a new packet
2275 @@ -144,9 +143,6 @@
2276 // Register a timer event handler for us to use
2277 void AddTimetracker(Timetracker *in_tracker) { timetracker = in_tracker; }
2278
2279 - // Register the GPS server for us to use
2280 - void AddGpstracker(GPSD *in_gpsd) { gpsd = in_gpsd; }
2281 -
2282 // Register a packet prototype source... Card type string, root binding requirement,
2283 // function to generate an instance of the source, and function to change channel
2284 // for this card type. This fills out the prototype. Sources that don't hop
2285 @@ -221,7 +217,6 @@
2286 uint16_t channel;
2287 } chanchild_changepacket;
2288
2289 - GPSD *gpsd;
2290 Timetracker *timetracker;
2291
2292 char errstr[1024];
2293 diff -urN kismet.old/packetstream.h kismet.dev/packetstream.h
2294 --- kismet.old/packetstream.h 2005-07-25 16:19:44.000000000 +0200
2295 +++ kismet.dev/packetstream.h 2005-08-15 00:33:45.954112216 +0200
2296 @@ -45,7 +45,6 @@
2297
2298 typedef struct stream_version_packet {
2299 uint16_t drone_version;
2300 - uint8_t gps_enabled;
2301 };
2302
2303 typedef struct stream_packet_header {
2304 @@ -64,18 +63,6 @@
2305 uint8_t encoding __attribute__ ((packed));
2306 uint32_t datarate __attribute__ ((packed));
2307
2308 - int16_t gps_lat __attribute__ ((packed));
2309 - int64_t gps_lat_mant __attribute__ ((packed));
2310 - int16_t gps_lon __attribute__ ((packed));
2311 - int64_t gps_lon_mant __attribute__ ((packed));
2312 - int16_t gps_alt __attribute__ ((packed));
2313 - int64_t gps_alt_mant __attribute__ ((packed));
2314 - int16_t gps_spd __attribute__ ((packed));
2315 - int64_t gps_spd_mant __attribute__ ((packed));
2316 - int16_t gps_heading __attribute__ ((packed));
2317 - int64_t gps_heading_mant __attribute__ ((packed));
2318 - int8_t gps_fix __attribute__ ((packed));
2319 -
2320 uint8_t sourcename[32] __attribute__ ((packed));
2321 };
2322
2323 diff -urN kismet.old/panelfront.cc kismet.dev/panelfront.cc
2324 --- kismet.old/panelfront.cc 2005-07-25 16:19:44.000000000 +0200
2325 +++ kismet.dev/panelfront.cc 2005-08-15 01:09:42.017809920 +0200
2326 @@ -37,7 +37,6 @@
2327 " Key Action",
2328 " e List Kismet servers",
2329 " z Toggle fullscreen zoom of network view",
2330 - " m Toggle muting of sound and speech",
2331 " t Tag (or untag) selected network",
2332 " g Group tagged networks",
2333 " u Ungroup current group",
2334 @@ -237,19 +236,6 @@
2335 };
2336
2337
2338 -char *KismetHelpGps[] = {
2339 - "KISMET NETWORK FOLLOW",
2340 - "This panel estimates the center of a network, the current",
2341 - "direction of travel, and the direction of the network center",
2342 - "and distance relative to the current direction of movement.",
2343 - " Key Action",
2344 - " s Follow location of strongest packet",
2345 - " c Follow location of estimated network center",
2346 - " q Close popup",
2347 - NULL
2348 -};
2349 -
2350 -
2351 char *KismetHelpStats[] = {
2352 "KISMET NETWORK STATISTICS",
2353 "This panel displays overall statistics about the wireless",
2354 @@ -678,7 +664,6 @@
2355 }
2356
2357 // Enable all the protocols we handle
2358 - in_client->EnableProtocol("GPS");
2359 in_client->EnableProtocol("INFO");
2360 in_client->EnableProtocol("REMOVE");
2361 in_client->EnableProtocol("NETWORK");
2362 @@ -1282,27 +1267,6 @@
2363 if (con->client == NULL)
2364 continue;
2365
2366 - // Update GPS
2367 - float newlat, newlon, newalt, newspd, newheading;
2368 - int newfix;
2369 - con->client->FetchLoc(&newlat, &newlon, &newalt, &newspd, &newheading, &newfix);
2370 -
2371 - if (GPSD::EarthDistance(newlat, newlon, last_lat, last_lon) > 10) {
2372 - con->last_lat = con->lat;
2373 - con->last_lon = con->lon;
2374 - con->last_spd = con->spd;
2375 - con->last_alt = con->alt;
2376 - con->last_fix = con->fix;
2377 - con->last_heading = con->heading;
2378 - }
2379 -
2380 - con->lat = newlat;
2381 - con->lon = newlon;
2382 - con->alt = newalt;
2383 - con->spd = newspd;
2384 - con->heading = newheading;
2385 - con->fix = newfix;
2386 -
2387 // Update quality
2388 con->quality = con->client->FetchQuality();
2389 con->power = con->client->FetchPower();
2390 diff -urN kismet.old/panelfront.h kismet.dev/panelfront.h
2391 --- kismet.old/panelfront.h 2005-07-25 16:19:44.000000000 +0200
2392 +++ kismet.dev/panelfront.h 2005-08-15 00:34:52.481998440 +0200
2393 @@ -65,7 +65,6 @@
2394 #define SORT_SIZE 10
2395 extern char *KismetHelpPower[];
2396 extern char *KismetHelpRate[];
2397 -extern char *KismetHelpGps[];
2398 extern char *KismetHelpStats[];
2399 extern char *KismetHelpDump[];
2400 extern char *KismetHelpPack[];
2401 @@ -269,7 +268,6 @@
2402 int RatePrinter(void *in_window);
2403 int StatsPrinter(void *in_window);
2404 int PackPrinter(void *in_window);
2405 - int GpsPrinter(void *in_window);
2406 int AlertPrinter(void *in_window);
2407
2408 int MainClientPrinter(void *in_window);
2409 @@ -298,7 +296,6 @@
2410 int PackInput(void *in_window, int in_chr);
2411 // Help has a generic handler
2412 int TextInput(void *in_window, int in_chr);
2413 - int GpsInput(void *in_window, int in_chr);
2414 int AlertInput(void *in_window, int in_chr);
2415
2416 int MainClientInput(void *in_window, int in_chr);
2417 diff -urN kismet.old/panelfront_display.cc kismet.dev/panelfront_display.cc
2418 --- kismet.old/panelfront_display.cc 2005-07-25 16:19:44.000000000 +0200
2419 +++ kismet.dev/panelfront_display.cc 2005-08-15 00:35:58.199007936 +0200
2420 @@ -727,56 +727,6 @@
2421 mvwaddstr(netwin, netwin->_maxy, netwin->_maxx - 14, ptxt);
2422 }
2423
2424 -#ifdef HAVE_GPS
2425 -
2426 -
2427 - if (!(lat == 0 && lon == 0 && alt == 0 && spd == 0 && fix == 0)) {
2428 -
2429 - char gpsdata[80];
2430 - char fixstr[16];
2431 - float show_alt = alt;
2432 - float show_spd = spd;
2433 -
2434 - if (metric) {
2435 - show_alt = alt / 3.3;
2436 - show_spd = spd * 1.6093;
2437 - }
2438 -
2439 - if (fix == -1)
2440 - snprintf(fixstr, 16, "No signal");
2441 - else if (fix == 2)
2442 - snprintf(fixstr, 5, "2D");
2443 - else if (fix == 3)
2444 - snprintf(fixstr, 5, "3D");
2445 - else
2446 - snprintf(fixstr, 5, "NONE");
2447 -
2448 - // Convert if we're less than a mile/hr or kilom/hr
2449 - int spdslow = 0;
2450 - if (spd < 0.5) {
2451 - spdslow = 1;
2452 - if (metric)
2453 - show_spd = spd * 0.2778;
2454 - else
2455 - show_spd = spd * 1.4667;
2456 - }
2457 -
2458 - snprintf(gpsdata, 80, "Lat %.3f Lon %.3f Alt %.1f%c Spd %.3f%s Hed %.3f Fix %s",
2459 - lat, lon, show_alt,
2460 - metric ? 'm' : 'f',
2461 - show_spd,
2462 - spdslow ? (metric ? "m/s" : "f/s") : (metric ? "km/h" : "m/h"),
2463 - heading,
2464 - fixstr);
2465 -
2466 - if (color)
2467 - wattrset(kwin->win, color_map["monitor"].pair);
2468 - mvwaddstr(netwin, netwin->_maxy, 2, gpsdata);
2469 - if (color)
2470 - wattrset(kwin->win, color_map["text"].pair);
2471 -
2472 - }
2473 -#endif
2474
2475
2476 return 1;
2477 @@ -1496,51 +1446,6 @@
2478 snprintf(output, print_width, "Networks: %d", (int) details_network->networks.size());
2479 kwin->text.push_back(output);
2480
2481 - if (details_network->virtnet->gps_fixed != -1) {
2482 - if ((details_network->virtnet->min_lat == 90) && (details_network->virtnet->min_lon == 180) &&
2483 - (details_network->virtnet->max_lat == -90) && (details_network->virtnet->max_lon == -180)) {
2484 - snprintf(output, print_width, "Min Loc : N/A");
2485 - kwin->text.push_back(output);
2486 - snprintf(output, print_width, "Max Loc : N/A");
2487 - kwin->text.push_back(output);
2488 - snprintf(output, print_width, "Range : N/A");
2489 - kwin->text.push_back(output);
2490 - }
2491 - else {
2492 - snprintf(output, print_width, "Min Loc : Lat %f Lon %f Alt %f Spd %f",
2493 - details_network->virtnet->min_lat, details_network->virtnet->min_lon,
2494 - metric ? details_network->virtnet->min_alt / 3.3 : details_network->virtnet->min_alt,
2495 - metric ? details_network->virtnet->min_spd * 1.6093 : details_network->virtnet->min_spd);
2496 - kwin->text.push_back(output);
2497 - snprintf(output, print_width, "Max Loc : Lat %f Lon %f Alt %f Spd %f",
2498 - details_network->virtnet->max_lat, details_network->virtnet->max_lon,
2499 - metric ? details_network->virtnet->max_alt / 3.3 : details_network->virtnet->max_alt,
2500 - metric ? details_network->virtnet->max_spd * 1.6093 : details_network->virtnet->max_spd);
2501 - kwin->text.push_back(output);
2502 -
2503 - double diagdist = GPSD::EarthDistance(details_network->virtnet->min_lat,
2504 - details_network->virtnet->min_lon,
2505 - details_network->virtnet->max_lat,
2506 - details_network->virtnet->max_lon);
2507 -
2508 - if (finite(diagdist)) {
2509 - if (metric) {
2510 - if (diagdist < 1000)
2511 - snprintf(output, print_width, "Range : %.3f meters", diagdist);
2512 - else
2513 - snprintf(output, print_width, "Range : %.3f kilometers", diagdist / 1000);
2514 - } else {
2515 - diagdist *= 3.3;
2516 - if (diagdist < 5280)
2517 - snprintf(output, print_width, "Range : %.3f feet", diagdist);
2518 - else
2519 - snprintf(output, print_width, "Range : %.3f miles", diagdist / 5280);
2520 - }
2521 - kwin->text.push_back(output);
2522 - }
2523 - }
2524 - }
2525 -
2526 if (details_network->virtnet->carrier_set & (1 << (int) carrier_80211b)) {
2527 snprintf(output, print_width, "Carrier : IEEE 802.11b");
2528 kwin->text.push_back(output);
2529 @@ -1848,49 +1753,6 @@
2530 dnet->ipdata.range_ip[2], dnet->ipdata.range_ip[3]);
2531 kwin->text.push_back(output);
2532 }
2533 -
2534 - if (dnet->gps_fixed != -1) {
2535 - if ((dnet->min_lat == 90) && (dnet->min_lon == 180) &&
2536 - (dnet->max_lat == -90) && (dnet->max_lon == -180)) {
2537 - snprintf(output, print_width, "Min Loc : N/A");
2538 - kwin->text.push_back(output);
2539 - snprintf(output, print_width, "Max Loc : N/A");
2540 - kwin->text.push_back(output);
2541 - snprintf(output, print_width, "Range : N/A");
2542 - kwin->text.push_back(output);
2543 - }
2544 - else {
2545 - snprintf(output, print_width, "Min Loc : Lat %f Lon %f Alt %f Spd %f",
2546 - dnet->min_lat, dnet->min_lon,
2547 - metric ? dnet->min_alt / 3.3 : dnet->min_alt,
2548 - metric ? dnet->min_spd * 1.6093 : dnet->min_spd);
2549 - kwin->text.push_back(output);
2550 - snprintf(output, print_width, "Max Loc : Lat %f Lon %f Alt %f Spd %f",
2551 - dnet->max_lat, dnet->max_lon,
2552 - metric ? dnet->max_alt / 3.3 : dnet->max_alt,
2553 - metric ? dnet->max_spd * 1.6093 : dnet->max_spd);
2554 - kwin->text.push_back(output);
2555 -
2556 - double diagdist = GPSD::EarthDistance(dnet->min_lat, dnet->min_lon,
2557 - dnet->max_lat, dnet->max_lon);
2558 -
2559 - if (finite(diagdist)) {
2560 - if (metric) {
2561 - if (diagdist < 1000)
2562 - snprintf(output, print_width, "Range : %f meters", diagdist);
2563 - else
2564 - snprintf(output, print_width, "Range : %f kilometers", diagdist / 1000);
2565 - } else {
2566 - diagdist *= 3.3;
2567 - if (diagdist < 5280)
2568 - snprintf(output, print_width, "Range : %f feet", diagdist);
2569 - else
2570 - snprintf(output, print_width, "Range : %f miles", diagdist / 5280);
2571 - }
2572 - kwin->text.push_back(output);
2573 - }
2574 - }
2575 - }
2576 }
2577
2578 // Now we just use the text printer to handle the rest for us
2579 @@ -1898,184 +1760,6 @@
2580 return TextPrinter(in_window);
2581 }
2582
2583 -int PanelFront::GpsPrinter(void *in_window) {
2584 - kis_window *kwin = (kis_window *) in_window;
2585 -
2586 - char output[1024];
2587 - kwin->text.clear();
2588 -
2589 - if (details_network == NULL) {
2590 - kwin->text.push_back("The network or group being displayed");
2591 - kwin->text.push_back("has been deleted. Please select a ");
2592 - kwin->text.push_back("different network.");
2593 - return TextPrinter(in_window);
2594 - }
2595 -
2596 - wireless_network *dnet = details_network->virtnet;
2597 -
2598 - int print_width = kwin->print_width;
2599 - if (print_width > 1024)
2600 - print_width = 1023;
2601 -
2602 - if (print_width < 32) {
2603 - kwin->text.push_back("Display not wide enough");
2604 - return TextPrinter(in_window);
2605 - }
2606 -
2607 - if (dnet->aggregate_points == 0) {
2608 - kwin->text.push_back("No GPS data.");
2609 - return TextPrinter(in_window);
2610 - }
2611 -
2612 - float center_lat, center_lon;
2613 -
2614 - // We hijack the "selected" field as a toggle
2615 - if (kwin->selected == 1) {
2616 - center_lat = dnet->best_lat;
2617 - center_lon = dnet->best_lon;
2618 - } else {
2619 - center_lat = dnet->aggregate_lat / dnet->aggregate_points;
2620 - center_lon = dnet->aggregate_lon / dnet->aggregate_points;
2621 - }
2622 -
2623 - // Get bearing to the center
2624 - float center_angle = GPSD::CalcHeading(center_lat, center_lon, lat, lon);
2625 -
2626 - float difference_angle = heading - center_angle;
2627 - if (difference_angle < 0)
2628 - difference_angle += 360;
2629 -
2630 - double diagdist = GPSD::EarthDistance(lat, lon, center_lat, center_lon);
2631 -
2632 - // Now we know everything - where we are, where we are headed, where we SHOULD be headed
2633 - // to get to the supposed center of the network, how far it is, and the orientation on our
2634 - // compass to get to it. Time to start drawing our output.
2635 -
2636 - char compass[5][10];
2637 - memset(compass, 0, sizeof(char) * 5 * 10);
2638 -
2639 - // | 41.12345x-74.12345 .-|-/ |
2640 - // | Bearing: / |/ \ |
2641 - // | 123.23 degrees | O | |
2642 - // | \ \ / |
2643 - // | Estimated center: '---\ |
2644 -
2645 -
2646 - // Find the orientation on our compass:
2647 - if (difference_angle > 330 || difference_angle <= 22) {
2648 - snprintf(compass[0], 10, " .-|-. ");
2649 - snprintf(compass[1], 10, " / | \\ ");
2650 - snprintf(compass[2], 10, "| O |");
2651 - snprintf(compass[3], 10, " \\ / ");
2652 - snprintf(compass[4], 10, " '---' ");
2653 - } else if (difference_angle > 22 && difference_angle <= 66) {
2654 - snprintf(compass[0], 10, " .---/ ");
2655 - snprintf(compass[1], 10, " / / \\ ");
2656 - snprintf(compass[2], 10, "| O |");
2657 - snprintf(compass[3], 10, " \\ / ");
2658 - snprintf(compass[4], 10, " '---' ");
2659 - } else if (difference_angle > 66 && difference_angle <= 110) {
2660 - snprintf(compass[0], 10, " .---. ");
2661 - snprintf(compass[1], 10, " / \\ ");
2662 - snprintf(compass[2], 10, "| O----");
2663 - snprintf(compass[3], 10, " \\ / ");
2664 - snprintf(compass[4], 10, " '---' ");
2665 - } else if (difference_angle > 110 && difference_angle <= 154) {
2666 - snprintf(compass[0], 10, " .---. ");
2667 - snprintf(compass[1], 10, " / \\ ");
2668 - snprintf(compass[2], 10, "| O |");
2669 - snprintf(compass[3], 10, " \\ \\ / ");
2670 - snprintf(compass[4], 10, " '---\\ ");
2671 - } else if (difference_angle > 154 && difference_angle <= 198) {
2672 - snprintf(compass[0], 10, " .---. ");
2673 - snprintf(compass[1], 10, " / \\ ");
2674 - snprintf(compass[2], 10, "| O |");
2675 - snprintf(compass[3], 10, " \\ | / ");
2676 - snprintf(compass[4], 10, " '-|-' ");
2677 - } else if (difference_angle > 198 && difference_angle <= 242) {
2678 - snprintf(compass[0], 10, " .---. ");
2679 - snprintf(compass[1], 10, " / \\ ");
2680 - snprintf(compass[2], 10, "| O |");
2681 - snprintf(compass[3], 10, " \\ / / ");
2682 - snprintf(compass[4], 10, " /---' ");
2683 - } else if (difference_angle > 242 && difference_angle <= 286) {
2684 - snprintf(compass[0], 10, " .---. ");
2685 - snprintf(compass[1], 10, " / \\ ");
2686 - snprintf(compass[2], 10, "----O |");
2687 - snprintf(compass[3], 10, " \\ / ");
2688 - snprintf(compass[4], 10, " '---' ");
2689 - } else if (difference_angle > 286 && difference_angle <= 330) {
2690 - snprintf(compass[0], 10, " \\---. ");
2691 - snprintf(compass[1], 10, " / \\ \\ ");
2692 - snprintf(compass[2], 10, "| O |");
2693 - snprintf(compass[3], 10, " \\ / ");
2694 - snprintf(compass[4], 10, " '---' ");
2695 - } else {
2696 - snprintf(compass[0], 10, "%f\n", difference_angle);
2697 - }
2698 -
2699 -
2700 - // - Network GPS ---------------------|
2701 - // | Current: |
2702 - // | 41.12345x-74.12345 .-|-. |
2703 - // | Bearing: / | \ |
2704 - // | 123.23 degrees | O | |
2705 - // | \ \ / |
2706 - // | Estimated center: '---\ |
2707 - // | -73.12345x43.12345 |
2708 - // | 120 feet |
2709 - // ------------------------------------
2710 - char textfrag[23];
2711 -
2712 - snprintf(output, print_width, "Current:");
2713 - kwin->text.push_back(output);
2714 -
2715 - snprintf(textfrag, 23, "%.3f x %.3f", lat, lon);
2716 - snprintf(output, print_width, "%-22s%s", textfrag, compass[0]);
2717 - kwin->text.push_back(output);
2718 -
2719 - snprintf(textfrag, 23, " Bearing:");
2720 - snprintf(output, print_width, "%-22s%s", textfrag, compass[1]);
2721 - kwin->text.push_back(output);
2722 -
2723 - snprintf(textfrag, 23, " %.2f*", heading);
2724 - snprintf(output, print_width, "%-22s%s", textfrag, compass[2]);
2725 - kwin->text.push_back(output);
2726 -
2727 - snprintf(textfrag, 23, " ");
2728 - snprintf(output, print_width, "%-22s%s", textfrag, compass[3]);
2729 - kwin->text.push_back(output);
2730 -
2731 - if (kwin->selected == 1)
2732 - snprintf(textfrag, 23, "Strongest signal:");
2733 - else
2734 - snprintf(textfrag, 23, "Estimated Center:");
2735 - snprintf(output, print_width, "%-22s%s", textfrag, compass[4]);
2736 - kwin->text.push_back(output);
2737 -
2738 - snprintf(textfrag, 23, "%.3f x %.3f", center_lat, center_lon);
2739 - snprintf(output, print_width, "%-22s%.2f*", textfrag, difference_angle);
2740 - kwin->text.push_back(output);
2741 -
2742 - if (metric) {
2743 - if (diagdist < 1000)
2744 - snprintf(textfrag, 23, "%.2f m", diagdist);
2745 - else
2746 - snprintf(textfrag, 23, "%.2f km", diagdist / 1000);
2747 - } else {
2748 - diagdist *= 3.3;
2749 - if (diagdist < 5280)
2750 - snprintf(textfrag, 23, "%.2f ft", diagdist);
2751 - else
2752 - snprintf(textfrag, 23, "%.2f mi", diagdist / 5280);
2753 - }
2754 -
2755 - snprintf(output, print_width, "%-22s%s", "", textfrag);
2756 - kwin->text.push_back(output);
2757 -
2758 - return TextPrinter(in_window);
2759 -}
2760 -
2761 int PanelFront::PackPrinter(void *in_window) {
2762 kis_window *kwin = (kis_window *) in_window;
2763
2764 @@ -3044,54 +2728,6 @@
2765 details_client->ipdata.ip[2], details_client->ipdata.ip[3]);
2766 kwin->text.push_back(output);
2767
2768 - if (details_client->gps_fixed != -1) {
2769 - kwin->text.push_back("");
2770 -
2771 - if ((details_client->min_lat == 90) && (details_client->min_lon == 180) &&
2772 - (details_client->max_lat == -90) && (details_client->max_lon == -180)) {
2773 - snprintf(output, print_width, "Min Loc : N/A");
2774 - kwin->text.push_back(output);
2775 - snprintf(output, print_width, "Max Loc : N/A");
2776 - kwin->text.push_back(output);
2777 - snprintf(output, print_width, "Range : N/A");
2778 - kwin->text.push_back(output);
2779 - }
2780 - else {
2781 - snprintf(output, print_width, "Min Loc : Lat %f Lon %f Alt %f Spd %f",
2782 - details_client->min_lat, details_client->min_lon,
2783 - metric ? details_client->min_alt / 3.3 : details_client->min_alt,
2784 - metric ? details_client->min_spd * 1.6093 : details_client->min_spd);
2785 - kwin->text.push_back(output);
2786 - snprintf(output, print_width, "Max Loc : Lat %f Lon %f Alt %f Spd %f",
2787 - details_client->max_lat, details_client->max_lon,
2788 - metric ? details_client->max_alt / 3.3 : details_client->max_alt,
2789 - metric ? details_client->max_spd * 1.6093 : details_client->max_spd);
2790 - kwin->text.push_back(output);
2791 -
2792 - double diagdist = GPSD::EarthDistance(details_client->min_lat,
2793 - details_client->min_lon,
2794 - details_client->max_lat,
2795 - details_client->max_lon);
2796 -
2797 - if (finite(diagdist)) {
2798 - if (metric) {
2799 - if (diagdist < 1000)
2800 - snprintf(output, print_width, "Range : %f meters", diagdist);
2801 - else
2802 - snprintf(output, print_width, "Range : %f kilometers", diagdist / 1000);
2803 - } else {
2804 - diagdist *= 3.3;
2805 - if (diagdist < 5280)
2806 - snprintf(output, print_width, "Range : %f feet", diagdist);
2807 - else
2808 - snprintf(output, print_width, "Range : %f miles", diagdist / 5280);
2809 - }
2810 - kwin->text.push_back(output);
2811 - }
2812 - }
2813 - kwin->text.push_back("");
2814 - }
2815 -
2816 snprintf(output, print_width, "Packets :");
2817 kwin->text.push_back(output);
2818 snprintf(output, print_width, " Data : %d", details_client->data_packets);
2819 diff -urN kismet.old/panelfront_input.cc kismet.dev/panelfront_input.cc
2820 --- kismet.old/panelfront_input.cc 2005-07-25 16:19:44.000000000 +0200
2821 +++ kismet.dev/panelfront_input.cc 2005-08-15 01:10:39.680043928 +0200
2822 @@ -300,16 +300,9 @@
2823 break;
2824 case 'f':
2825 case 'F':
2826 - if (sortby != sort_auto && last_displayed.size() > 0) {
2827 - details_network = last_displayed[kwin->selected];
2828 - SpawnWindow("Network Location", &PanelFront::GpsPrinter, &PanelFront::GpsInput, 8, 34);
2829 - } else {
2830 - WriteStatus("Cannot view network GPS info in autofit sort mode. Sort by a different method.");
2831 - }
2832 break;
2833 case 'm':
2834 case 'M':
2835 - MuteToggle();
2836 break;
2837 case 'e':
2838 case 'E':
2839 @@ -447,7 +440,6 @@
2840 switch(in_chr) {
2841 case 'm':
2842 case 'M':
2843 - MuteToggle();
2844 break;
2845 case 'p':
2846 case 'P':
2847 @@ -546,32 +538,6 @@
2848 return 1;
2849 }
2850
2851 -int PanelFront::GpsInput(void *in_window, int in_chr) {
2852 - kis_window *kwin = (kis_window *) in_window;
2853 -
2854 - switch (in_chr) {
2855 - case 's':
2856 - case 'S':
2857 - kwin->selected = 1;
2858 - break;
2859 - case 'c':
2860 - case 'C':
2861 - kwin->selected = 0;
2862 - break;
2863 - case 'h':
2864 - case 'H':
2865 - SpawnHelp(KismetHelpGps);
2866 - break;
2867 - case 'x':
2868 - case 'X':
2869 - case 'q':
2870 - case 'Q':
2871 - return 0;
2872 - break;
2873 - }
2874 -
2875 - return 1;
2876 -}
2877
2878 int PanelFront::RateInput(void *in_window, int in_chr) {
2879 switch (in_chr) {
2880 @@ -645,24 +611,6 @@
2881 return 1;
2882 }
2883
2884 -void PanelFront::MuteToggle() {
2885 - if (muted) {
2886 - speech = old_speech;
2887 - sound = old_sound;
2888 - muted = 0;
2889 - WriteStatus("Restoring sound");
2890 - } else if (sound != 0 || speech != 0) {
2891 - old_speech = speech;
2892 - old_sound = sound;
2893 - sound = 0;
2894 - speech = 0;
2895 - muted = 1;
2896 - WriteStatus("Muting sound");
2897 - } else if (sound == 0 && speech == 0) {
2898 - WriteStatus("Sound not enabled.");
2899 - }
2900 -}
2901 -
2902 int PanelFront::AlertInput(void *in_window, int in_chr) {
2903 kis_window *kwin = (kis_window *) in_window;
2904
2905 diff -urN kismet.old/pcapsource.cc kismet.dev/pcapsource.cc
2906 --- kismet.old/pcapsource.cc 2005-07-25 16:19:44.000000000 +0200
2907 +++ kismet.dev/pcapsource.cc 2005-08-15 00:40:28.291416856 +0200
2908 @@ -296,11 +296,6 @@
2909 packet->moddata = moddata;
2910 packet->modified = 0;
2911
2912 - if (gpsd != NULL) {
2913 - gpsd->FetchLoc(&packet->gps_lat, &packet->gps_lon, &packet->gps_alt,
2914 - &packet->gps_spd, &packet->gps_heading, &packet->gps_fix);
2915 - }
2916 -
2917 if (datalink_type == DLT_PRISM_HEADER) {
2918 ret = Prism2KisPack(packet, data, moddata);
2919 } else if (datalink_type == KDLT_BSD802_11) {
2920 @@ -1075,133 +1070,6 @@
2921
2922 // Monitor commands
2923 #ifdef HAVE_LINUX_WIRELESS
2924 -// Cisco uses its own config file in /proc to control modes
2925 -int monitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
2926 - FILE *cisco_config;
2927 - char cisco_path[128];
2928 -
2929 - linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm));
2930 - (*in_if) = ifparm;
2931 -
2932 - if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) {
2933 - return -1;
2934 - }
2935 -
2936 - if (Iwconfig_Get_SSID(in_dev, in_err, ifparm->essid) < 0)
2937 - return -1;
2938 -
2939 - if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0)
2940 - return -1;
2941 -
2942 - if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0)
2943 - return -1;
2944 -
2945 - if (Ifconfig_Delta_Flags(in_dev, in_err, IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0)
2946 - return -1;
2947 -
2948 - // Try the iwpriv
2949 - if (Iwconfig_Set_IntPriv(in_dev, "setRFMonitor", 1, 0, in_err) >= 0) {
2950 - return 0;
2951 - }
2952 -
2953 - // Zero the ssid - nonfatal
2954 - Iwconfig_Set_SSID(in_dev, in_err, NULL);
2955 -
2956 - // Build the proc control path
2957 - snprintf(cisco_path, 128, "/proc/driver/aironet/%s/Config", in_dev);
2958 -
2959 - if ((cisco_config = fopen(cisco_path, "w")) == NULL) {
2960 - snprintf(in_err, STATUS_MAX, "Unable to open cisco control file '%s' %d:%s",
2961 - cisco_path, errno, strerror(errno));
2962 - return -1;
2963 - }
2964 -
2965 - fprintf(cisco_config, "Mode: r\n");
2966 - fprintf(cisco_config, "Mode: y\n");
2967 - fprintf(cisco_config, "XmitPower: 1\n");
2968 -
2969 - fclose(cisco_config);
2970 -
2971 - // Channel can't be set on cisco with these drivers.
2972 -
2973 - return 0;
2974 -}
2975 -
2976 -int unmonitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
2977 - linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
2978 - int ret = -1;
2979 -
2980 - // Try the iwpriv
2981 - if (Iwconfig_Set_IntPriv(in_dev, "setRFMonitor", 0, 0, in_err) >= 0) {
2982 - // If we're the new drivers, unmonitor
2983 - if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) {
2984 - return -1;
2985 - }
2986 -
2987 - // Reset the SSID since monitor mode nukes it
2988 - if (Iwconfig_Set_SSID(in_dev, in_err, ifparm->essid) < 0)
2989 - return -1;
2990 -
2991 - if (ifparm->channel > 0) {
2992 - if (Iwconfig_Set_Channel(in_dev, ifparm->channel, in_err) < 0)
2993 - return -1;
2994 - }
2995 -
2996 - ret = 1;
2997 - }
2998 -
2999 - free(ifparm);
3000 -
3001 - return ret;
3002 -}
3003 -
3004 -// Cisco uses its own config file in /proc to control modes
3005 -//
3006 -// I was doing this with ioctls but that seems to cause lockups while
3007 -// this method doesn't. I don't think I like these drivers.
3008 -int monitor_cisco_wifix(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3009 - FILE *cisco_config;
3010 - char cisco_path[128];
3011 - vector<string> devbits = StrTokenize(in_dev, ":");
3012 -
3013 - if (devbits.size() < 2) {
3014 - snprintf(in_err, STATUS_MAX, "Invalid device pair '%s'. Proper device "
3015 - "for cisco_wifix is eth?:wifi?.", in_dev);
3016 - return -1;
3017 - }
3018 -
3019 - // Bring the device up, zero its ip, and set promisc
3020 - if (Ifconfig_Delta_Flags(devbits[0].c_str(), in_err,
3021 - IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0)
3022 - return -1;
3023 - if (Ifconfig_Delta_Flags(devbits[1].c_str(), in_err,
3024 - IFF_UP | IFF_RUNNING | IFF_PROMISC) < 0)
3025 - return -1;
3026 -
3027 - // Zero the ssid, nonfatally
3028 - Iwconfig_Set_SSID(devbits[0].c_str(), in_err, NULL);
3029 - Iwconfig_Set_SSID(devbits[1].c_str(), in_err, NULL);
3030 -
3031 - // Build the proc control path
3032 - snprintf(cisco_path, 128, "/proc/driver/aironet/%s/Config", devbits[0].c_str());
3033 -
3034 - if ((cisco_config = fopen(cisco_path, "w")) == NULL) {
3035 - snprintf(in_err, STATUS_MAX, "Unable to open cisco control file '%s' %d:%s",
3036 - cisco_path, errno, strerror(errno));
3037 - return -1;
3038 - }
3039 -
3040 - fprintf(cisco_config, "Mode: r\n");
3041 - fprintf(cisco_config, "Mode: y\n");
3042 - fprintf(cisco_config, "XmitPower: 1\n");
3043 -
3044 - fclose(cisco_config);
3045 -
3046 - // Channel can't be set on cisco with these drivers.
3047 -
3048 - return 0;
3049 -}
3050 -
3051 // Hostap uses iwpriv and iwcontrol settings to control monitor mode
3052 int monitor_hostap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3053 int ret;
3054 @@ -1350,134 +1218,6 @@
3055 return 1;
3056
3057 }
3058 -
3059 -// Acx100 uses the packhdr iwpriv control to set link state, rest is normal
3060 -int monitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3061 - int ret;
3062 -
3063 - // Allocate a tracking record for the interface settings and remember our
3064 - // setup
3065 - linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm));
3066 - (*in_if) = ifparm;
3067 -
3068 - if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) {
3069 - return -1;
3070 - }
3071 -
3072 - if (Iwconfig_Get_SSID(in_dev, in_err, ifparm->essid) < 0)
3073 - return -1;
3074 -
3075 - if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0)
3076 - return -1;
3077 -
3078 - if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0)
3079 - return -1;
3080 -
3081 - // it looks like an orinoco now, apparently
3082 - if ((ret = Iwconfig_Set_IntPriv(in_dev, "monitor", 1, initch, in_err)) < 0) {
3083 - if (ret == -2)
3084 - snprintf(in_err, 1024, "Could not find 'monitor' private ioctl "
3085 - "Make sure you have the latest ACX100 development release.");
3086 - return -1;
3087 - }
3088 -
3089 - if (chancontrol_wext(in_dev, initch, in_err, NULL) < 0)
3090 - return -1;
3091 -
3092 - return 0;
3093 -}
3094 -
3095 -int unmonitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3096 - // Restore the IP settings
3097 - linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
3098 -
3099 - if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) {
3100 - return -1;
3101 - }
3102 -
3103 - Iwconfig_Set_IntPriv(in_dev, "monitor", 0, ifparm->channel, in_err);
3104 - Iwconfig_Set_Mode(in_dev, in_err, ifparm->mode);
3105 -
3106 - if (Iwconfig_Set_SSID(in_dev, in_err, ifparm->essid) < 0)
3107 - return -1;
3108 -
3109 - free(ifparm);
3110 -
3111 - return 1;
3112 -}
3113 -
3114 -int monitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3115 - // Allocate a tracking record for the interface settings and remember our
3116 - // setup
3117 - linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm));
3118 - (*in_if) = ifparm;
3119 -
3120 - // Try to figure out the name so we know if we have fcs bytes or not
3121 - char iwname[IFNAMSIZ+1];
3122 - if (Iwconfig_Get_Name(in_dev, in_err, iwname) < 0)
3123 - return -1;
3124 -
3125 - if (strncmp(iwname, "IEEE 802.11b", IFNAMSIZ) == 0) {
3126 - // Looks like the GPL driver, we need to adjust the fcsbytes
3127 - PcapSource *psrc = (PcapSource *) in_ext;
3128 - psrc->fcsbytes = 4;
3129 - }
3130 -
3131 - if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) {
3132 - return -1;
3133 - }
3134 -
3135 - if ((ifparm->flags & IFF_UP)) {
3136 - if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0)
3137 - return -1;
3138 -
3139 - if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0)
3140 - return -1;
3141 -
3142 - if (Iwconfig_Get_SSID(in_dev, in_err, ifparm->essid) < 0)
3143 - return -1;
3144 -
3145 - } else {
3146 - ifparm->channel = -1;
3147 - ifparm->mode = -1;
3148 - }
3149 -
3150 - int ret = monitor_wext(in_dev, initch, in_err, in_if, in_ext);
3151 -
3152 - if (ret < 0 && ret != -2)
3153 - return ret;
3154 -
3155 - if (Iwconfig_Set_SSID(in_dev, in_err, "") < 0)
3156 - return -1;
3157 -
3158 - return 0;
3159 -}
3160 -
3161 -int unmonitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3162 - linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
3163 -
3164 - if (unmonitor_wext(in_dev, initch, in_err, in_if, in_ext))
3165 - return -1;
3166 -
3167 - if (Iwconfig_Set_SSID(in_dev, in_err, ifparm->essid) < 0)
3168 - return -1;
3169 -
3170 - return 1;
3171 -}
3172 -// vtar5k iwpriv control to set link state, rest is normal
3173 -int monitor_vtar5k(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3174 - // Set the prism iwpriv control to 1
3175 - if (Iwconfig_Set_IntPriv(in_dev, "prism", 1, 0, in_err) < 0) {
3176 - return -1;
3177 - }
3178 -
3179 - // The rest is standard wireless extensions
3180 - if (monitor_wext(in_dev, initch, in_err, in_if, in_ext) < 0)
3181 - return -1;
3182 -
3183 - return 0;
3184 -}
3185 -
3186 // Madwifi stuff uses iwpriv mode
3187 int monitor_madwifi_a(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3188 // Allocate a tracking record for the interface settings and remember our
3189 @@ -1656,88 +1396,6 @@
3190 return unmonitor_wext(in_dev, initch, in_err, in_if, in_ext);
3191 }
3192
3193 -int monitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3194 - // Allocate a tracking record for the interface settings and remember our
3195 - // setup
3196 - linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm));
3197 - (*in_if) = ifparm;
3198 -
3199 - if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) {
3200 - return -1;
3201 - }
3202 -
3203 - if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0)
3204 - return -1;
3205 -
3206 - if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0)
3207 - return -1;
3208 -
3209 - // Call the normal monitor mode
3210 - return (monitor_wext(in_dev, initch, in_err, in_if, in_ext));
3211 -}
3212 -
3213 -int unmonitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3214 - // Restore initial monitor header
3215 - // linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
3216 -
3217 - linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
3218 -
3219 - if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) {
3220 - return -1;
3221 - }
3222 -
3223 - if (Iwconfig_Set_Mode(in_dev, in_err, ifparm->mode) < 0)
3224 - return -1;
3225 -
3226 - free(ifparm);
3227 -
3228 - return 1;
3229 -}
3230 -
3231 -int monitor_ipw2200(const char *in_dev, int initch, char *in_err,
3232 - void **in_if, void *in_ext) {
3233 - // Allocate a tracking record for the interface settings and remember our
3234 - // setup
3235 - linux_ifparm *ifparm = (linux_ifparm *) malloc(sizeof(linux_ifparm));
3236 - (*in_if) = ifparm;
3237 -
3238 - if (Ifconfig_Get_Flags(in_dev, in_err, &ifparm->flags) < 0) {
3239 - return -1;
3240 - }
3241 -
3242 - if ((ifparm->channel = Iwconfig_Get_Channel(in_dev, in_err)) < 0)
3243 - return -1;
3244 -
3245 - if (Iwconfig_Get_Mode(in_dev, in_err, &ifparm->mode) < 0)
3246 - return -1;
3247 -
3248 - // Call the normal monitor mode
3249 - return (monitor_wext(in_dev, initch, in_err, in_if, in_ext));
3250 -}
3251 -
3252 -int unmonitor_ipw2200(const char *in_dev, int initch, char *in_err,
3253 - void **in_if, void *in_ext) {
3254 - // Restore initial monitor header
3255 - // linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
3256 -
3257 - linux_ifparm *ifparm = (linux_ifparm *) (*in_if);
3258 -
3259 - if (Ifconfig_Set_Flags(in_dev, in_err, ifparm->flags) < 0) {
3260 - return -1;
3261 - }
3262 -
3263 - if (Iwconfig_Set_Mode(in_dev, in_err, ifparm->mode) < 0)
3264 - return -1;
3265 -
3266 - // James says this wants to be set to channel 0 for proper scanning operation
3267 - if (Iwconfig_Set_Channel(in_dev, 0, in_err) < 0)
3268 - return -1;
3269 -
3270 - free(ifparm);
3271 -
3272 - return 1;
3273 -}
3274 -
3275 // "standard" wireless extension monitor mode
3276 int monitor_wext(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext) {
3277 int mode;
3278 @@ -2186,75 +1844,6 @@
3279 return 0;
3280 }
3281
3282 -int chancontrol_ipw2100(const char *in_dev, int in_ch, char *in_err, void *in_ext) {
3283 - // Introduce a slight delay to let the driver settle, a la orinoco. I don't
3284 - // like doing this at all since it introduces hiccups into the channel control
3285 - // process, but....
3286 -
3287 - int ret = 0;
3288 -
3289 - ret = chancontrol_wext(in_dev, in_ch, in_err, in_ext);
3290 - usleep(5000);
3291 -
3292 - return ret;
3293 -}
3294 -
3295 -int chancontrol_ipw2200(const char *in_dev, int in_ch, char *in_err, void *in_ext) {
3296 - // Lets see if this really needs the channel change delay like the 2100 did
3297 - int ret = 0;
3298 -
3299 - ret = chancontrol_wext(in_dev, in_ch, in_err, in_ext);
3300 - // Drop a tiny sleep in here to let the channel set settle, otherwise we
3301 - // run the risk of the card freaking out
3302 - usleep(7000);
3303 -
3304 - return ret;
3305 -}
3306 -
3307 -#endif
3308 -
3309 -#ifdef SYS_LINUX
3310 -int chancontrol_wlanng(const char *in_dev, int in_ch, char *in_err, void *in_ext) {
3311 - // I really didn't want to do this...
3312 - char cmdline[2048];
3313 -
3314 - // Turn on rfmon on the initial channel
3315 - snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_wlansniff channel=%d enable=true "
3316 - "prismheader=true >/dev/null 2>&1", in_dev, in_ch);
3317 - if (RunSysCmd(cmdline) < 0) {
3318 - snprintf(in_err, 1024, "Unable to execute '%s'", cmdline);
3319 - return -1;
3320 - }
3321 -
3322 - if (in_ext != NULL) {
3323 - PcapSourceWlanng *src = (PcapSourceWlanng *) in_ext;
3324 - src->last_channel = in_ch;
3325 - }
3326 -
3327 - return 0;
3328 -}
3329 -
3330 -int chancontrol_wlanng_avs(const char *in_dev, int in_ch, char *in_err, void *in_ext) {
3331 - // I really didn't want to do this...
3332 - char cmdline[2048];
3333 -
3334 - // Turn on rfmon on the initial channel
3335 - snprintf(cmdline, 2048, "wlanctl-ng %s lnxreq_wlansniff channel=%d "
3336 - "prismheader=false wlanheader=true stripfcs=false keepwepflags=false "
3337 - "enable=true >/dev/null 2>&1", in_dev, in_ch);
3338 -
3339 - if (RunSysCmd(cmdline) < 0) {
3340 - snprintf(in_err, 1024, "Unable to execute '%s'", cmdline);
3341 - return -1;
3342 - }
3343 -
3344 - if (in_ext != NULL) {
3345 - PcapSourceWlanng *src = (PcapSourceWlanng *) in_ext;
3346 - src->last_channel = in_ch;
3347 - }
3348 -
3349 - return 0;
3350 -}
3351 #endif
3352
3353 #ifdef SYS_OPENBSD
3354 diff -urN kismet.old/pcapsource.h kismet.dev/pcapsource.h
3355 --- kismet.old/pcapsource.h 2005-07-25 16:19:44.000000000 +0200
3356 +++ kismet.dev/pcapsource.h 2005-08-15 00:42:50.849744696 +0200
3357 @@ -336,8 +336,6 @@
3358 char *in_err);
3359 KisPacketSource *pcapsource_wextfcs_registrant(string in_name, string in_device,
3360 char *in_err);
3361 -KisPacketSource *pcapsource_ciscowifix_registrant(string in_name, string in_device,
3362 - char *in_err);
3363 KisPacketSource *pcapsource_11g_registrant(string in_name, string in_device,
3364 char *in_err);
3365 KisPacketSource *pcapsource_11gfcs_registrant(string in_name, string in_device,
3366 @@ -365,25 +363,12 @@
3367 int unmonitor_pcapfile(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3368
3369 #ifdef HAVE_LINUX_WIRELESS
3370 -// Cisco (old)
3371 -int monitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3372 -int unmonitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3373 -// Cisco (new)
3374 -int monitor_cisco_wifix(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3375 // hostap prism2
3376 int monitor_hostap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3377 int unmonitor_hostap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3378 // orinoco
3379 int monitor_orinoco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3380 int unmonitor_orinoco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3381 -// acx100
3382 -int monitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3383 -int unmonitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3384 -// admtek
3385 -int monitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3386 -int unmonitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3387 -// ar5k
3388 -int monitor_vtar5k(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3389 // Madwifi group of cards
3390 int monitor_madwifi_a(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3391 int monitor_madwifi_b(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3392 @@ -393,11 +378,6 @@
3393 // prism54 needs to override the error messages it gets setting channels
3394 int monitor_prism54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3395 int unmonitor_prism54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3396 -// Centrino
3397 -int monitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3398 -int unmonitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3399 -int monitor_ipw2200(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3400 -int unmonitor_ipw2200(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3401 // "Standard" wext monitor sequence - mostly a helper for other functions
3402 // since most cards that use wext still have custom initialization that
3403 // needs to be done.
3404 @@ -406,10 +386,6 @@
3405 #endif
3406
3407 #ifdef SYS_LINUX
3408 -// wlan-ng modern standard
3409 -int monitor_wlanng(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3410 -// wlan-ng avs
3411 -int monitor_wlanng_avs(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3412 // linksys wrt54g monitoring
3413 int monitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
3414 #endif
3415 @@ -434,16 +410,8 @@
3416 // Prism54 apparently returns a fail code on an iwconfig channel change but
3417 // then works so we need to override the wext failure code
3418 int chancontrol_prism54g(const char *in_dev, int in_ch, char *in_err, void *in_ext);
3419 -// We need a delay in it like orinoco, apparently
3420 -int chancontrol_ipw2100(const char *in_dev, int in_ch, char *in_err, void *in_ext);
3421 -int chancontrol_ipw2200(const char *in_dev, int in_ch, char *in_err, void *in_ext);
3422 #endif
3423
3424 -#ifdef SYS_LINUX
3425 -// Modern wlan-ng and wlan-ng avs
3426 -int chancontrol_wlanng(const char *in_dev, int in_ch, char *in_err, void *in_ext);
3427 -int chancontrol_wlanng_avs(const char *in_dev, int in_ch, char *in_err, void *in_ext);
3428 -#endif
3429
3430 #ifdef SYS_OPENBSD
3431 // openbsd prism2 controls
3432 diff -urN kismet.old/server_protocols.cc kismet.dev/server_protocols.cc
3433 --- kismet.old/server_protocols.cc 2005-07-25 16:19:44.000000000 +0200
3434 +++ kismet.dev/server_protocols.cc 2005-08-15 00:44:07.921028080 +0200
3435 @@ -96,7 +96,7 @@
3436 "bssid", "type", "ssid", "beaconinfo",
3437 "llcpackets", "datapackets", "cryptpackets",
3438 "weakpackets", "channel", "wep", "firsttime",
3439 - "lasttime", "atype", "rangeip", "gpsfixed",
3440 + "lasttime", "atype", "rangeip",
3441 "minlat", "minlon", "minalt", "minspd",
3442 "maxlat", "maxlon", "maxalt", "maxspd",
3443 "octets", "cloaked", "beaconrate", "maxrate",
3444 @@ -104,7 +104,6 @@
3445 "quality", "signal", "noise",
3446 "bestquality", "bestsignal", "bestnoise",
3447 "bestlat", "bestlon", "bestalt",
3448 - "agglat", "agglon", "aggalt", "aggpoints",
3449 "datasize",
3450 "turbocellnid", "turbocellmode", "turbocellsat",
3451 "carrierset", "maxseenrate", "encodingset",
3452 @@ -116,10 +115,6 @@
3453 "bssid", "mac", "type", "firsttime", "lasttime",
3454 "manufkey", "manufscore",
3455 "datapackets", "cryptpackets", "weakpackets",
3456 - "gpsfixed",
3457 - "minlat", "minlon", "minalt", "minspd",
3458 - "maxlat", "maxlon", "maxalt", "maxspd",
3459 - "agglat", "agglon", "aggalt", "aggpoints",
3460 "maxrate",
3461 "quality", "signal", "noise",
3462 "bestquality", "bestsignal", "bestnoise",
3463 @@ -399,33 +394,6 @@
3464 net->ipdata.range_ip[2], net->ipdata.range_ip[3]);
3465 data->ndvec.push_back(tmpstr);
3466
3467 - snprintf(tmpstr, 128, "%d", net->gps_fixed);
3468 - data->ndvec.push_back(tmpstr);
3469 -
3470 - snprintf(tmpstr, 128, "%f", net->min_lat);
3471 - data->ndvec.push_back(tmpstr);
3472 -
3473 - snprintf(tmpstr, 128, "%f", net->min_lon);
3474 - data->ndvec.push_back(tmpstr);
3475 -
3476 - snprintf(tmpstr, 128, "%f", net->min_alt);
3477 - data->ndvec.push_back(tmpstr);
3478 -
3479 - snprintf(tmpstr, 128, "%f", net->min_spd);
3480 - data->ndvec.push_back(tmpstr);
3481 -
3482 - snprintf(tmpstr, 128, "%f", net->max_lat);
3483 - data->ndvec.push_back(tmpstr);
3484 -
3485 - snprintf(tmpstr, 128, "%f", net->max_lon);
3486 - data->ndvec.push_back(tmpstr);
3487 -
3488 - snprintf(tmpstr, 128, "%f", net->max_alt);
3489 - data->ndvec.push_back(tmpstr);
3490 -
3491 - snprintf(tmpstr, 128, "%f", net->max_spd);
3492 - data->ndvec.push_back(tmpstr);
3493 -
3494 snprintf(tmpstr, 128, "%d", net->ipdata.octets);
3495 data->ndvec.push_back(tmpstr);
3496
3497 @@ -476,18 +444,6 @@
3498 snprintf(tmpstr, 128, "%f", net->best_alt);
3499 data->ndvec.push_back(tmpstr);
3500
3501 - snprintf(tmpstr, 128, "%f", net->aggregate_lat);
3502 - data->ndvec.push_back(tmpstr);
3503 -
3504 - snprintf(tmpstr, 128, "%f", net->aggregate_lon);
3505 - data->ndvec.push_back(tmpstr);
3506 -
3507 - snprintf(tmpstr, 128, "%f", net->aggregate_alt);
3508 - data->ndvec.push_back(tmpstr);
3509 -
3510 - snprintf(tmpstr, 128, "%ld", net->aggregate_points);
3511 - data->ndvec.push_back(tmpstr);
3512 -
3513 snprintf(tmpstr, 128, "%ld", net->datasize);
3514 data->ndvec.push_back(tmpstr);
3515
3516 @@ -573,45 +529,6 @@
3517 snprintf(tmpstr, 128, "%d", cli->interesting_packets);
3518 data->cdvec.push_back(tmpstr);
3519
3520 - snprintf(tmpstr, 128, "%d", cli->gps_fixed);
3521 - data->cdvec.push_back(tmpstr);
3522 -
3523 - snprintf(tmpstr, 128, "%f", cli->min_lat);
3524 - data->cdvec.push_back(tmpstr);
3525 -
3526 - snprintf(tmpstr, 128, "%f", cli->min_lon);
3527 - data->cdvec.push_back(tmpstr);
3528 -
3529 - snprintf(tmpstr, 128, "%f", cli->min_alt);
3530 - data->cdvec.push_back(tmpstr);
3531 -
3532 - snprintf(tmpstr, 128, "%f", cli->min_spd);
3533 - data->cdvec.push_back(tmpstr);
3534 -
3535 - snprintf(tmpstr, 128, "%f", cli->max_lat);
3536 - data->cdvec.push_back(tmpstr);
3537 -
3538 - snprintf(tmpstr, 128, "%f", cli->max_lon);
3539 - data->cdvec.push_back(tmpstr);
3540 -
3541 - snprintf(tmpstr, 128, "%f", cli->max_alt);
3542 - data->cdvec.push_back(tmpstr);
3543 -
3544 - snprintf(tmpstr, 128, "%f", cli->max_spd);
3545 - data->cdvec.push_back(tmpstr);
3546 -
3547 - snprintf(tmpstr, 128, "%f", cli->aggregate_lat);
3548 - data->cdvec.push_back(tmpstr);
3549 -
3550 - snprintf(tmpstr, 128, "%f", cli->aggregate_lon);
3551 - data->cdvec.push_back(tmpstr);
3552 -
3553 - snprintf(tmpstr, 128, "%f", cli->aggregate_alt);
3554 - data->cdvec.push_back(tmpstr);
3555 -
3556 - snprintf(tmpstr, 128, "%ld", cli->aggregate_points);
3557 - data->cdvec.push_back(tmpstr);
3558 -
3559 snprintf(tmpstr, 128, "%2.1f", cli->maxrate);
3560 data->cdvec.push_back(tmpstr);
3561
3562 diff -urN kismet.old/tcpclient.cc kismet.dev/tcpclient.cc
3563 --- kismet.old/tcpclient.cc 2005-07-25 16:19:44.000000000 +0200
3564 +++ kismet.dev/tcpclient.cc 2005-08-15 01:06:01.938267096 +0200
3565 @@ -29,18 +29,16 @@
3566 protocol_default_map["STRING"] = "bssid,sourcemac,text";
3567 protocol_default_map["KISMET"] = "version,starttime,servername,timestamp,"
3568 "channelhop,newversion";
3569 - protocol_default_map["GPS"] = "lat,lon,alt,spd,heading,fix";
3570 protocol_default_map["NETWORK"] = "bssid,type,ssid,beaconinfo,llcpackets,datapackets,cryptpackets,"
3571 - "weakpackets,channel,wep,firsttime,lasttime,atype,rangeip,gpsfixed,minlat,minlon,minalt,minspd,"
3572 - "maxlat,maxlon,maxalt,maxspd,octets,cloaked,beaconrate,maxrate,"
3573 - "quality,signal,noise,bestquality,bestsignal,bestnoise,bestlat,bestlon,bestalt,"
3574 - "agglat,agglon,aggalt,aggpoints,datasize,turbocellnid,turbocellmode,turbocellsat,"
3575 + "weakpackets,channel,wep,firsttime,lasttime,atype,rangeip,"
3576 + "octets,cloaked,beaconrate,maxrate,"
3577 + "quality,signal,noise,bestquality,bestsignal,bestnoise,"
3578 + "datasize,turbocellnid,turbocellmode,turbocellsat,"
3579 "carrierset,maxseenrate,encodingset,decrypted,dupeivpackets";
3580 protocol_default_map["CLIENT"] = "bssid,mac,type,firsttime,lasttime,"
3581 "datapackets,cryptpackets,weakpackets,"
3582 - "gpsfixed,minlat,minlon,minalt,minspd,maxlat,maxlon,maxalt,maxspd,"
3583 - "agglat,agglon,aggalt,aggpoints,maxrate,quality,signal,noise,"
3584 - "bestquality,bestsignal,bestnoise,bestlat,bestlon,bestalt,"
3585 + "maxrate,quality,signal,noise,"
3586 + "bestquality,bestsignal,bestnoise,"
3587 "atype,ip,datasize,maxseenrate,encodingset,decrypted,wep";
3588 protocol_default_map["WEPKEY"] = "origin,bssid,key,encrypted,failed";
3589 protocol_default_map["CARD"] = "interface,type,username,channel,id,packets,hopping";
3590 @@ -48,7 +46,6 @@
3591 sv_valid = 0;
3592 client_fd = 0;
3593
3594 - lat = lon = alt = spd = 0;
3595 mode = 0;
3596
3597 num_networks = num_packets = num_crypt = num_interesting =
3598 @@ -343,14 +340,6 @@
3599 // Bitmask set of encoding types seen in this network
3600 int encoding_set;
3601
3602 - int gps_fixed;
3603 - float min_lat, min_lon, min_alt, min_spd;
3604 - float max_lat, max_lon, max_alt, max_spd;
3605 -
3606 - // Averaged center position
3607 - double aggregate_lat, aggregate_lon, aggregate_alt;
3608 - long aggregate_points;
3609 -
3610 // How fast we can go
3611 float maxrate;
3612
3613 @@ -359,7 +348,6 @@
3614 // Connection information
3615 int quality, signal, noise;
3616 int best_quality, best_signal, best_noise;
3617 - float best_lat, best_lon, best_alt;
3618
3619 // Amount of data, in bytes
3620 unsigned long datasize;
3621 @@ -393,23 +381,20 @@
3622 scanned = sscanf(in_data+hdrlen+18, "%d \001%255[^\001]\001 "
3623 "\001%255[^\001]\001 "
3624 "%d %d %d %d %d %d %d %d %d %hd.%hd.%hd.%hd "
3625 - "%d %f %f %f %f %f %f %f %f %d %d %d %f %d %d %d %d %d %d "
3626 - "%f %f %f %lf %lf %lf %ld %ld"
3627 + "%d %d %d %f %d %d %d %d %d %d "
3628 + "%ld"
3629 "%d %d %d %d %d %d %d %d",
3630 (int *) &type, ssid, beaconstr,
3631 &llc_packets, &data_packets, &crypt_packets,
3632 &interesting_packets, &channel, &crypt_set,
3633 (int *) &first_time, (int *) &last_time,
3634 (int *) &atype, &range[0], &range[1], &range[2],
3635 - &range[3], &gps_fixed, &min_lat, &min_lon,
3636 - &min_alt, &min_spd, &max_lat, &max_lon,
3637 - &max_alt, &max_spd, &octets,
3638 + &range[3],
3639 + &octets,
3640 &cloaked, &beacon, &maxrate, &quality,
3641 &signal, &noise, &best_quality,
3642 &best_signal, &best_noise,
3643 - &best_lat, &best_lon, &best_alt,
3644 - &aggregate_lat, &aggregate_lon, &aggregate_alt,
3645 - &aggregate_points, &datasize,
3646 + &datasize,
3647 &turbocell_nid, (int *) &turbocell_mode,
3648 &turbocell_sat, &carrier_set, &maxseenrate,
3649 &encoding_set, &decrypted, &dupeiv_packets);
3650 @@ -456,15 +441,6 @@
3651 net->beacon = beacon;
3652 net->carrier_set = carrier_set;
3653 net->encoding_set = encoding_set;
3654 - net->gps_fixed = gps_fixed;
3655 - net->min_lat = min_lat;
3656 - net->min_lon = min_lon;
3657 - net->min_alt = min_alt;
3658 - net->min_spd = min_spd;
3659 - net->max_lat = max_lat;
3660 - net->max_lon = max_lon;
3661 - net->max_alt = max_alt;
3662 - net->max_spd = max_spd;
3663 net->maxrate = maxrate;
3664 net->maxseenrate = maxseenrate;
3665 net->quality = quality;
3666 @@ -473,13 +449,6 @@
3667 net->best_quality = best_quality;
3668 net->best_signal = best_signal;
3669 net->best_noise = best_noise;
3670 - net->best_lat = best_lat;
3671 - net->best_lon = best_lon;
3672 - net->best_alt = best_alt;
3673 - net->aggregate_points = aggregate_points;
3674 - net->aggregate_lat = aggregate_lat;
3675 - net->aggregate_lon = aggregate_lon;
3676 - net->aggregate_alt = aggregate_alt;
3677 net->datasize = datasize;
3678 net->dupeiv_packets = dupeiv_packets;
3679 net->decrypted = decrypted;
3680 @@ -505,13 +474,6 @@
3681 int crypt_packets;
3682 int interesting_packets;
3683
3684 - // gps data
3685 - int gps_fixed;
3686 - float min_lat, min_lon, min_alt, min_spd;
3687 - float max_lat, max_lon, max_alt, max_spd;
3688 - double aggregate_lat, aggregate_lon, aggregate_alt;
3689 - long aggregate_points;
3690 -
3691 // How fast we can go
3692 float maxrate;
3693 // How fast we've been seen to go, in 100kbs units
3694 @@ -523,7 +485,6 @@
3695 // Last seen quality for a packet from this client
3696 int quality, signal, noise;
3697 int best_quality, best_signal, best_noise;
3698 - float best_lat, best_lon, best_alt;
3699
3700 // ip data
3701 address_type atype;
3702 @@ -558,24 +519,16 @@
3703 return 0;
3704 }
3705
3706 - scanned = sscanf(in_data+hdrlen+36, "%d %d %d %d %d %d %d "
3707 - "%f %f %f %f %f %f %f %f %lf %lf "
3708 - "%lf %ld %f %d %d %d %d %d %d "
3709 - "%f %f %f %d %hd.%hd.%hd.%hd %ld %d %d %d %d",
3710 + scanned = sscanf(in_data+hdrlen+36, "%d %d %d %d %d %d "
3711 + "%d %d %d %d %d %d "
3712 + "%d %hd.%hd.%hd.%hd %ld %d %d %d %d",
3713 (int *) &type,
3714 (int *) &first_time, (int *) &last_time,
3715 &data_packets, &crypt_packets,
3716 &interesting_packets,
3717 - &gps_fixed, &min_lat, &min_lon,
3718 - &min_alt, &min_spd,
3719 - &max_lat, &max_lon, &max_alt,
3720 - &max_spd, &aggregate_lat,
3721 - &aggregate_lon,
3722 - &aggregate_alt, &aggregate_points,
3723 &maxrate, &quality, &signal, &noise,
3724 &best_quality, &best_signal,
3725 &best_noise,
3726 - &best_lat, &best_lon, &best_alt,
3727 (int *) &atype, &ip[0], &ip[1], &ip[2], &ip[3],
3728 &datasize, &maxseenrate, &encoding_set,
3729 &decrypted, &crypt_set);
3730 @@ -607,15 +560,6 @@
3731 client->last_time = last_time;
3732 client->first_time = first_time;
3733 client->encoding_set = encoding_set;
3734 - client->gps_fixed = gps_fixed;
3735 - client->min_lat = min_lat;
3736 - client->min_lon = min_lon;
3737 - client->min_alt = min_alt;
3738 - client->min_spd = min_spd;
3739 - client->max_lat = max_lat;
3740 - client->max_lon = max_lon;
3741 - client->max_alt = max_alt;
3742 - client->max_spd = max_spd;
3743 client->maxrate = maxrate;
3744 client->maxseenrate = maxseenrate;
3745 client->quality = quality;
3746 @@ -624,13 +568,6 @@
3747 client->best_quality = best_quality;
3748 client->best_signal = best_signal;
3749 client->best_noise = best_noise;
3750 - client->best_lat = best_lat;
3751 - client->best_lon = best_lon;
3752 - client->best_alt = best_alt;
3753 - client->aggregate_lat = aggregate_lat;
3754 - client->aggregate_lon = aggregate_lon;
3755 - client->aggregate_alt = aggregate_alt;
3756 - client->aggregate_points = aggregate_points;
3757 client->datasize = datasize;
3758 client->decrypted = decrypted;
3759
3760 @@ -653,10 +590,6 @@
3761 net_map[bssid]->type = network_remove;
3762 }
3763
3764 - } else if (!strncmp(header, "*GPS", 64)) {
3765 - if (sscanf(in_data+hdrlen, "%f %f %f %f %f %d", &lat, &lon, &alt, &spd, &heading, &mode) < 5)
3766 - return 0;
3767 -
3768 } else if (!strncmp(header, "*INFO", 64)) {
3769 char chan_details[1024];
3770 char chan_details_sec[1024];
3771 @@ -843,14 +776,6 @@
3772 return serv_time;
3773 }
3774
3775 -int TcpClient::FetchLoc(float *in_lat, float *in_lon, float *in_alt, float *in_spd, float *in_hed, int *in_mode) {
3776 - *in_lat = lat; *in_lon = lon;
3777 - *in_alt = alt; *in_spd = spd;
3778 - *in_hed = heading;
3779 - *in_mode = mode;
3780 - return mode;
3781 -}
3782 -
3783 vector<TcpClient::card_info *> TcpClient::FetchCardList() {
3784 return card_map_vec;
3785 }
3786 diff -urN kismet.old/tcpclient.h kismet.dev/tcpclient.h
3787 --- kismet.old/tcpclient.h 2005-07-25 16:19:44.000000000 +0200
3788 +++ kismet.dev/tcpclient.h 2005-08-15 01:06:11.096874776 +0200
3789 @@ -125,8 +125,6 @@
3790 // Disable a protocol
3791 void RemoveProtocol(string in_protocol);
3792
3793 - // Fetch the location
3794 - int FetchLoc(float *in_lat, float *in_lon, float *in_alt, float *in_spd, float *in_hed, int *in_mode);
3795 // Fetch the mode
3796 int FetchMode() { return mode; }
3797
3798 @@ -236,8 +234,6 @@
3799 struct hostent *client_host;
3800
3801 // Data sent to us
3802 - // GPS
3803 - float lat, lon, alt, spd, heading;
3804 int mode;
3805 // Timestampt
3806 time_t serv_time;
3807 diff -urN kismet.old/tcpstreamer.cc kismet.dev/tcpstreamer.cc
3808 --- kismet.old/tcpstreamer.cc 2005-07-25 16:19:44.000000000 +0200
3809 +++ kismet.dev/tcpstreamer.cc 2005-08-15 00:54:02.870582000 +0200
3810 @@ -31,7 +31,6 @@
3811
3812 max_fd = 0;
3813
3814 - gpsd = NULL;
3815 }
3816
3817 TcpStreamer::~TcpStreamer()
3818 @@ -287,10 +286,6 @@
3819 hdr.frame_len = (uint32_t) htonl(sizeof(struct stream_version_packet));
3820
3821 vpkt.drone_version = (uint16_t) htons(STREAM_DRONE_VERSION);
3822 - if (gpsd != NULL)
3823 - vpkt.gps_enabled = 1;
3824 - else
3825 - vpkt.gps_enabled = 0;
3826
3827 if (!FD_ISSET(in_fd, &client_fds))
3828 return -1;
3829 @@ -361,22 +356,6 @@
3830 packhdr.carrier = in_packet->carrier;
3831 packhdr.encoding = in_packet->encoding;
3832 packhdr.datarate = (uint32_t) htonl(in_packet->datarate);
3833 - // GPS first-iteration
3834 - Float2Pair(in_packet->gps_lat, &packhdr.gps_lat, &packhdr.gps_lat_mant);
3835 - Float2Pair(in_packet->gps_lon, &packhdr.gps_lon, &packhdr.gps_lon_mant);
3836 - Float2Pair(in_packet->gps_alt, &packhdr.gps_alt, &packhdr.gps_alt_mant);
3837 - Float2Pair(in_packet->gps_spd, &packhdr.gps_spd, &packhdr.gps_spd_mant);
3838 - packhdr.gps_fix = in_packet->gps_fix;
3839 - // endianswap
3840 - packhdr.gps_lat = (int16_t) htons(packhdr.gps_lat);
3841 - packhdr.gps_lat_mant = (int64_t) kis_hton64(packhdr.gps_lat_mant);
3842 - packhdr.gps_lon = (int16_t) htons(packhdr.gps_lon);
3843 - packhdr.gps_lon_mant = (int64_t) kis_hton64(packhdr.gps_lon_mant);
3844 - packhdr.gps_alt = (int16_t) htons(packhdr.gps_alt);
3845 - packhdr.gps_alt_mant = (int64_t) kis_hton64(packhdr.gps_alt_mant);
3846 - packhdr.gps_spd = (int16_t) htons(packhdr.gps_spd);
3847 - packhdr.gps_spd_mant = (int64_t) kis_hton64(packhdr.gps_spd_mant);
3848 -
3849 // Sourcename
3850 memcpy(packhdr.sourcename, in_packet->sourcename, 32);
3851
3852 diff -urN kismet.old/tcpstreamer.h kismet.dev/tcpstreamer.h
3853 --- kismet.old/tcpstreamer.h 2005-07-25 16:19:44.000000000 +0200
3854 +++ kismet.dev/tcpstreamer.h 2005-08-15 00:54:22.181646272 +0200
3855 @@ -42,7 +42,6 @@
3856 #include "ringbuf.h"
3857 #include "packet.h"
3858 #include "packetstream.h"
3859 -#include "gpsd.h"
3860
3861 // Global in kismet_drone.cc
3862 extern int silent;
3863 @@ -76,9 +75,6 @@
3864
3865 int FetchDescriptor() { return serv_fd; }
3866
3867 - // Register the GPS server for us to use
3868 - void AddGpstracker(GPSD *in_gpsd) { gpsd = in_gpsd; }
3869 -
3870 void Kill(int in_fd);
3871
3872 int Poll(fd_set& in_rset, fd_set& in_wset);
3873 @@ -125,7 +121,6 @@
3874
3875 unsigned int max_fd;
3876
3877 - GPSD *gpsd;
3878 };
3879
3880 #endif
3881 diff -urN kismet.old/tracktypes.h kismet.dev/tracktypes.h
3882 --- kismet.old/tracktypes.h 2005-07-25 16:19:44.000000000 +0200
3883 +++ kismet.dev/tracktypes.h 2005-08-15 00:55:29.308441448 +0200
3884 @@ -104,22 +104,6 @@
3885
3886 data_packets = crypt_packets = interesting_packets = 0;
3887
3888 - gps_fixed = -1;
3889 -
3890 - /* by setting the min to the highest possible values in the range and
3891 - max to the lowest we ensure that the data is correct */
3892 - min_lat = 90;
3893 - max_lat = -90;
3894 - min_lon = 180;
3895 - max_lon = -180;
3896 -
3897 - /* since these are not limited, we just set to 0 */
3898 - min_alt = min_spd = 0;
3899 - max_alt = max_spd = 0;
3900 -
3901 - aggregate_lat = aggregate_lon = aggregate_alt = 0;
3902 - aggregate_points = 0;
3903 -
3904 maxrate = 0;
3905 maxseenrate = 0;
3906
3907 @@ -219,13 +203,6 @@
3908 int crypt_packets;
3909 int interesting_packets;
3910
3911 - // gps data
3912 - int gps_fixed;
3913 - float min_lat, min_lon, min_alt, min_spd;
3914 - float max_lat, max_lon, max_alt, max_spd;
3915 - double aggregate_lat, aggregate_lon, aggregate_alt;
3916 - long aggregate_points;
3917 -
3918 // How fast we can go
3919 double maxrate;
3920 // How fast we've been seen to go, in 100kbs units
3921 @@ -288,22 +265,6 @@
3922 beacon = 0;
3923 listed = 0;
3924
3925 - gps_fixed = -1;
3926 -
3927 - /* by setting the min to the highest possible values in the range and
3928 - max to the lowest we ensure that the data is correct */
3929 - min_lat = 90;
3930 - max_lat = -90;
3931 - min_lon = 180;
3932 - max_lon = -180;
3933 -
3934 - /* since these are not limited, we just set to 0 */
3935 - min_alt = min_spd = 0;
3936 - max_alt = max_spd = 0;
3937 -
3938 - aggregate_lat = aggregate_lon = aggregate_alt = 0;
3939 - aggregate_points = 0;
3940 -
3941 maxrate = 0;
3942 maxseenrate = 0;
3943
3944 @@ -469,14 +430,6 @@
3945
3946 map<string, cdp_packet> cisco_equip;
3947
3948 - int gps_fixed;
3949 - float min_lat, min_lon, min_alt, min_spd;
3950 - float max_lat, max_lon, max_alt, max_spd;
3951 -
3952 - // Averaged center position
3953 - double aggregate_lat, aggregate_lon, aggregate_alt;
3954 - long aggregate_points;
3955 -
3956 // How fast we can go
3957 double maxrate;
3958
This page took 0.199779 seconds and 5 git commands to generate.