How can I keep track of locally generated packets routing?

25 views
Skip to first unread message

Paulo Alexandre Regis

unread,
Jan 21, 2019, 8:19:51 PM1/21/19
to ns-3-users
I have a simple ad-hoc network configured and working:


      (2)
    /   |     \  
   /    |      \
(1)--(3)----(5)------(6)
  \     |      /
   \    |    /
      (4)


(1) is a UdpTraceClient and (6) is the UdpServer, again, it's all working correctly.

The network is using OLSR as the routing protocol. What I'm looking for is: every time the node sends a packet to anywhere, be it forwarding or locally generated and sent out to a remote location, the routing protocol (in this case OLSR) be able to keep a counter of these (i.e. for each packet sent out, increment a counter w.r.t. the chosen next-hop).

For example:
- (1) will send a lot of packets out. At some point, I imagine its instance of OLSR will be queried about an existing route to the destination (6).
- (2) will either forward packets from (1) somewhere else. (Assuming 2 is chosen by 1 as the next hop).

I tried adding this logic both in the RouteInput and RouteOutput of OLSR, which worked partially. It did NOT work for node (1). Node (2) is able to keep track as it is a relay node. However, it looks like the application/transport layers in (1) simple skip the network layer logic. I don't know where in the OLSR code I should implement this logic.

I hope I was clear enough. Any insights?



Reply all
Reply to author
Forward
0 new messages