Fragmentation and RTS handshake

29 views
Skip to first unread message

C Facchini

unread,
Oct 9, 2009, 10:40:25 PM10/9/09
to ns-3-users
Dear list,

I'm trying to simulate a wireless ad-hoc network when (MAC-layer)
fragmentation and RTS/CTS are used at the same time.
Unfortunately it seems that they can't be used at the same time: in
particular, when turning on both mechanisms only fragmentation gets
actually turned on.
Here's a script that reproduces such behavior: http://pastebin.com/m738f9349

I'd say it's a bug, but I'd love to hear some other opinions.

Regards,
Christian

Verotiana Hanitriniala Rabarijaona

unread,
Oct 12, 2009, 10:58:36 AM10/12/09
to ns-3-...@googlegroups.com
Hi,

I had the same problem. When I looked up into the code I found out that this problem is caused by the dca-txop.cc.
Please refer to this thread

> In the dca-txop.cc in DcaTxop::NotifyAccessGranted (void) you can find this
> part of the code
>
> if (NeedFragmentation ())
>         {
>           params.DisableRts ();
>           WifiMacHeader hdr;
>           Ptr<Packet> fragment = GetFragmentPacket (&hdr);
>           if (IsLastFragment ())
>             {
>               MY_DEBUG ("fragmenting last fragment size="<<fragment->GetSize
> ());
>               params.DisableNextData ();
>             }
>           else
>             {
>               MY_DEBUG ("fragmenting size="<<fragment->GetSize ());
>               params.EnableNextData (GetNextFragmentSize ());
>             }
>           Low ()->StartTransmission (fragment, &hdr, params,
>                               
       m_transmissionListener);
>         }
>
> The line "params.DisableRts()"  would explain why there is no more RTS/CTS
> handshake once I enable fragmentation in wifi-ap.cc.
> Is this done on purpose?

I don't know but it looks buggy: can you please file a bug in
code.nsnam.org/bugzilla to keep track of this issue ?

Especially there is the part of the code:
>if (NeedFragmentation ())
>         {
>           params.DisableRts ();

That is why you cannot enable fragmentation and RTS handshake at the same time.
If you find any solution please let me know.

Cheers.
V.

2009/10/10 C Facchini <c.fac...@gmail.com>



--
***************************
RABARIJAONA Verotiana Hanitriniala
Graduate School of Global Information and Telecommunication Studies (GITS)
Waseda University
Tokyo
Japan
***************************

C Facchini

unread,
Oct 19, 2009, 6:19:31 PM10/19/09
to ns-3-users
On Oct 12, 6:58 am, Verotiana Hanitriniala Rabarijaona wrote:
> Especially there is the part of the code:
>
> >if (NeedFragmentation ())
> >         {
> >           params.DisableRts ();
>
> That is why you cannot enable fragmentation and RTS handshake at the same
> time.
> If you find any solution please let me know.

It is actually as you said.
I filed a bug and posted a possible patch.
http://www.nsnam.org/bugzilla/show_bug.cgi?id=725

I've checked and it seems doing well. Still, use at your own risk!

Regards,
Christian
Reply all
Reply to author
Forward
0 new messages