2005-06-25

MADWiFi step by step――以Atheros芯片为基础的无线网卡的Linux驱动解决方案

归类于: Tech — chenxq @ 20:30:11

Debian GNU/Linux sid
kernel 2.6.12-enVision ;-)
TP-LINK WN310G测试成功

之前曾经写过Linux下驱动无线网卡的方法
主要是ndiswrapper加Windows下的网卡驱动的方法

今天找文档的时候无意中发现MADWiFi http://madwifi.sourceforge.net

网站上的简介说:
MADWiFi is short for Multiband Atheros Driver for WiFi. In other words: this project provides a Linux kernel driver for Atheros-based Wireless LAN devices. The driver works such that your WLAN card will appear as normal network interface in the system. Additionally there is support for the Wireless Extensions API. This allows you to configure the device using the usual tools (ifconfig, iwconfig and friends).

Some of the driver´s key features are:

* Allows operation as station, AP, ad-hoc, monitor. WDS is work in progress. * Supports Wireless Extensions API. * One driver for miniPCI and cardbus devices. USB devices are not yet supported. * Most of the current Atheros WLAN chipsets are supported. * Supports WEP and WPA/802.11i. * Support for 802.1x authentication in AP mode.

MADWiFi step by step:

一、检查你的网卡是否是基于Atheros芯片的无线网卡
在Atheros的官方网站上可以查网卡是不是基于Atheros芯片的,链接
http://customerproducts.atheros.com/customerproducts
或者用lspci | grep Atheros看看
如果有类似如下的输出就满足条件了
0000:03:00.0 Ethernet controller: Atheros Communications, Inc.: Unknown device 001a (rev01)

二、检查一下条件是否满足
2.4或者2.6版本的内核
无线扩展版本大于14(推荐16)
内核支持sysctl
若要使用802.1x认证,还需要crypto API支持(HMAC和MD5)
若使用Cardbus卡,需要hotplugd
编译MADWiFi时,需要uudecode,(许多发行版通常在一个叫做sharutils的包里面,debian user可以apt-get install sharutils)

可以在编译的时候用make configcheck来检查
feuvan@envision:~/madwifi-cvs/madwifi$ make configcheck
Checking if all requirements are met… ok.

三、下载编译MADWiFi
feuvan@envision:~$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi
在madwifi里就放着MADWiFi的cvs代码了
不必担心cvs代码不够稳定,据说MADWiFi cvs代码是almost stable,呵呵

四、编译安装
su到root用户,make,make install即可完成安装
示例如下:
feuvan@envision:~$ su -
Password:
envision:~# cd /home/feuvan/madwifi-cvs/madwifi/
envision:/home/feuvan/madwifi-cvs/madwifi# make
make完了之后
envision:/home/feuvan/madwifi-cvs/madwifi# make install
即可完成安装

另外,make all的话,会在tools目录下生成一堆工具
不过如果网络工作正常的话,也就没啥好用的

五、使用配置
modprobe ath_pci
然后就可以用了
会增加一个叫做ath0的网卡
iwconfig和ifconfig怎么用我就不多说了,hiahia,自己man或者–help吧
需要WEP加密的话再modprobe wlan_wep

六、一些诡异的问题的解决
WEP相关:
有时候一直无法和启用了WEP加密的AP关联,一直在搜索网络,这个问题我也碰到了
解决方法:
ifconfig ath0 down
iwconfig ath0 key restricted
iwpriv ath0 authmode 2
ifconfig ath0 up
然后就可以了,hmmm

我的网络配置文件(Debian系统)
cat /etc/network/interfaces
auto ath0
iface ath0 inet static
        address 192.168.0.102
        netmask 255.255.255.0
        network 192.168.0.0
        boardcast 192.168.0.255
        gateway 192.168.0.1
        wireless_essid roomxxx
        wireless_mode Managed
        wireless_rate 54M auto
        wireless_key s:dummy

写完了,就这样子。hope it helps

[相关文章]
http://www.newsmth.net/pc/pccon.php?id=264&nid=147967&s=all

l7filter,Application Layer Packet Classifier for Linux - Details

归类于: Tech — chenxq @ 19:34:55

原文发表于blog.happynet.org/feuvan
链接地址http://blog.happynet.org/feuvan/view/2013
发表时间: 2005-05-30/16:34:31 | 最后更新: 2005-05-30 16:34:31


