亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mac.tex

?? 用C++編寫的GPRS協議棧源代碼
?? TEX
字號:
%\documentclass[12pt,openany]{report}   %\begin{document} \section{MAC Implementation Details}Implementation details of the Mac Layer\footnotemark[3] are described here.We describe the basic channel, the TDMA slot structure, modeling ofpacket transmission and reception, along with the slot handling and callhandling mechanism used. We also describe how we have dealt withexceptions like collisions and errors on the channel.\footnotetext[3] { Implemented by Richa Jain at Indian Institute ofTechnology, Bombay. June 2001}The relevant code can be found in {\it ns}/mac-gprs.\{cc,h\} \subsection{Channels}The physical air interface provided by {\it ns} is used. The number offrequency channels to be created for the Uplink and Downlink can be set bythe user through {\em max\_num\_freq} in the OTcl script. We differentiatebetween the uplink and downlink channels by creating separate timers toclock the TDMA on each.  A hard-coded skew of 3 time-slots is maintainedbetween the uplink and downlink TDMA frames. On each frequency (uplink aswell as downlink), slot 0 is reserved for signalling and broadcasts. Theuser can decide the number of slots to reserve for GPRS traffic on eachfrequency through {\em gprs\_slots\_per\_frame} in the OTcl script. Theremaining slots are left for GSM mobiles. The frequency channel a packetis to be transmitted on is stamped onto a new field called {\em chan\_} inthe common header of the packet.The logical channels are mapped such that:PBCH - slot0 on uplink/downlink frequency 0.PRACH - slot0 on uplink frequency 0. PAGCH - slot0 on downlink frequency 0. PDTCH - all other slots/frequencies. \subsection{TDMA Slot Structure}Every TDMA frame has 8 slots (defined as SLOTS\_PER\_FRAME). Slot durationis set as 577 microseconds. We transmit 50 bytes ie one (simulated) RLCPDU, in each slot. This models the transmission of one GPRS Radio Block(RB) (of size ~200 bytes) over four slots in consecutive frames. Forpackets smaller than the size of an RLC PDU (ex {\em rlc\_acks} or {\emll\_acks}), the packet transmission time is taken as {\em packet\_size/transmission\_rate}.We use {\em Up\_Slot\_Gprs\_Timer} and {\em Down\_Slot\_Gprs\_Timer} tosignal the start and end of each slot on the uplink and downlinkrespectively, and the processing is handled by the {\em upslotHandler()}and {\em downslotHandler()} respectively.The {\em upslotHandler()} checks whether any MS has a packet to transmitin the current upslot. If it does, the packet is passed onto {\emtx\_onto\_PHY()} that starts the `transmission' of the packet. Similarlythe {\em downslotHandler()} checks at the BS.\subsubsection{Timing Advance}The upslot/downslot TDMA frames at the MS and the BS should besynchronized. But the finite propagation delay between the MS and BScauses a mismatch. Therefore, the clock at the MS would have to beadvanced by the finite propagation delay time, in order to maintainsynchronism. Implementing this would introduce undue complexity. Instead,we work a way around this problem by setting thepropagation delay to zero (in {\it ~ns}/wirelessphy.cc).\subsection{Packet Transmission and Reception}We model packet transmission over the air-interface by a timer that keepstrack of how long the radio transmission should take and signals when thetransmission is over.  The packet transmit timer ({\em TxPktGprsTimer}) isstarted at the begining of the appropriate slot by {\em tx\_onto\_PHY()}.On expiry of the transmit timer, the {\em sendHandler()} is called, whichfrees the packet, switches off the radio, and unlocks the IFQ.If a MS or the BS senses a packet destined for it at the air-interface, itcalls {\em rx\_from\_PHY()}. This starts a receive timer ({\emRxPktGprsTimer}) to model the actual radio reception and also checks forcollisions. On expiry of the receive timer, the {\em recvHandler()} iscalled, which checks whether the packet is in error or can be received,and sends it on to be processed by {\em fwd\_DATA\_to\_LL()} and forwardedto the RLC.Since we take propagation delay to be zero, the transmit and receivetimers effectively start (and end) together.\subsection{Call Set-up and Handling}The following messages are used for call set-up and handling.\subsubsection{Resource Request}The first packet received by the MAC of an MS (from the IFQ) triggers a{\em resource\_request} message to the BS. We buffer the packet and thelock the IFQ to prevent it from sending down further packets. Await\_timer is started to keep track of the time an MS waits for a {\emresource\_reply}. The {\em resource\_request} message is transmitted onslot 0 on uplink frequency 0.\subsubsection{Resource Reply}The BS allots a channel (slot-frequency) to an MS either on the receipt ofa {\em resource\_request} from the MS or on the receipt of a packet fromits own IFQ for the MS (slot allocation is described in the next section).Information about the slot-frequency channel is written onto the MACheader of the {\em resource\_reply} packet and it is transmitted on slot 0of downlink frequency 0, to the appropriate MS.On receipt of a {\em resource\_reply}, an MS checks the slot-frequencychannel alloted to it and stores it in {\em tx\_chan[]} and {\emrx\_chan[]} for future reference. It then kills the wait timer; schedulesthe old buffered packet to be transmited on the appropriate slot-frequencyand unblocks the IFQ. Other waiting packets can now be passed down fromthe IFQ to the MAC and transmitted.In case the BS has a second {\em resource\_reply} message to betransmitted in slot 0 of the upcoming frame (this situation can arise whenthe BS receives a {\em resource\_request} (from an MS) and a packet destinedto a new MS (from its IFQ) in the same TDMA frame), thesecond reply is stored in a temporary buffer and transmitted on thenext free downlink slot0.\subsubsection{Resource Release}Since Internet traffic is mostly bursty, we have implemented a slotrelease mechanism for GPRS MS.  If the IFQ of the MS is empty and nopacket is transmitted or received for four TDMA frames while the MS isholding a channel, we initiate a {\em resource\_release}.  The MS clearsits {\em tx\_chan[]} and {\em rx\_chan[]} entries and sends a {\emresource\_release}. On receipt of a {\em resource\_release}, the BS purgesits {\em vlr\_.up\_table} and {\em vlr\_.down\_table} entries. Only an MScan initiate a {\em resource\_release}.If the MS later wants to restart transmission, we send another {\emresource\_request}. This request is treated on par with any other freshrequests by the BS. In the case of traffic from the BS to MS, the BS willallot fresh resources to the MS and send a {\em resource\_reply} informingthe MS.\subsection{Slot Handling}\subsubsection{Allocation}At the BS we maintain a table recording which Upslot/Downslot has beenalloted to which MS (in {\em vlr\_}, specifically {\em vlr\_.upslot[][]}and {\em vlr\_downslot[][]}). When the BS receives a {\emresource\_request} from an MS or a packet from its own IFQ (to be sent toan MS), it allocates the {\em first free slot} available to that MS. Thisis done in {\em slot\_allot()}. If the MS is a GPRS MS, a slot isallocated from the pool of GPRS slots, else from the pool of GSM slots. Bydefault, an MS is GPRS and four slots on each frequency are reserved forGPRS (this leaves only three slots on each frequency for GSM). Allocationis symmetric on the uplink and the downlink frequencies. Only single slotoperation is supported ie each MS can be alloted only one slot.\subsubsection{Release}Slot release is possible only with GPRS mobile nodes. We maintain arelease timer ({\em SlotReleaseTimer}) at the MS. On receiving a packet(in either direction) the MS checks the IFQ. If the IFQ is empty, the {\emSlotReleaseTimer} is started. It is reset if the MS gets another packet(in either direction) within four TDMA frames. Otherwise, on expiry of thetimer, the {\em releaseHandler()} is called.Currently, the value of four TDMA frames for the release timer is takenbased on simulations performed. It was found optimal in preventingspurious time-outs and avoiding waiting too long. However, the optimalvalue may differ according to traffic generation pattern and needs to befurther explored.\subsection{Dealing with Collisions}Since this is a reservation based slotted Aloha system, the only placecollisions can occur is during contention on the Packet Random AccessCHannel (ie slot 0 on uplink frequency 0) when more than one MS send a{\em resource\_request} at the same time. We use {\em chan0\_0} tomaintain the state information about the PRACH. In case of collision, thecolliding {\em resource\_request} packets are dropped by {\emrx\_from\_phy()} at the BS. The MS wait one TDMA frame for a reply. Sinceno reply is received, the MS set the {\em Backoff Timer} for a randominterval (generated using {\em Random::integer(k)}). On expiry this callsthe {\em backoffHandler()}, which then schedules another {\emresource\_request}.\subsection{Error model}The error model provided by {\it ns} can introduce errors into packetscreated by Agents like TCP or UDP. It cannot introduce errors at the lowerlayers. In order to test our acknowledgement mechanism, we introduce anerror model that produces random errors in (simulated) RLC PDUs ie forslot level transmissions.This error model (in {\em bs\_recv()})  marks a randomly chosen RLCfragment (either going up or down) as erroneous. This causes the packet tobe dropped at its destination. At each drop, we use {\emRandom::integer(error\_rate\_)} to decide the next drop.The user may choose to include this error model through {\em rlc\_error\_}in the OTcl script. The {\em error\_rate\_} can also be set by the userfrom the OTcl script.\subsection{Handling ARPs}At the start of a simulation, the first packet to be received at the Macof an MS is an ARP request. Though this is a broadcast message, it is nottransmitted directly, but resources are requested and the ARP request issent out only on the alloted slot-frequency channel. This is to preventother MS from receiving an ARP request from an MS. The BS however, goesahead and broadcasts the ARP request on the broadcast channel ie slot 0 ondownlink frequency 0.Also, in {\it ns}, a node sends an ARP request each time a packet isreceived at the LL, even though an ARP request has already been sent andit is waiting for a reply. To prevent our MAC from transmitting suchduplicate ARP requests and wasting precious radio-resources, we simplydrop duplicate ARPs in {\it ms\_recv()}\subsection{MacGprs class in C++}The elements of the code - the storage structures, the methods and thetimers used - are as follows\subsubsection{Storage Structures}In this section, we summarize the important storage structures used.\noindent\begin{itemize}\item At the MS\end{itemize}{\tt  Packet *pktTx[i]}: pointer to the packet  to be sent in Upslot i {\tt  Packet *pktRx[i]}: pointer to the packet received in Downslot i 										{\tt  int tx\_chan[i]}: which channel should the MS transmit on in Upslot i {\tt  int rx\_chan[i]}: which channel should the MS listen to in Downslot i \ \\Note: {\tt  tx\_chan[0]} = 0 for Random Access \indent {\tt  rx\_chan[0]}=0  for  Broadcasts and other messages from BS This structure also allows for multi-slot allocation to be included later.  \noindent\begin{itemize}\item At the BS\end{itemize}  {\tt  Packet *txQ[i][j]}: pointer to the packet to be sent in Downslot j, frequency i  {\tt  Packet *rxQ[i][j]}: pointer to the packet received in Upslot j, frequency i {\tt  int vlr\_.hier\_addr\_[i]}: hierarchical address of MS with  MAC index i {\tt  int vlr\_.up\_table[i][j]}: MAC index of MS alloted Upslot j on frequency i {\tt  int vlr\_.down\_table[i][j]}: MAC index of MS alloted Downslot j on frequency i \ \\{\bf Note:}These structures have to be unique for each BS. Since {\it ns} doesnot currently have a separate BS node at the C++ level ({\it ns}configures a node as BS only at the OTcl level), these structures hadto be made static. This limits our simulator to supporting just oneBS and consequently, just one cell.\subsubsection{Methods}The methods created for the class Mac/GPRS are\begin{itemize}{\tt\item recv(Packet *p, Handler *h) : the entry point for the MAC\item ms\_recv(Packet *p, Handler *h) : packet processing at the MS \item bs\_recv(Packet *p, Handler *h) :  processing a packet  at the BS\item slot\_allot(int ms\_, int \&freq, int \&slot) : allot a slot to ms\_,return\\ values through \&freq, \&slot\item send\_res\_reply (int dst, int freq, int slot) : creating a resource\_reply packet, to be sent on slot/freq  \item send\_res\_request () : creating a resource\_reply packet\item send\_let\_go() : creating a resource\_release packet\item downslotHandler(Event *e) : actions at the end of every down slot\item upslotHandler(Event *e) : actions at the end of every up slot\item sendHandler(Event *e) : actions after packet has been transmitted\item recvHandler(Event *e) :  actions after packet has been completelyreceived.\item releaseHandler(void) : on the expiry of the slot release timer\item backoffHandler(void) : on the expiry of the back off timer  \item waitHandler(void) : on the expiry of the wait timer  \item radioSwitch(int i) : switching the radio on/off to conserve energy.\item rx\_from\_phy(Packet* p) : remove MAC headers, check for collisions\item rx\_from\_ll(Packet* p) : add MAC header\item fwd\_DATA\_to\_LL(Packet *p) : handle data according to type and passto \\ upper layer. \item tx\_onto\_PHY(Packet *p ) : transmit onto air interface}\end{itemize}\subsubsection{Timers}The following is a list of timers  used by the system\begin{itemize}\item Up-Slot Timer : clocks slots on the Uplink frequencies.\item Down-Slot Timer : clocks slots on the Downlink frequencies.    \item Packet Transmit Timer : times the transmission of a packet.\item Packet Receive Timer : keeps track while a packet is beingreceived.\item Wait Timer : the amount of time to wait for a {\em resource\_reply}.\item Backoff Timer : to back off for a random interval beforeretransmitting a {\em resource\_request}.\end{itemize}The psuedocode for the implementation is listed in Appendix II. Wedescribe the simulations performed using our extensions for GPRS in {\itns} in the next chapter. %\end{document}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av在线资源网站| 欧美午夜精品一区二区蜜桃| 波多野结衣精品在线| 91福利视频网站| 欧美第一区第二区| 亚洲欧美一区二区久久 | 欧美在线视频不卡| 久久久久久一二三区| 亚洲线精品一区二区三区八戒| 国产一区二区三区在线观看精品 | 不卡大黄网站免费看| 欧美一区二区在线不卡| 亚洲精品免费在线| 成人小视频免费观看| 精品剧情在线观看| 日韩在线一区二区三区| 91福利社在线观看| 日韩一区在线播放| 国产黄人亚洲片| 欧美变态tickle挠乳网站| 亚洲一区二区三区视频在线播放| 国产精品一区在线观看乱码| 欧美日韩三级视频| 亚洲一二三四区| 色婷婷av一区二区三区gif| 欧美极品少妇xxxxⅹ高跟鞋| 精品一区二区三区影院在线午夜| 欧美色偷偷大香| 一区二区免费在线| 99久久精品国产一区| 亚洲欧洲av另类| 不卡一区在线观看| 亚洲欧洲美洲综合色网| 北岛玲一区二区三区四区| 欧美高清在线视频| 成人自拍视频在线| 国产日本亚洲高清| 高清beeg欧美| 国产精品无圣光一区二区| 成人精品电影在线观看| 中文一区二区在线观看| 成人国产精品免费观看动漫| 中文字幕精品一区二区精品绿巨人| 国内精品国产三级国产a久久| 日韩女优av电影在线观看| 久久黄色级2电影| 久久嫩草精品久久久精品| 国产一区二区三区av电影| 久久久久久久久久久99999| 国内精品写真在线观看| 国产亚洲美州欧州综合国| 成人性生交大片免费看视频在线 | 欧美国产日韩a欧美在线观看| 国产成人在线免费观看| 国产精品久久久久影院亚瑟 | 欧美成人bangbros| 顶级嫩模精品视频在线看| 最新国产の精品合集bt伙计| 欧美性色综合网| 免费黄网站欧美| 日本一区二区三区四区| 色综合婷婷久久| 日本色综合中文字幕| 国产欧美精品一区| 欧美三级三级三级| 国产精品伊人色| 亚洲国产一区二区三区 | 久久久久久毛片| 99国产精品久久久久久久久久| 亚洲高清中文字幕| 久久日韩粉嫩一区二区三区| 一本色道久久综合狠狠躁的推荐| 日韩在线观看一区二区| 久久丝袜美腿综合| 欧美调教femdomvk| 国产精品一区免费视频| 亚洲成人午夜影院| 国产人成一区二区三区影院| 欧美日韩在线综合| 国产精品亚洲成人| 日韩经典中文字幕一区| 中文无字幕一区二区三区| 欧美人狂配大交3d怪物一区| 丁香一区二区三区| 九一九一国产精品| 亚洲一卡二卡三卡四卡| 欧美国产精品久久| 日韩欧美一级二级三级久久久| 北条麻妃一区二区三区| 久久精品国产精品亚洲精品 | 亚洲最大成人网4388xx| 国产亚洲1区2区3区| 欧美精品在线视频| 99久免费精品视频在线观看 | 日韩视频永久免费| 91日韩精品一区| 国产宾馆实践打屁股91| 免费视频最近日韩| 肉丝袜脚交视频一区二区| 亚洲婷婷综合久久一本伊一区| 精品久久久三级丝袜| 欧美老肥妇做.爰bbww视频| 色94色欧美sute亚洲线路一ni| 福利一区在线观看| 国产在线不卡一卡二卡三卡四卡| 日韩精品一卡二卡三卡四卡无卡| 一区二区三区鲁丝不卡| 亚洲久草在线视频| 国产精品高潮呻吟| 国产欧美一区二区精品性色 | 国产乱一区二区| 美女网站色91| 热久久国产精品| 日本午夜精品视频在线观看| 视频一区二区不卡| 天天亚洲美女在线视频| 日韩激情视频网站| 免费观看一级特黄欧美大片| 亚洲 欧美综合在线网络| 亚洲超碰精品一区二区| 性欧美大战久久久久久久久| 亚洲 欧美综合在线网络| 日日夜夜精品免费视频| 视频一区二区三区中文字幕| 青青青爽久久午夜综合久久午夜 | 麻豆91在线看| 久久不见久久见免费视频7| 九九国产精品视频| 国产电影一区二区三区| caoporen国产精品视频| 91麻豆精品在线观看| 欧美性生活久久| 日韩欧美亚洲国产精品字幕久久久| 日韩精品一区在线| 国产欧美日韩久久| 亚洲精品亚洲人成人网| 午夜精品久久久久久| 麻豆成人综合网| 床上的激情91.| 欧美图区在线视频| 欧美成人性战久久| 国产精品国产三级国产普通话99| 亚洲人成网站影音先锋播放| 天天做天天摸天天爽国产一区| 日韩二区三区在线观看| 国产乱码精品一区二区三区av| 91在线观看下载| 欧美日韩在线播放三区四区| 日韩一区二区电影网| 国产精品免费免费| 日韩av成人高清| www.久久精品| 欧美美女直播网站| 久久久久久久网| 一级中文字幕一区二区| 精品写真视频在线观看| 99久久精品国产精品久久| 8x8x8国产精品| 国产精品久久久久久久第一福利 | 国产精品不卡在线观看| 三级欧美韩日大片在线看| 成人黄动漫网站免费app| 欧美日韩精品一区二区三区四区| 久久影院电视剧免费观看| 亚洲国产一区视频| 成人免费看黄yyy456| 欧美一区二区三区人| 亚洲精品福利视频网站| 国产盗摄一区二区| 日韩一区和二区| 亚洲综合免费观看高清完整版在线 | 欧美一区二区三区视频在线| 国产精品麻豆视频| 国内成人自拍视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 久久网站热最新地址| 日本va欧美va精品发布| 99精品欧美一区二区三区小说| 欧美videos大乳护士334| 艳妇臀荡乳欲伦亚洲一区| 国产成人精品亚洲午夜麻豆| 538在线一区二区精品国产| 亚洲欧洲综合另类在线 | 秋霞午夜鲁丝一区二区老狼| 91网址在线看| 亚洲国产精品黑人久久久| 久久99在线观看| 这里只有精品99re| 亚洲国产中文字幕在线视频综合 | 99久久精品久久久久久清纯| 久久精品欧美日韩精品| 久久电影网电视剧免费观看| 911精品产国品一二三产区| 亚洲国产一区视频| 在线亚洲精品福利网址导航| 亚洲日本丝袜连裤袜办公室| 丁香六月久久综合狠狠色| 国产午夜精品久久久久久久| 国产一区二区精品久久99| 337p粉嫩大胆噜噜噜噜噜91av|