I guess, there is a bug in the condition for Handoff Attempt in
mac/mac-802_11.cc
*_Abstract:_*
A possible bug in ns 2:
* Version : *ns-2.33*
* File: <ns-2.33>/mac/*mac-802_11.cc*
* Place: *Condition for Handoff Attempt in RetransmitDATA()
function*
* * *Brief: *It calls for Handoff even in Non Infrastructure
(Ad Hoc) mode
*
_*Details:*_
Presently the handoff is attempted after 3 number of failures. The
snippet is shown below:
/*********************** Current Code Snippet ************************
> *if (*rcount == 3 && handoff == 0)* {
> //start handoff process
> printf("Client %d: Handoff Attempted\n",index_);
> associated = 0;
> authenticated = 0;
> handoff = 1;
> ScanType_ = ACTIVE;
> sendPROBEREQ(MAC_BROADCAST);
> return;
> }
As observed during simulation runs, even in case of ad hoc scenarios
(without APs) a node attempts for Handoff, viz., it configures a Probe
Request and goes to start the Backoff timer.
The correction is trivial as shown below. We have to just include the
condition for the existence of infra structure mode.
/****** Modification Suggested ***************************/
> if (*infra_mode_ *&& *rcount == 3 && handoff == 0) {
> //start handoff process
> printf("Client %d: Handoff Attempted\n",index_);
> associated = 0;
> authenticated = 0;
> handoff = 1;
> ScanType_ = ACTIVE;
> sendPROBEREQ(MAC_BROADCAST);
> return;
> }
Suggestions and Comments are welcome, I doubt myself, as no body has so
far dictated this simple observation.
regards,
Mayur