Linux無線網(wǎng)絡系統(tǒng)分析_第1頁
Linux無線網(wǎng)絡系統(tǒng)分析_第2頁
Linux無線網(wǎng)絡系統(tǒng)分析_第3頁
Linux無線網(wǎng)絡系統(tǒng)分析_第4頁
Linux無線網(wǎng)絡系統(tǒng)分析_第5頁
已閱讀5頁,還剩28頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

Linux無線網(wǎng)絡系統(tǒng)分析孟寧電話訊微博:@mengning997新浪微博:@孟寧V5E-mail:mengning@主頁:/~mengning地址:蘇州工業(yè)園區(qū)獨墅湖高等教育區(qū)仁愛路188號思賢樓504室2013年6月內容組織的邏輯一是硬件上,有哪些東西,他們是如何放置的。硬件:網(wǎng)絡+有線網(wǎng)絡?無線網(wǎng)絡?80211無線網(wǎng)絡二是軟件上,通信協(xié)議上,是如何實現(xiàn)通信的。軟件:Linux網(wǎng)絡架構?Linux下的80211無線網(wǎng)絡架構802.11和OSI模型80211WirelessLANBSSstandsforBasicServiceSet.ThecoverageofanaccesspointiscalledaBSS.STAindicatesawirelessdeviceactinginBSSasaregularSTAtion.IBSSstandsforIndependentBasicServiceSet.ItsbasicallyAd-Hocmode.SSIDstandsforServiceSetIDentifier.TheSSIDisacodeattachedtoallpacketsonawirelessnetworktoidentifyeachpacketaspartofthatnetwork.Thecodeconsistsofastringof1-32octets(usuallyrepresentedascasesensitivealphanumericcharacters).無線信號傳輸方式窄帶無線電通信(Narrow-BandRadio)這種技術類似于無線電臺的廣播,必須把發(fā)送器和接收器都調撥到同一頻帶。無線電信號可以穿越墻物,在一個很廣的域內傳播,所以不必把它調聚成束。然而,窄帶射頻發(fā)送有無線電波反射的問題,并受聯(lián)邦通信委員會管制,它們必須準確地進行調諧,以防其它頻率的干擾。擴展頻譜通信(SpreadSpectrumCommunication)簡稱擴頻通信,是一種信息傳輸方式,其信號所占有的頻帶寬度遠大于所傳信息必需的最小帶寬。頻帶的擴展是通過一個獨立的碼序列(一般是偽隨機碼)來完成,用編碼及調制的方法來實現(xiàn)的,與所傳信息數(shù)據(jù)無關在接收端則用同樣的碼進行相關同步接收、解擴及恢復所傳信息數(shù)據(jù)。這種技術是在一個很寬的頻率范圍內廣播信號,避免在窄帶無線電通信中遇到的問題。用一種編碼來傳播信號,接收站用同一編碼來恢復信號。用這種方法,擴頻無線電信號能工作在其它信號所占據(jù)的頻率范圍內。擴頻無線電信號不會干涉常規(guī)的無線電廣播,這是因為它的能量十分微弱。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無線網(wǎng)絡架構wext/WE是WirelessExtensions的縮寫Linux網(wǎng)絡設備工作原理FullMACandSoftMACFullMACisatermusedtodescribeatypeofwirelesscardwheretheMLMEismanagedinhardware.Youwouldnotusemac80211towriteaFullMACwirelessdriver.SoftMACisatermusedtodescribeatypeofwirelesscardwheretheMLMEisexpectedtobemanagedinsoftware.mac80211isadriverAPIforSoftMACwirelesscards,forexample.Radiotap

Radiotap是一個標準,用于802.11的幀接收(framereception)和幀注入(frameinjection)所謂的幀接收,就是硬件(網(wǎng)卡)用中斷通知CPU,一個數(shù)據(jù)幀到了,要CPU去接收。一般是在將無線網(wǎng)卡設置為混雜模式的時候,底層接受到數(shù)據(jù)幀之后,不處理,而是直接傳送給上層處理,一般用于分析無線網(wǎng)絡數(shù)據(jù)傳輸?shù)臅r候,分析網(wǎng)絡問題到底出現(xiàn)在哪。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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論