[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] How to get router id?
Hi,
Can any one help me out?
I am doing itrace module in NS2 (I install ns-allinone-2.1b7a.) The
problem is that
packet --> router1 ---> router2 --->...
When IP packet go through these routers, the routers is able to generate
itrace packets. However, in the itrace, I need to know the router id (for
example, router IP addr). How can I get the router id (router IP address)?
In the ping.cc, I found that someone use name() to get router id in string
fomat. But I can not put
hdrip->src_ = name();
Is there any way I can do to get the router id, such that
hdrip->src_=routerid ?
BTW. If I set agent on one node and sent out IP packets, where and when
the ip_hdr has been set (which file(s)?)
Thanks,
C.L.
****************************************************************************
Chien-Lung Wu [email protected]
Graduate Student of ECE (O) 919-513-1894
at North Carolina State University (H) 919-233-6724
****************************************************************************