diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-15 15:55:12 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-15 15:55:12 -0600 |
commit | 18ddce6270391e5c1924394f8b5d8079ad73289e (patch) | |
tree | 6b647d225665cd4fb2733a57bdfa5f0e96692995 /libhw_generic/include/libhw/generic/net.h | |
parent | 811d9700e1414dae3357361b3ca565f673f63b08 (diff) | |
parent | e38a2d29292ad3fad64729ef958ff07e3bca02cf (diff) |
Merge branch 'lukeshu/simple-call-graph'
Diffstat (limited to 'libhw_generic/include/libhw/generic/net.h')
-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) *********************************************************/ |