l7-filter-protocols
\
|   CHANGELOG
|   HOWTO
|   l7-protocols.spec
|   LICENSE
|   Makefile
|   README
|   WANTED
|
+---extra
|       audiogalaxy.pat
|       http-itunes.pat
|       httpaudio.pat
|       httpcachehit.pat
|       httpcachemiss.pat
|       httpvideo.pat
|       quicktime.pat
|       README
|       snmp-mon.pat
|       snmp-trap.pat
|
+---file_types
|       exe.pat
|       flash.pat
|       gif.pat
|       html.pat
|       jpeg.pat
|       ogg.pat
|       pdf.pat
|       perl.pat
|       postscript.pat
|       rar.pat
|       README
|       rpm.pat
|       rtf.pat
|       tar.pat
|       zip.pat
|
+---malware
|       code_red.pat
|       nimda.pat
|       README
|
+---protocols
|       100bao.pat
|       aim.pat
|       aimwebcontent.pat
|       applejuice.pat
|       ares.pat
|       battlefield1942.pat
|       bgp.pat
|       biff.pat
|       bittorrent.pat
|       ciscovpn.pat
|       counterstrike-source.pat
|       cvs.pat
|       dhcp.pat
|       directconnect.pat
|       dns.pat
|       edonkey.pat
|       fasttrack.pat
|       finger.pat
|       ftp.pat
|       gkrellm.pat
|       gnucleuslan.pat
|       gnutella.pat
|       goboogy.pat
|       gopher.pat
|       h323.pat
|       halflife2-deathmatch.pat
|       hddtemp.pat
|       hotline.pat
|       http.pat
|       ident.pat
|       imap.pat
|       ipp.pat
|       irc.pat
|       jabber.pat
|       kugoo.pat
|       live365.pat
|       lpd.pat
|       msn-filetransfer.pat
|       msnmessenger.pat
|       mute.pat
|       nbns.pat
|       ncp.pat
|       netbios.pat
|       nntp.pat
|       openft.pat
|       poco.pat
|       pop3.pat
|       pressplay.pat
|       qq.pat
|       quake-halflife.pat
|       quake1.pat
|       rdp.pat
|       rlogin.pat
|       rtsp.pat
|       shoutcast.pat
|       sip.pat
|       skypeout.pat
|       skypetoskype.pat
|       smb.pat
|       smtp.pat
|       snmp.pat
|       socks.pat
|       soribada.pat
|       ssdp.pat
|       ssh.pat
|       subspace.pat
|       telnet.pat
|       tesla.pat
|       tftp.pat
|       tls.pat
|       tsp.pat
|       unknown.pat
|       validcertssl.pat
|       vnc.pat
|       x11.pat
|       xboxlive.pat
|       yahoo.pat
|       zmaap.pat
|
\---testing
   |   Makefile
   |   match.c
   |   randchars.c
   |   randprintable.c
   |   README
   |   test_all.sh
   |   test_match.sh
   |   test_speed.c
   |   timeit.sh
   |
   \---regexp
           regerror.c
           regexp.c
           regexp.h
           regmagic.h
           regsub.c

README:
*** WHAT'S GOING ON? ***

These are patterns (protocol definitions) for use with the Linux layer 7
packet classifier (l7-filter).  In order to use them, you will need the
Linux kernel and iptables patches available at http://sf.net/projects/l7-filter/

To install these patterns into their default location, say "make install".

The HOWTO at http://l7-filter.sf.net explains how to use l7-filter.

The HOWTO in this directory is a guide to writing patterns.

These patterns should be used only with version 0.4.0 or higher of the
l7-filter Netfilter kernel patch.

*** WHAT'S IN HERE? ***

The patterns in the "protocols" directory are the mainstream ones.  They
match protocols like HTTP, FTP, eDonkey2000, Kazaa, and so on.

"extra" is for patterns of less general interest.

"malware" contains patterns for viruses and worms.  

"file_types" contains patterns for file types.

The "testing" directory contains a program for testing the speed and
accuracy of the patterns.

*** CAN I HELP? ***

Please report your experience with l7-filter and these patterns to
l7-filter-developers@lists.sf.net .  (Subscribe at
http://lists.sourceforge.net/lists/listinfo/l7-filter-developers )
You can also e-mail Matthew Strait directly at quadong AT users.sf.net

Please note that many of these patterns were NOT written by experts.  So
if you think a pattern is broken and you know better, you may be right!

l7filter,Application Layer Packet Classifier for Linux - Abstract

归类于: Tech — chenxq @ 19:18:44

原文发表于blog.happynet.org/feuvan
链接地址http://blog.happynet.org/feuvan/view/2005
发表时间: 2005-05-29/20:39:47 | 最后更新: 2005-05-30 16:28:19


From http://l7-filter.sourceforge.net/

 

 

 

Last updated 24 April 2005

水木社区Blog系统是基于KBS系统WordPress MU架构的