Friday, August 24, 2007

Suppress ARP Lookup in ns-2

Sometimes, it is annoying to see packets drop due to ARQ failures (showed as IFQ ARP in traces). Here is a quick fix, define a new variable trivial_mode_ in Arp.h. When it is on, the ARP lookup and query procedure is suppressed and a number as same as IP id will be used as MAC id.

Related codes in arp.cc:


ARPTable::ARPTable(const char *tclnode, const char *tclmac):
LinkDelay(),trivial_mode_(0){
LIST_INIT(&arphead_);
node_ = (MobileNode*) TclObject::lookup(tclnode);
assert(node_);

mac_ = (Mac*) TclObject::lookup(tclmac);
assert(mac_);
LIST_INSERT_HEAD(&athead_, this, link_);
//adding a mode to avoid ARP procedure
bind ("trivial_mode_", &trivial_mode_);
}

ARPEntry*
ARPTable::arplookup(nsaddr_t dst)
{
ARPEntry *a, *llinfo;

for(a = arphead_.lh_first; a; a = a->nextarp()) {
if(a->ipaddr_ == dst)
return a;
}
if (!trivial_mode_)
return 0;
else{
llinfo = new ARPEntry(&arphead_, dst);
assert(llinfo);
llinfo->macaddr_ = int(dst);
llinfo->up_ = 1;
return llinfo;
}

}

Subversion and TRAC in Linux

Fedora Core 6

Download Package

  1. yum install subversion
  2. yum install mod_dav_svn
  3. yum install trac

Install

  • go to etc/httpd/conf.d/
  • add trac.conf and svn.conf
  • create password files with "htpasswd"
  • service httpd restart

Ubuntu 6.10

For subversion: apt-get install subversion libapache2-svn

For trac: apt-get install trac (will install trac-0.9.6)

To upgrade SQlite database from v.2 (used in old trac) to v.3, apt-get install libsqlite0 python-sqlite, sqlite and sqlite 3, then

  1. $ mv trac.db trac2.db
  2. $ sqlite trac2.db .dump | sqlite3 trac.db
  3. change /etc/apache2/sites-available/default
  4. set svn.passwd file
  5. apache2ctl restart



Hello, Cyberworld

*(&^^%*&*(*(()()**^%$$#@!?,!-----.......