You could do as following steps: 1. Modify mac-802.11.cc 1.1 Mac802_11::sendCTS(int dst, double rts_duration) { Packet *p = Packet::alloc(); hdr_cmn* ch = HDR_CMN(p); struct cts_frame *cf = (struct cts_frame*)p->access(hdr_mac::offset_); assert(pktCTRL_ == 0); ch->uid() = 0; ch->ptype() = PT_MAC_CTS; ##### modify ch->size() = ETHER_CTS_LEN; ch->iface() = -2; ch->error() = 0; .... } 1.2 Mac802_11::sendRTS(int dst, double rts_duration) 1.2 Mac802_11::sendACK(int dst, double rts_duration)
Saturday, March 27, 2010
Wireless MAC trace format
Thursday, March 25, 2010
How to measure the queue length in the base station or mobile node?
1. modify queue/priqueue.h
#include "trace.h"
class PriQueue : public DropTail {
public:
PriQueue();
int command(int argc, const char*const* argv);
void recv(Packet *p, Handler *h);
void recvHighPriority(Packet *, Handler *);
// insert packet at front of queue
void filter(PacketFilter filter, void * data);
// apply filter to each packet in queue,
// - if filter returns 0 leave packet in queue
// - if filter returns 1 remove packet from queue
Packet* filter(nsaddr_t id);
void Terminate(void);
//added by smallko
Tcl_Channel tchan_; /* place to write trace records */
TracedInt curq_; /* current qlen seen by arrivals */
void trace(TracedVar*); /* routine to write trace records */
…………………….
Install NS2-AllInOne-2.33 on Ubuntu 8.04
This is an example of the NS2-AllInOne-2.33 installation.
Suppose that there is "ns-allinone-2.33.tar.gz" in current directory (e.g. "~/" for me is "/home/alien").
All steps are done in Terminal, so open a terminal in Accessories/Terminal.
Suppose that there is "ns-allinone-2.33.tar.gz" in current directory (e.g. "~/" for me is "/home/alien").
All steps are done in Terminal, so open a terminal in Accessories/Terminal.
Subscribe to:
Posts (Atom)