summaryrefslogtreecommitdiff
path: root/src/network/networkd.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-08 22:04:26 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-08 22:15:27 -0500
commit628706137efbca8aaf753ccd063e5abf7e31aed5 (patch)
tree9e72e655be84f8469475697a707defaa848f22df /src/network/networkd.h
parent3333d748facc15f49935b6b793490ba0824976e6 (diff)
networkd: print the received DHCPv4 address and gateway
It seems that networkd stores in_addr.s_addr contents in reverse order (little-endian, not network order). This is a bit confusing, but sd_rtnl evidently likes this order.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r--src/network/networkd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 9be9330c99..2da852fea4 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -316,3 +316,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);
#define log_struct_bridge(level, bridge, ...) log_struct(level, "INTERFACE=%s", bridge->name, __VA_ARGS__)
#define BRIDGE(bridge) "INTERFACE=%s", bridge->name
+#define ADDRESS_FMT_VAL(address) \
+ (address).s_addr & 0xFF, \
+ ((address).s_addr >> 8) & 0xFF, \
+ ((address).s_addr >> 16) & 0xFF, \
+ (address).s_addr >> 24