Let there be a working dstumbler on -CURRENT!

# uname -a
FreeBSD localhost 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Nov 17 15:08:10 PST 2003     sean@localhost:/usr/obj/usr/src/sys/POSDELLAPTOP  i386
# dmesg -a | grep wi0
wi0: <NETGEAR MA401 Wireless PC Card> at port 0x100-0x13f irq 11 function 0    \
config 1 on pccard0
wi0: 802.11 address: 00:30:ab:11:f6:88
wi0: using RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A
wi0: Intersil Firmware: Primary (0.3.0), Station (0.8.3)
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
# dstumbler wi0 -o
[dstumbler fires up and works beautifully]

Pointed out by:	Eugene <eugene3@web.de>
This commit is contained in:
Sean Chittenden 2003-11-19 05:00:58 +00:00
parent 1ce4c7b716
commit 31d1fc36cc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=94322
20 changed files with 6 additions and 314 deletions

View file

@ -6,9 +6,9 @@
#
PORTNAME= bsd-airtools
PORTVERSION= 0.2
PORTVERSION= 0.3
CATEGORIES= net
MASTER_SITES= http://www.dachb0den.com/projects/bsd-airtools/
MASTER_SITES= http://people.FreeBSD.org/~seanc/ports/bsd-airtools/
DISTNAME= ${PORTNAME}-v${PORTVERSION}
EXTRACT_SUFX= .tgz

View file

@ -1 +1 @@
MD5 (bsd-airtools-v0.2.tgz) = f4e4378d4bb831e83650ae0c81039e18
MD5 (bsd-airtools-v0.3.tgz) = c3c2546e3d930da01c6bff1528b6e369

View file

@ -1,12 +0,0 @@
--- dstumbler/config.h.orig Tue Feb 26 03:01:31 2002
+++ dstumbler/config.h Mon Jul 21 13:58:00 2003
@@ -134,7 +134,9 @@
{ { 0x00, 0x04, 0x5a }, "Linksys" }, \
{ { 0x00, 0x04, 0x76 }, "3Com" }, \
{ { 0x00, 0x05, 0x5d }, "D-Link" }, \
+ { { 0x00, 0x07, 0x55 }, "Cisco Aironet" }, \
{ { 0x00, 0x10, 0xe7 }, "BreezeNet" }, \
+ { { 0x00, 0x0b, 0x5f }, "Cisco Aironet" }, \
{ { 0x00, 0x20, 0xd8 }, "NetWave-Bay" }, \
{ { 0x00, 0x30, 0x65 }, "Apple" }, \
{ { 0x00, 0x30, 0xab }, "Delta Networks" }, \

View file

@ -1,11 +0,0 @@
--- dstumbler/dstumbler.h.orig Sat Jul 6 14:57:30 2002
+++ dstumbler/dstumbler.h Sat Jul 6 14:57:48 2002
@@ -47,7 +47,7 @@
#include <net/if.h>
#include <sys/termios.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
#ifdef __OpenBSD__
#include <curses.h>

View file

@ -1,50 +0,0 @@
--- dstumbler/main.c.orig Tue Feb 26 01:16:07 2002
+++ dstumbler/main.c Mon Jul 21 13:26:23 2003
@@ -177,12 +177,24 @@
/*
* start the input/output handling loop
*/
-#define SETMONCHAN() \
- if(monmode && chanlock && (apchange || apnew))\
- {\
- ch = aps[(aps_new && autosel) ? aps_new : aps_cur]->chan;\
- setdebugchan(iface, ch);\
+
+static void __inline
+SETMONCHAN(const char *iface)
+{
+ if (monmode && chanlock && (apchange || apnew))
+ {
+ int apidx = (aps_new && autosel) ? aps_new : aps_cur;
+ /*
+ * Don't set the channel if no IBSS/ESSes have been
+ * discovered yet.
+ */
+ if (aps[apidx] != NULL) {
+ ch = aps[apidx]->chan;
+ setdebugchan(iface, ch);
+ }
}
+}
+
void
start_loop(const char *iface)
{
@@ -271,7 +283,7 @@
*/
if(monmode && mon_next(iface) == -1)
{
- SETMONCHAN();
+ SETMONCHAN(iface);
smart_redraw();
continue;
}
@@ -279,7 +291,7 @@
parse_ap(iface);
parse_node(iface);
- SETMONCHAN();
+ SETMONCHAN(iface);
smart_redraw();
apchange = apnew = 0;

View file

@ -1,38 +0,0 @@
--- dstumbler/wistat.c.orig Fri Jan 11 07:05:43 2002
+++ dstumbler/wistat.c Mon Jul 21 13:27:51 2003
@@ -468,17 +468,6 @@
return;
}
- if(scanmode)
- {
- setscanreq(iface);
-
- /*
- * some systems need the card to wait a bit before more config options are
- * set, otherwise it could lock up the system.
- */
- usleep(POLLSPEED);
- }
-
/* first backup the current keys and encryption status */
getcryptkeys(iface, &backup.keys);
getcrypt(iface, &backup.crypt);
@@ -503,6 +492,17 @@
/* set a null ssid for the default */
setdefaultssid(iface, "\0");
+
+ if(scanmode)
+ {
+ setscanreq(iface);
+
+ /*
+ * some systems need the card to wait a bit before more config options are
+ * set, otherwise it could lock up the system.
+ */
+ usleep(POLLSPEED);
+ }
backup.wi_started++;
}

