summaryrefslogtreecommitdiff
path: root/libhw_generic/include/libhw/generic
diff options
context:
space:
mode:
Diffstat (limited to 'libhw_generic/include/libhw/generic')
-rw-r--r--libhw_generic/include/libhw/generic/net.h16
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) *********************************************************/