net: conn_mgr: output events as hex

Networking events are masks of bits, which are almost impossible to read
as decimal, and trivial to read as hex. Also unifies the format string
across multiple outputs for some flash savings.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2023-12-19 18:15:58 +10:00 committed by Carles Cufí
parent 19392a6d2b
commit 434c93ddfb

View file

@ -24,7 +24,7 @@ static void conn_mgr_iface_events_handler(struct net_mgmt_event_callback *cb,
{
int idx;
NET_DBG("Iface event %u received on iface %d (%p)", mgmt_event,
NET_DBG("%s event 0x%x received on iface %d (%p)", "Iface", mgmt_event,
net_if_get_by_iface(iface), iface);
if ((mgmt_event & CONN_MGR_IFACE_EVENTS_MASK) != mgmt_event) {
@ -62,7 +62,7 @@ static void conn_mgr_ipv6_events_handler(struct net_mgmt_event_callback *cb,
{
int idx;
NET_DBG("IPv6 event %u received on iface %d (%p)", mgmt_event,
NET_DBG("%s event 0x%x received on iface %d (%p)", "IPv6", mgmt_event,
net_if_get_by_iface(iface), iface);
if ((mgmt_event & CONN_MGR_IPV6_EVENTS_MASK) != mgmt_event) {
@ -120,7 +120,7 @@ static void conn_mgr_ipv4_events_handler(struct net_mgmt_event_callback *cb,
{
int idx;
NET_DBG("IPv4 event %u received on iface %d (%p)", mgmt_event,
NET_DBG("%s event 0x%x received on iface %d (%p)", "IPv4", mgmt_event,
net_if_get_by_iface(iface), iface);
if ((mgmt_event & CONN_MGR_IPV4_EVENTS_MASK) != mgmt_event) {