Linux无线网络系统分析_第1页
Linux无线网络系统分析_第2页
Linux无线网络系统分析_第3页
Linux无线网络系统分析_第4页
Linux无线网络系统分析_第5页
已阅读5页,还剩28页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Linux无线网络系统分析孟宁电话讯微博:@mengning997新浪微博:@孟宁V5E-mail:mengning@主页:/~mengning地址:苏州工业园区独墅湖高等教育区仁爱路188号思贤楼504室2013年6月内容组织的逻辑一是硬件上,有哪些东西,他们是如何放置的。硬件:网络+有线网络⇒无线网络⇒80211无线网络二是软件上,通信协议上,是如何实现通信的。软件:Linux网络架构⇒Linux下的80211无线网络架构802.11和OSI模型80211WirelessLANBSSstandsforBasicServiceSet.ThecoverageofanaccesspointiscalledaBSS.STAindicatesawirelessdeviceactinginBSSasaregularSTAtion.IBSSstandsforIndependentBasicServiceSet.ItsbasicallyAd-Hocmode.SSIDstandsforServiceSetIDentifier.TheSSIDisacodeattachedtoallpacketsonawirelessnetworktoidentifyeachpacketaspartofthatnetwork.Thecodeconsistsofastringof1-32octets(usuallyrepresentedascasesensitivealphanumericcharacters).无线信号传输方式窄带无线电通信(Narrow-BandRadio)这种技术类似于无线电台的广播,必须把发送器和接收器都调拨到同一频带。无线电信号可以穿越墙物,在一个很广的域内传播,所以不必把它调聚成束。然而,窄带射频发送有无线电波反射的问题,并受联邦通信委员会管制,它们必须准确地进行调谐,以防其它频率的干扰。扩展频谱通信(SpreadSpectrumCommunication)简称扩频通信,是一种信息传输方式,其信号所占有的频带宽度远大于所传信息必需的最小带宽。频带的扩展是通过一个独立的码序列(一般是伪随机码)来完成,用编码及调制的方法来实现的,与所传信息数据无关在接收端则用同样的码进行相关同步接收、解扩及恢复所传信息数据。这种技术是在一个很宽的频率范围内广播信号,避免在窄带无线电通信中遇到的问题。用一种编码来传播信号,接收站用同一编码来恢复信号。用这种方法,扩频无线电信号能工作在其它信号所占据的频率范围内。扩频无线电信号不会干涉常规的无线电广播,这是因为它的能量十分微弱。80211FrameTypeManagementFramesAuthenticationframe,DeauthenticationframeAssociationrequestframe,Associationresponseframe,DisassociationframeReassociationrequestframe,ReassociationresponseframeBeaconFrame:Authenticationframe,DeauthenticationframeProberequestframe,ProberesponseframeControlFramesRequesttoSend(RTS)frameCleartoSend(CTS)frame(UseRTS/CTStoavoidhiddenstationproblem)Acknowledgement(ACK)frameDataFramesCSMA/CACSMA/CA(CarrierSenseMultipleAccesswithCollisionAvoidance)Astationwishingtotransmitsensestheair,and,ifnoactivityisdetected,thestationwaitsanadditional,randomlyselectedperiodoftimeandthentransmitsifthemediumisstillfree.Ifthepacketisreceivedintact,thereceivingstationissuesanACKframethat,oncesuccessfullyreceivedbythesender,completestheprocess.IftheACKframeisnotdetectedbythesendingstation,eitherbecausetheoriginaldatapacketwasnotreceivedintactortheACKwasnotreceivedintact,acollisionisassumedtohaveoccurredandthedatapacketistransmittedagainafterwaitinganotherrandomamountoftime.MLMEMLMEStandsforMediaAccessControl(MAC)SublayerManagementEntity.MLMEisthemanagemententitywherethePhysicallayer(PHY)MACstatemachinesreside.Linux无线网络架构wext/WE是WirelessExtensions的缩写Linux网络设备工作原理FullMACandSoftMACFullMACisatermusedtodescribeatypeofwirelesscardwheretheMLMEismanagedinhardware.Youwouldnotusemac80211towriteaFullMACwirelessdriver.SoftMACisatermusedtodescribeatypeofwirelesscardwheretheMLMEisexpectedtobemanagedinsoftware.mac80211isadriverAPIforSoftMACwirelesscards,forexample.Radiotap

