Bugzilla – Bug 2817
patch: add addresses to trace sources
Last modified: 2018-05-30 00:13:12 UTC
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);
pushed in changeset 13607:2a60326d85e3