node23.html

来自「用C++编写的GPRS协议栈源代码」· HTML 代码 · 共 105 行

HTML
105
字号
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><!--Converted with LaTeX2HTML 96.1 (Feb 5, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --><HTML><HEAD><TITLE>Packet at MS MAC</TITLE><META NAME="description" CONTENT="Packet at MS MAC"><META NAME="keywords" CONTENT="gprs"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><LINK REL=STYLESHEET HREF="gprs.css"></HEAD><BODY LANG="EN"> <A NAME="tex2html356" HREF="node24.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="http://cbl.leeds.ac.uk/nikos/figs/next_motif.gif"></A> <A NAME="tex2html354" HREF="node22.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="http://cbl.leeds.ac.uk/nikos/figs/up_motif.gif"></A> <A NAME="tex2html348" HREF="node22.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="http://cbl.leeds.ac.uk/nikos/figs/previous_motif.gif"></A>   <BR><B> Next:</B> <A NAME="tex2html357" HREF="node24.html">Packet received at an </A><B>Up:</B> <A NAME="tex2html355" HREF="node22.html">Psuedocode for Packet Processing </A><B> Previous:</B> <A NAME="tex2html349" HREF="node22.html">Psuedocode for Packet Processing </A><BR> <P><H2><A NAME="SECTION00131000000000000000">Packet at MS MAC</A></H2><P><PRE><TT> <B>Event:</B>		 Packet received at an MS<P><B>Method:</B>		 ms_recv()<P><B>Comment:</B>		 It can be a packet from the IFQ to be sent to the BS<P> 		or a packet from the Air Interface to be sent up the stack.<P> 		 The latter case occurs only at the start of a down-slot.<P><B>Action:</B>		Check direction in packet header<P>		If packet direction == UP<P>				Check mac_source and mac_destination<P>				If mac_source == BS and mac_destination == (self or broadcast)<P>						Stop the Release timer if it is On<P>						Restart Release Timer if the IFQ is empty.<P>						Store packet in pktRx_[downslot]. (see Note)<P>						Switch the radio On.<P>						Pass pktRx_[downslot] to rx_from_phy().<P>				Else ignore packet.<P>		Else if packet direction == DOWN<P>				If packet is a broadcast<P>						Stamp it to be transmitted on upslot0, frequency0.<P>				Else<P>						check tx_chan[] for slot/frequency to transmit packet.<P>						If no slot-frequency found<P>								Store packet in p_temp<P>								Call send_resource_request().<P>						Else<P>								If Release Timer is ON, stop it.<P>								Stamp frequency channel onto packet header<P>								Store packet in pktTx[up_slot alloted]. (see Note)<P>								Pass pktTx[up_slot alloted] to rx_from_ll()<P></TT></PRE><P>Note : In the case where the MS receives two packets on concurrent slots, thepacket received later will over-write the previouspacket, at the instance at the end of the old slot and start of thenew one. At this instance, the <TT>pktRxTimer</TT> is not yet done withthe old packet and still requires the pointer. It triggers an error.To avoid this, we use an array (could also use a linked list), thatstores pointers to packets received in each slot. The array entry iscleared by the <TT>recvHandler</TT> after the packet reception is over.<P>A similar situation holds for the <TT>pktTx[]</TT>. We use an array toavoid over-writing and thus loosing packets to be transmitted inadjacent slots.<P>Note that this structure would also suffice for multi-slot operation.<P><HR><A NAME="tex2html356" HREF="node24.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="http://cbl.leeds.ac.uk/nikos/figs/next_motif.gif"></A> <A NAME="tex2html354" HREF="node22.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="http://cbl.leeds.ac.uk/nikos/figs/up_motif.gif"></A> <A NAME="tex2html348" HREF="node22.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="http://cbl.leeds.ac.uk/nikos/figs/previous_motif.gif"></A>   <BR><B> Next:</B> <A NAME="tex2html357" HREF="node24.html">Packet received at an </A><B>Up:</B> <A NAME="tex2html355" HREF="node22.html">Psuedocode for Packet Processing </A><B> Previous:</B> <A NAME="tex2html349" HREF="node22.html">Psuedocode for Packet Processing </A><P><ADDRESS><I>Richa Jain (96D07007) <BR>Tue Jul 24 22:29:53 IST 2001</I></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?