|
Bugzilla – Full Text Bug Listing |
| Summary: | patch: add addresses to trace sources | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
| Component: | applications | Assignee: | George Riley <riley> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Add trace sources with addresses | ||
pushed in changeset 13607:2a60326d85e3 |
Created attachment 2949 [details] Add trace sources with addresses The attached patch (due to Fernando Cintron) proposes to add some new trace sources to several of our traffic generator apps: PacketSink, UdpEchoClient/Server, OnOffApplication, and UdpServer. Currently, the traces usually just export a Ptr<Packet>. The proposal is to add a second trace in parallel to report also the source and destination addresses associated with the packet; e.g. m_rxTrace (packet); + m_rxTraceWithAddresses (packet, from, localAddress); The signature is: + /** + * TracedCallback signature for packet and source/destination addresses. + * + * \param [in] packet The packet. + * \param [in] srcAddress The source address. + * \param [in] destAddress The destination address. + */ + typedef void (* TwoAddressTracedCallback) + (const Ptr<const Packet> packet, const Address &srcAddress, const Address &destAddress);