Skip to contentSkip to conversation

ipw2200: Enable rtap interface for RF promiscuous mode while associated

PATCH In review Zhu Yi 1 participant 1 message Apr 13, 2006

Subsystems (3)
lore
Share & tools
lore

Zhu Yi

author
#0 lore raw

PATCH 11/18 ipw2200: Enable rtap interface for RF promiscuous mode while associated

With this patch, a new promiscuous mode is enabled. If the module is loaded with the rtap_iface=1 module parameter, two interfaces will be created (instead of just one).

The second interface is prefixed 'rtap' and provides received 802.11 frames on the current channel to user space in a radiotap header format.

Example usage:

% modprobe ipw2200 rtap_iface=1
% iwconfig eth1 essid MyNetwork
% dhcpcd eth1
% tcpdump -i rtap0

If you do not specify 'rtap_iface=1' then the rtap interface will not be created and you will need to turn it on via:

        % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface

You can filter out what type of information is passed to user space via the rtap_filter sysfs entry. Currently you can tell the driver to transmit just the headers (which will provide the RADIOTAP and IEEE 802.11 header but not the payload), to filter based on frame control type (Management, Control, or Data), and whether to report transmitted frames, received frames, or both.

The transmit frame reporting is based on a patch by Stefan Rompf.

Filters can be get and set via a sysfs interface. For example, set the filter to only send headers (0x7), don't report Tx'd frames (0x10), and don't report data frames (0x100):

        % echo 0x117 > /sys/bus/pci/drivers/ipw2200/*/rtap_filter

All your packets are belong to us:

% tethereal -n -i rtap0

---

 drivers/net/wireless/Kconfig   |   24 ++
 drivers/net/wireless/ipw2200.c |  599 ++++++++++++++++++++++++++++++++++++++--
 drivers/net/wireless/ipw2200.h |   77 +++++
 3 files changed, 673 insertions(+), 27 deletions(-)

02631c88b57c16ae4989d17ae4ca5babb4b3501a

drivers/net/wireless/Kconfig +24 -0
index e5ea89e..5cd9c16 100644
@@ -263,6 +263,30 @@ config IPW2200_DEBUG
 	  If you are not trying to debug or develop the IPW2200 driver, you 
 	  most likely want to say N here.
 
+config IPW2200_PROMISCUOUS
+	bool "Enable creation of a RF radiotap promiscuous interface."
+	depends on IPW2200
+	select IEEE80211_RADIOTAP
+	---help---
+          Enables the creation of a second interface prefixed 'rtap'. 
+          This second interface will provide every received in radiotap
+	  format.
+
+          This is useful for performing wireless network analysis while
+          maintaining an active association.
+
+          Example usage:
+
+            % modprobe ipw2200 rtap_iface=1
+            % ifconfig rtap0 up
+            % tethereal -i rtap0
+
+          If you do not specify 'rtap_iface=1' as a module parameter then 
+          the rtap interface will not be created and you will need to turn 
+          it on via sysfs:
+	
+            % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
+
 config AIRO
 	tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
  	depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN)
drivers/net/wireless/ipw2200.c +573 -26

714 lines not on this page · raw message

drivers/net/wireless/ipw2200.h +76 -1

101 lines not on this page · raw message

Signature · 1 line
1.2.6