[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] mac-802.11.cc -- possible incorrect handling of RTS/CTS's?



Hi there,

I read in Peterson & Davie's (Comp. Networks 2nd ed, p. 138) that,
according to 802.11, "any node that sees the CTS frame knows that it is
close to the receiver, and therefore cannot transmit for the period of
time it takes to send a frame of the specified length."

However, in mac-802.11.cc of "ns", as far as I understand the following
lines of code, all nodes except for the explicit target of the RTS or CTS
completely *ignore* RTS or CTS packets, which would contradict Peterson &
Davie:

void
Mac802_11::recv_timer()
{
        ...
        hdr_mac802_11 *mh = HDR_MAC802_11(pktRx_);
        ...

        /*  <---------- could this following section explain my question?
         * IEEE 802.11 specs, section 9.2.5.6
         *      - update the NAV (Network Allocation Vector)
         */
        if(dst != (u_int32_t)index_) {
                set_nav(mh->dh_duration);
        }

	...

	/*
         * Address Filtering
         */
        if(dst != (u_int32_t)index_ && dst != MAC_BROADCAST) {
                /*
                 *  We don't want to log this event, so we just free
                 *  the packet instead of calling the drop routine.
                 */
                discard(pktRx_, "---");
                goto done;
        }  

	...

                switch(subtype) {
 
                case MAC_Subtype_RTS:
                        recvRTS(pktRx_);
                        break;
                
                case MAC_Subtype_CTS:
                        recvCTS(pktRx_);
			break;

So, as far as I see it, only if the destination of *any* packet, RTS/CTS
or not, is "this" node, will an RTS or CTS or anything else be
processed. I also marked the section which I think might be relevant and
which might answer my question, but I don't know enough about it.

Does anybody know where I'm wrong or where "ns" is, or even if Peterson &
Davie are correct about 802.11???

Thanks,
Jake