next up previous
Next: Accepting a packet from Up: Psuedocode for Packet Processing Previous: Packet at MS MAC

Packet received at an BS

 
Method:		 bs_recv()

Comment: It can be a packet from the IFQ to be sent to an MS

or a packet from an MS at the Air Interface.

The latter case occurs only at the start of an up-slot.

Action: Check direction in packet header

If packet direction == UP

Check mac_destination

If mac_destination == (self or Broadcast)

Extract the frequency channel the packet was sent on from its header . Store packet in rxQ[freq][upslot]. (see Note)

Switch the radio On.

Pass rxQ_[freq][upslot] to rx_from_phy().

Else ignore packet.

Else if packet direction == DOWN

If packet is a broadcast

Stamp it to be transmitted in downslot0, frequency0.

Else

Look up slot reserved for this destination from the vlr_downtable[][]

If no slot reserved for destination

Mark packet as waiting.

Call slot_allot()

Call send_resource_reply()

Else

If resource_reply not yet received by MS

Mark packet as waiting.

Stamp frequency channel onto packet header

Store packet in txQ[freq][downslot]. (see Note)

Pass txQ[freq][downslot] to rx_from_ll()

Note:

The situation here is similar to that at the MS. There is also the added complexity that the BS may have to transmit/receive packets meant for/from different MS at a time; and that it can transmit/receive on many frequencies at a time. We sort and store all packets to be transmitted, and those received, in a two-dimensional array, in order to keep track of all the packets. Again, the entries are cleared after the packets have been fully processed.



Richa Jain (96D07007)
Tue Jul 24 22:29:53 IST 2001