Radiotap是一个标准,用于802.11的帧接收(framereception)和帧注入(frameinjection)所谓的帧接收,就是硬件(网卡)用中断通知CPU,一个数据帧到了,要CPU去接收。一般是在将无线网卡设置为混杂模式的时候,底层接受到数据帧之后,不处理,而是直接传送给上层处理,一般用于分析无线网络数据传输的时候,分析网络问题到底出现在哪。CodestructureMostimportantfordriverauthors:include/net/mac80211.hThisfiledefinestheAPItomac80211frombelow.CodestructureAllfilesexcepttheheaderfileareinnet/mac80211/.Kconfig,Makefilebuildsystemieee80211i.hmostinternaldatastructuresmain.cmainmoduleentrypointsmainentrypointsfordrivercalls(reg/dereg)iface.cvirtualinterfacehandlingkey.c,key.hkeymanagementstainfo.c,stainfo.hStation(peer)managementpm.cpowermanagement(suspend/hibernate)rate.c,rate.hinternalratecontrolfunctionsrc80211*ratecontrolalgorithmsrx.cframereceivepathtx.cframetransmitpathscan.csoftwarescanningcodeCodestructureht.c,agg-rx.c,agg-tx.cHT/aggregationcodemesh{,hwmp,plink,pathtbl}.{c,h}802.11smeshmlme.cStation/managedmodeMLMEibss.cIBSSMLMEcfg.c,cfg.h,wext.cconfigurationentrypointsevent.ceventstouserspacespectmgmt.cspectrummanagementcodeaes*,tkip.*,wep.*,michael.*,wpa.*WPA/RSN/WEPcodewme.c,wme.hsomeQoScodeutil.cutilityfunctionsled.c,led.hLEDhandlingdebugfs*debugfscodeDatastructuresieee80211_local/ieee80211_hwsta_info/ieee80211_staieee80211_confieee80211_bss_confieee80211_key/ieee80211_key_confieee80211_tx_infoieee80211_rx_statusieee80211_sub_if_data/ieee80211_vifieee80211_local/ieee80211_hweachinstanceofthese(hwisembeddedintolocal)represents

awirelessdeviceieee80211_hwisthepartofiieee80211_localthatisvisibleto

driverscontainsalloperatinginformationaboutawirelessdevicesta_info/ieee80211_starepresentsanystation(peer)couldbemeshpeer,IBSSpeer,AP,WDSpeerwouldalsobeusedforDLSpeerieee80211_staisdriver-visiblepartieee80211_find_stafordriverslifetimemanagedmostlywithRCUieee80211_confhardwareconfigurationmostimportantly-currentchannelintention:hardwarespecificparametersieee80211_bss_confBSSconfigurationforallkindsofBSSes(IBSS/AP/managed)containse.g.basicratebitmapintention:perBSSparametersincasehardwaresupports

creating/associatingwithmultipleBSSesieee80211_key/ieee80211_key_confrepresentsanencryption/decryptionkeyieee80211_key_confgiventodriverforhardwareaccelerationieee80211_keycontainsinternalbook-keepingandsoftware

encryptionstateieee80211_tx_infomostcomplicateddatastructurelivesinsideskb’scontrolbuffer(cb)goesthroughthreestages(substructureforeach)initialisationbymac80211(control)usebydriver(driver_data/rate_driver_data)useforTXstatusreporting(status)ieee80211_rx_statuscontainsstatusaboutareceivedframepassedbydrivertomac80211withareceivedframeieee80211_sub_if_data/ieee80211_vifcontainsinformationabouteachvirtualinterfaceieee80211_vifispassedtodriverforthosevirtualinterfaces

thedriverknowsabout(notmonitor,VLAN)containssub-structuresdependingonmodeieee80211_if_apieee80211_if_wdsieee80211_if_vlanieee80211_if_managedieee80211_if_ibssieee80211_if_meshMainflowsconfigurationreceivepathtransmitpathmanagement/MLMEMainflows–configurationallinitiatedfromuserspace(wextornl80211)formanagedandIBSSmodes:triggersstatemachine(on

workqueue)someoperationspassedthroughtodrivermoreorlessdirectly

(e.g.channelsetting)Mainflows–receivepathpacketreceivedbydriverpassedtomac80211’srxfunction(ieee80211_rx)with

rx_statusinfoforeachinterfacethatthepacketmightbelongtoRXhandlersareinvokeddata:convertedto802.3,deliveredtonetworkingstackmanagement:deliveredtoMLMEMainflows–transmitpathpackethandedtovirtualinterface’sieee80211_subif_start_xmitconvertedto802.11formatsenttomasterinterfacepackethandedtoieee80211_master_start_xmittransmithandlersrun,controlinformationcreatedpacketgiventodrivertransmithandlersieee80211_tx_h_check_associeee80211_tx_h_ps_bufieee80211_tx_h_select_keyieee80211_tx_h_michael_mic_addieee80211_tx_h_rate_ctrlieee80211_tx_h_miscieee80211_tx_h_seq

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论