On Wed, Sep 17, 2008 at 1:18 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Wed, 2008-09-17 at 13:11 +0200, "Adam Cécile (Le_Vert)" wrote: > >> Why not having a talk with aircrack-ng main developper ? >> I'm sure he would be happy to work with you and avoid having a patched >> version of iw. > > Because I have no idea who to contact and figured that they'd notice > quickly enough? :) > > > Thomas, since people seem to be relying on iw more and more (I had been > hoping somebody else would take it and transform it into something > usable) I have gone ahead and cleaned up the code, made a few > modifications to it and released it as version 0.9 (and a few 0.9.x > fixes, my bad). > > There are two changes that might interest you: > * removing interfaces now works like this: > iw dev monitor0 del > I didn't feel inclined to keep the old syntax because it's rather > ugly but if this is a big problem for you I can add a hidden command > so you can continue doing "iw dev monitor0 interface del". > * if you've been using > iw dev wmaster0 interface add monitor0 type monitor > this will stop working in future kernel releases, the master > interface really is no good for actually configuring wireless and we > want to get rid of it completely in the medium term. I suspect you > have been using > iw dev wlan0 interface add monitor0 type monitor > which will continue to work. > > johannes > By the way, currently I am the one maintaining the mac80211/nl80211 support in aircrack-ng. Using iw was an intentional decision, as the airmon-ng command (used to set interfaces into monitor mode/create monitor interfaces automatically) is a Bash script, meaning that it can't access nl80211 directly. Rewriting airmon-ng in C is a 2.0 goal, and it definitely won't make 1.0. (I will try to push it into 1.1, but it's mostly Thomas' decision to allow it or not.) Prior to 2.6.24, it was possible to create/remove interfaces using sysfs, but this feature was removed from 2.6.24, "in favor of nl80211", which I interpreted to apply to Bash scripts as "in favor of iw". The actual code used in aircrack-ng for adding interfaces is: IW_ERROR=`iw dev $iface interface add $MONDEV type monitor 2>&1 | grep "nl80211 not found"` where $iface is the interface supplied by the user (not the associated master), while $MONDEV is a generated interface name, which is generated by the following method: 1. The value of the $MON_PREFIX variable ("mon" by default) is taken. 2. A number (starting with 0) is appended to $MON_PREFIX, and the resulting interface is checked for existence. If it does exist, the number is incremented. 3. When the first nonexistent interface is found, it is written to $MONDEV. So, the actual command used, for example, is: iw dev wlan0 interface add mon0 type monitor Similarly, the code used for removing interfaces is IW_ERROR=`iw dev "$iface" interface del 2>&1 | grep "nl80211 not found"` If I interpret your mail correctly, then this should be changed to: IW_ERROR=`iw dev "$iface" del 2>&1 | grep "nl80211 not found"` Will the same syntax change be made for the add feature? I mean this: iw dev wlan0 add mon0 type monitor Also, the following syntax would be even better: iw --add mon0 --dev=wlan0 --type=monitor or: iw -dwlan0 -tmonitor add mon0 Or at least allowing stuff like this: iw type monitor add mon0 dev wlan0 The purpose of the customized version of iw used by aircrack-ng is to allow it to compile on 2.6.24 without having to install mismatching kernel headers, and to enable installing iw without git (this second point is moot now that there are official tarballs). The only major changes are the removal of .config dependency and the use of a local nl80211.h. A "make install" feature was also added, as many users may be uncomfortable with copying binaries around. An experimental branch of aircrack-ng contains a slightly different version, which also has these additional changes: -Mesh support has been removed (as I couldn't get it compile with -Wall -Werror, which is a requirement for inclusion into aircrack-ng) -It was renamed to nl80211-ng (to avoid overwriting the full iw binary) -It is built by aircrack-ng's own make system, with no extra makefile. -The help text was changed, as this version is specifically expected to be used through airmon-ng. (It essentially acts as a bridge between the C-only nl80211 and airmon-ng, a Bash script.) These were needed because there was no true "release" of iw, and its development was focused on implementing all new features in the bleeding-edge wireless-testing kernel, with little focus on backwards compatibility with released kernels. -- Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html