View file

@ -1,11 +0,0 @@
--- dweputils/dwepcrack/dwepcrack.h.orig Sat Jul 6 15:21:15 2002
+++ dweputils/dwepcrack/dwepcrack.h Sat Jul 6 15:21:32 2002
@@ -38,7 +38,7 @@
#include <sys/types.h>
#include <pcap.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
/*
* definitions

View file

@ -1,11 +0,0 @@
--- dweputils/dwepdump/dwepdump.c.orig Sat Jul 6 15:24:30 2002
+++ dweputils/dwepdump/dwepdump.c Sat Jul 6 15:24:45 2002
@@ -46,7 +46,7 @@
#include <errno.h>
#include <pcap.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
/*
* definitions

View file

@ -1,11 +0,0 @@
--- prism2ctl/prism2ctl.c.orig Sat Jul 6 15:27:53 2002
+++ prism2ctl/prism2ctl.c Sat Jul 6 15:28:10 2002
@@ -50,7 +50,7 @@
#include <sys/time.h>
#include <net/if.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
#include <string.h>
#include <unistd.h>

View file

@ -1,10 +0,0 @@
--- prism2dump/fields_mgmt.c.orig Sat Jul 6 15:30:42 2002
+++ prism2dump/fields_mgmt.c Sat Jul 6 15:30:54 2002
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <sys/types.h>
+#include <string.h>
#include <pcap.h>

View file

@ -6,9 +6,9 @@
#
PORTNAME= bsd-airtools
PORTVERSION= 0.2
PORTVERSION= 0.3
CATEGORIES= net
MASTER_SITES= http://www.dachb0den.com/projects/bsd-airtools/
MASTER_SITES= http://people.FreeBSD.org/~seanc/ports/bsd-airtools/
DISTNAME= ${PORTNAME}-v${PORTVERSION}
EXTRACT_SUFX= .tgz

View file

@ -1 +1 @@
MD5 (bsd-airtools-v0.2.tgz) = f4e4378d4bb831e83650ae0c81039e18
MD5 (bsd-airtools-v0.3.tgz) = c3c2546e3d930da01c6bff1528b6e369

View file

@ -1,12 +0,0 @@
--- dstumbler/config.h.orig Tue Feb 26 03:01:31 2002
+++ dstumbler/config.h Mon Jul 21 13:58:00 2003
@@ -134,7 +134,9 @@
{ { 0x00, 0x04, 0x5a }, "Linksys" }, \
{ { 0x00, 0x04, 0x76 }, "3Com" }, \
{ { 0x00, 0x05, 0x5d }, "D-Link" }, \
+ { { 0x00, 0x07, 0x55 }, "Cisco Aironet" }, \
{ { 0x00, 0x10, 0xe7 }, "BreezeNet" }, \
+ { { 0x00, 0x0b, 0x5f }, "Cisco Aironet" }, \
{ { 0x00, 0x20, 0xd8 }, "NetWave-Bay" }, \
{ { 0x00, 0x30, 0x65 }, "Apple" }, \
{ { 0x00, 0x30, 0xab }, "Delta Networks" }, \

View file

@ -1,11 +0,0 @@
--- dstumbler/dstumbler.h.orig Sat Jul 6 14:57:30 2002
+++ dstumbler/dstumbler.h Sat Jul 6 14:57:48 2002
@@ -47,7 +47,7 @@
#include <net/if.h>
#include <sys/termios.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
#ifdef __OpenBSD__
#include <curses.h>

View file

@ -1,50 +0,0 @@
--- dstumbler/main.c.orig Tue Feb 26 01:16:07 2002
+++ dstumbler/main.c Mon Jul 21 13:26:23 2003
@@ -177,12 +177,24 @@
/*
* start the input/output handling loop
*/
-#define SETMONCHAN() \
- if(monmode && chanlock && (apchange || apnew))\
- {\
- ch = aps[(aps_new && autosel) ? aps_new : aps_cur]->chan;\
- setdebugchan(iface, ch);\
+
+static void __inline
+SETMONCHAN(const char *iface)
+{
+ if (monmode && chanlock && (apchange || apnew))
+ {
+ int apidx = (aps_new && autosel) ? aps_new : aps_cur;
+ /*
+ * Don't set the channel if no IBSS/ESSes have been
+ * discovered yet.
+ */
+ if (aps[apidx] != NULL) {
+ ch = aps[apidx]->chan;
+ setdebugchan(iface, ch);
+ }
}
+}
+
void
start_loop(const char *iface)
{
@@ -271,7 +283,7 @@
*/
if(monmode && mon_next(iface) == -1)
{
- SETMONCHAN();
+ SETMONCHAN(iface);
smart_redraw();
continue;
}
@@ -279,7 +291,7 @@
parse_ap(iface);
parse_node(iface);
- SETMONCHAN();
+ SETMONCHAN(iface);
smart_redraw();
apchange = apnew = 0;

View file

@ -1,38 +0,0 @@
--- dstumbler/wistat.c.orig Fri Jan 11 07:05:43 2002
+++ dstumbler/wistat.c Mon Jul 21 13:27:51 2003
@@ -468,17 +468,6 @@
return;
}
- if(scanmode)
- {
- setscanreq(iface);
-
- /*
- * some systems need the card to wait a bit before more config options are
- * set, otherwise it could lock up the system.
- */
- usleep(POLLSPEED);
- }
-
/* first backup the current keys and encryption status */
getcryptkeys(iface, &backup.keys);
getcrypt(iface, &backup.crypt);
@@ -503,6 +492,17 @@
/* set a null ssid for the default */
setdefaultssid(iface, "\0");
+
+ if(scanmode)
+ {
+ setscanreq(iface);
+
+ /*
+ * some systems need the card to wait a bit before more config options are
+ * set, otherwise it could lock up the system.
+ */
+ usleep(POLLSPEED);
+ }
backup.wi_started++;
}

