diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-15 00:18:27 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-15 14:58:17 -0600 |
commit | 3faaad9fe1f11cfe5699c6720c897bfddc7cf49a (patch) | |
tree | f15758869c758eeeb7604afc5c03e8d7601d8315 /libhw_generic/include | |
parent | 9c0338b1b4495457659157e1e9f47d422dcefc2e (diff) |
Begone with the printf variants of the log functions
Diffstat (limited to 'libhw_generic/include')
-rw-r--r-- | libhw_generic/include/libhw/generic/net.h | 16 |
1 files changed, 3 insertions, 13 deletions
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 <stdint.h> /* for uint{n}_t} */ #include <sys/types.h> /* for ssize_t */ +#include <libmisc/fmt.h> #include <libhw/generic/io.h> /* 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) *********************************************************/ |