mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 05:37:46 +00:00
[mesh-forwarder] config option if to log src/dst IPv6 addresses (#2594)
This commit adds a new config option which determines if the source and destination IPv6 addresses of received/sent messages are logged from `MeshForwarder::LogIp6Message()`.
This commit is contained in:
committed by
Jonathan Hui
parent
79c4830c3c
commit
b9e9b6bd63
@@ -763,6 +763,17 @@
|
||||
#define OPENTHREAD_CONFIG_LOG_SUFFIX ""
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_SRC_DST_IP_ADDRESSES
|
||||
*
|
||||
* If defined as 1 when IPv6 message info is logged in mesh-forwarder, the source and destination IPv6 addresses of
|
||||
* messages are also included.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_SRC_DST_IP_ADDRESSES
|
||||
#define OPENTHREAD_CONFIG_LOG_SRC_DST_IP_ADDRESSES 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION
|
||||
*
|
||||
|
||||
@@ -1443,7 +1443,7 @@ void MeshForwarder::LogIp6Message(MessageAction aAction,
|
||||
const char * actionText;
|
||||
const char * priorityText;
|
||||
bool shouldLogRss = false;
|
||||
bool shouldLogSrcDstAddresses = true;
|
||||
bool shouldLogSrcDstAddresses = (OPENTHREAD_CONFIG_LOG_SRC_DST_IP_ADDRESSES != 0);
|
||||
char stringBuffer[Ip6::Address::kIp6AddressStringSize];
|
||||
char rssString[RssAverager::kStringSize];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user