View file

@ -1,11 +0,0 @@
--- dweputils/dwepcrack/dwepcrack.h.orig Sat Jul 6 15:21:15 2002
+++ dweputils/dwepcrack/dwepcrack.h Sat Jul 6 15:21:32 2002
@@ -38,7 +38,7 @@
#include <sys/types.h>
#include <pcap.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
/*
* definitions

View file

@ -1,11 +0,0 @@
--- dweputils/dwepdump/dwepdump.c.orig Sat Jul 6 15:24:30 2002
+++ dweputils/dwepdump/dwepdump.c Sat Jul 6 15:24:45 2002
@@ -46,7 +46,7 @@
#include <errno.h>
#include <pcap.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
/*
* definitions

View file

@ -1,11 +0,0 @@
--- prism2ctl/prism2ctl.c.orig Sat Jul 6 15:27:53 2002
+++ prism2ctl/prism2ctl.c Sat Jul 6 15:28:10 2002
@@ -50,7 +50,7 @@
#include <sys/time.h>
#include <net/if.h>
-#include <bat/common.h>
+#include <dev/wi/if_wavelan_ieee.h>
#include <string.h>
#include <unistd.h>

View file

@ -1,10 +0,0 @@
--- prism2dump/fields_mgmt.c.orig Sat Jul 6 15:30:42 2002
+++ prism2dump/fields_mgmt.c Sat Jul 6 15:30:54 2002
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <sys/types.h>
+#include <string.h>
#include <pcap.h>