全部博文(46)
分类: 系统运维
2009-05-12 12:15:33
以下是网上有人给Ramon关于DSDV添加的去信以及回复。
Q:>> >> Have you tried for DSDV routing? I trying as follow your guidelines, but
>> >> >not so sure how to specify the interface value for new entry and
>> updating
>> >> >existing routing entry
>> >>
RE:>> >>No, as we say in the text we worked with our own implementation; and we
>> >>took a look on AODV according to some request we get in the ns-users
>> >>mailing list. See:
>> >>
>> >>
>> >>I've taken a quick look on the dsdv code, and this is what I've found:
>> >>
>> >>*** UNICAST TRANSMISSIONS
>> >>- It seems that all unicast transmissions are handled by the forwardPacket
>> >>method, with:
>> >> >target_->recv(p, (Handler *)0);
>> >>
>> >>This is different from the way aodv sends packets, but my guess would be
>> >>that you might need to change target_ in the code above for target_[Iface]
>> >>--- see Listing 5.4. As I said in the email referenced above, the Iface
>> >>index need to be gathered from the route table entry.
>> >>
>> >>---- Not double-checked code
>> >>if(nIfaces) {
>> >> target_[Iface]->recv(p, (Handler *)0);
>> >>} else {
>> >> target_->recv(p, (Handler *)0);
>> >>}
>> >>
>> >>*** BROADCAST TRANSMISSIONS
>> >>- All broadcast packets are handled by the sendOutBCastPkt method, so
>> >>instead of that one I guess you should use a modified version of Listing
>> >>5.3, e.g. see below:
>> >>
>> >>--- Not double-checked code
>> >>
>> >>Scheduler &s = Scheduler::instance();
>> >>if (nIfaces) {
>> >> for (int i = 0 ; i < nIfaces ; i++) {
>> >> Packet *p_copy = p->copy();
>> >> s.schedule(targetlist[i], p_copy,
>> >>jitter(DSDV_BROADCAST_JITTER, be_random_));
>> >> }
>> >> Packet::free(pkt);
>> >>} else {
>> >> s.schedule(target_,p,jitter(DSDV_BROADCAST_JITTER, be_random_));
>> >>}
>> >>
>> >>*** CHANGES ON ROUTE TABLE ENTRY
>> >>- You need to add the index for the outgoing interface as a new member of
>> >>the rtable_ent class, and each time you add the routing table entry
>> you may
>> >>also need to specify this --- see listing 5.5 and my answer on the mail
>> >>linked above. Note that this will be afterwards used to refer to the
>> >>appropriate interface when sending a unicast packet.
>> >>Ramon
不过我DSDV还未添加成功 :(
如有谁添加成功了在底下留言就好了~~