Is there some easy way to obtain information on link utilization
(separately for each direction)? Obviously I can just put in a
callback for every packet received and calculate averages, but do the
PtP or Csmadevices themselves keep track of such information? The
rx_callback forwards the entire packet to the callback function which
seems a bit resource-consuming to me when all I really need is packet
size and timestamp..
(Trying to simulate some load-balancing algorithms...which would
naturally require some information to start with).
Hey,
Is there some easy way to obtain information on link utilization
(separately for each direction)? Obviously I can just put in a
callback for every packet received and calculate averages, but do the
PtP or Csmadevices themselves keep track of such information? The
rx_callback forwards the entire packet to the callback function which
seems a bit resource-consuming to me when all I really need is packet
size and timestamp..
(Trying to simulate some load-balancing algorithms...which would
naturally require some information to start with).
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
Ok - I'll try with connecting MacRx trace source and see how it
goes..
Ok - only thing that is causing a bit of pain - I want to trace
utilization per link. Now, this is what contexts are for, of course.
However, since I'm going to pass that info back to the process, the
string isn't really the best format. Anyway, what this means now is
that I have to come up with a naming scheme, then do a mapping from
std::string to Ptr<NetDevice>.
Is there a way to achieve "context" with any type?
Right now I basically have
Ptr<PointToPointNetDevice> ptpnetdev (...initialization...)
ptpnetdev->TraceConnect("MacRx", Names::FindName(ptpnetdev),
MakeCallback(&Myapp::RxTracer, this));
and an
void RxTracer(std::string context, Ptr<Packet const> packet);
Is there a way for me to include the ptpnetdev as a parameter to the
rxtracer? If I have to do string-parsing for every packet received, it
means quite a heavy load..As a possible workaround, I checked if point-
to-point-net-device.cc adds a tag to the packet indicating the if
where it came from, but not happening apparently.
Darn, I had forgotten about this thread:
http://groups.google.com/group/ns-3-users/browse_thread/thread/7bec2b1efff9ef58/fc9702d291da8452?lnk=gst&q=makecallback#fc9702d291da8452
:)