From 3faaad9fe1f11cfe5699c6720c897bfddc7cf49a Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 15 May 2025 00:18:27 -0600 Subject: Begone with the printf variants of the log functions --- libhw_generic/include/libhw/generic/net.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'libhw_generic/include/libhw/generic/net.h') diff --git a/libhw_generic/include/libhw/generic/net.h b/libhw_generic/include/libhw/generic/net.h index 1052392..573a01f 100644 --- a/libhw_generic/include/libhw/generic/net.h +++ b/libhw_generic/include/libhw/generic/net.h @@ -12,6 +12,7 @@ #include /* for uint{n}_t} */ #include /* for ssize_t */ +#include #include /* Errnos *********************************************************************/ @@ -34,24 +35,13 @@ struct net_ip4_addr { static const struct net_ip4_addr net_ip4_addr_broadcast = {{255, 255, 255, 255}}; static const struct net_ip4_addr net_ip4_addr_zero = {{0, 0, 0, 0}}; - -#define PRI_net_ip4_addr "%"PRIu8".%"PRIu8".%"PRIu8".%"PRIu8 -#define ARG_net_ip4_addr(addr) (addr).octets[0], \ - (addr).octets[1], \ - (addr).octets[2], \ - (addr).octets[3] +void fmt_print_net_ip4_addr(lo_interface fmt_dest, struct net_ip4_addr); struct net_eth_addr { unsigned char octets[6]; }; -#define PRI_net_eth_addr "%02"PRIx8":%02"PRIx8":%02"PRIx8":%02"PRIx8":%02"PRIx8":%02"PRIx8 -#define ARG_net_eth_addr(addr) (addr).octets[0], \ - (addr).octets[1], \ - (addr).octets[2], \ - (addr).octets[3], \ - (addr).octets[4], \ - (addr).octets[5] +void fmt_print_net_eth_addr(lo_interface fmt_dest, struct net_eth_addr); /* Streams (e.g. TCP) *********************************************************/ -- cgit v1.2.3-2-g168b