|
Bugzilla – Full Text Bug Listing |
| Summary: | Need function for printing routing tables | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Antti Mäkelä <antti.makela> |
| Component: | routing | Assignee: | Hemanth Narra <hemanthnarra222> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | gjcarneiro, tomh |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | |||
| Bug Blocks: | 963 | ||
| Attachments: | Patch to print the routing tables to the trace files | ||
|
Description
Antti Mäkelä
2010-06-21 08:03:02 UTC
Better mention this in FAQ then (and if there is a C++ version too) :), as it seems genuinely rather frequently asked question. No, I don't mean to say "just use PyViz". I meant more in the sense that, 1) yes, there is a real need for this, so much that I wrote it into pyviz, 2) there's some code that may be used as basis if someone wants to convert to C++. That's all. I strongly agree on the need for this. I think the main issue is to agree on the API. At the lowest level (Ipv4RoutingProtocol) there probably should be a method or methods that exports containers of Ipv4Routes and Ipv4MulticastRoutes via some Get() method. There probably should be callbacks for asynchronous notifications of route deletes and additions. There should probably be a method such as virtual void Print (std::ostream &os) const = 0; for pretty printing using a protocol's own format. At the helper layer, I envision that it could be similar to ascii tracing, where the class Ipv4RoutingHelper and Ipv6RoutingHelper could be extended with methods like: PrintRoutes (Ptr<Node>, Ptr<OutputStreamWrapper>); PrintRoutesAt (Ptr<Node>, Ptr<OutputStreamWrapper>, Time); // schedule for particular time PrintRouteChanges (Ptr<Node>, Ptr<OutputStreamWrapper); // asynchronous // Node container versions of the above Additional helpers could be defined in the future to, e.g. format the output similar to the output of Linux ip command. Comments on something like the above API, or other suggestions? Created attachment 1000 [details]
Patch to print the routing tables to the trace files
Taking clues from Tom's suggestion, I have created a patch to print the routing tables to the trace file. Please find the attached patch.
I created a proposed final patch, and moved to codereview to better collect any comments: http://codereview.appspot.com/3613041/ *** Bug 963 has been marked as a duplicate of this bug. *** changeset: a590022a1536 |