I am trying to forward a packet with OAR protocol running outside the subnet where the protocol is running. The OAR protocol has the dsdv.cc file modified and under the DSDV_Agent::forwardPacket (Packet * p) the modification done is // Bypass Routing if (!dsdv_active_){ hdrc->addr_type_ = NS_AF_INET; hdrc->xmit_failure_ = mac_callback; hdrc->xmit_failure_data_ = this; // Calculate the destination int tempdst; if (DATA_PACKET(hdrc->ptype())) tempdst =Address::instance().get_nodeaddr(iph->daddr()) + num_nodes_/2; dst = Address::instance().get_nodeaddr(iph->daddr()); hdrc->next_hop_ = dst; assert (!HDR_CMN (p)->xmit_failure_ || HDR_CMN (p)->xmit_failure_ == mac_callback); target_->recv(p, (Handler *)0); return; }
In the tcl scenario file which i run dsdv_active is set to 0. So i guess the program enters this section by default for OAR but i cant figure out what to change in order to route the packets to a destination which is outside the subnet. any help in this regard will be really appriciated. thanks roy