diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-02 10:32:02 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-04 18:55:15 +0100 |
commit | 2afd12e0a1c5710c4b380067a6a022efcbfacf99 (patch) | |
tree | 867da39d82b6f23e181cb13008aaf76c424d3473 /src | |
parent | network: add more debugging logs (diff) | |
download | systemd-2afd12e0a1c5710c4b380067a6a022efcbfacf99.tar.xz systemd-2afd12e0a1c5710c4b380067a6a022efcbfacf99.zip |
network: expose log_route_debug() and log_address_debug()
They will be used in another file in a later commit.
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-address.c | 2 | ||||
-rw-r--r-- | src/network/networkd-address.h | 2 | ||||
-rw-r--r-- | src/network/networkd-route.c | 2 | ||||
-rw-r--r-- | src/network/networkd-route.h | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 452258891c..ca9e825b56 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -1096,7 +1096,7 @@ const char* format_lifetime(char *buf, size_t l, usec_t lifetime_usec) { return buf; } -static void log_address_debug(const Address *address, const char *str, const Link *link) { +void log_address_debug(const Address *address, const char *str, const Link *link) { _cleanup_free_ char *state = NULL, *flags_str = NULL, *scope_str = NULL; assert(address); diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index f799d59460..fc6f33b0f9 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -73,6 +73,8 @@ struct Address { NFTSetContext nft_set_context; }; +void log_address_debug(const Address *address, const char *str, const Link *link); + const char* format_lifetime(char *buf, size_t l, usec_t lifetime_usec) _warn_unused_result_; /* Note: the lifetime of the compound literal is the immediately surrounding block, * see C11 ยง6.5.2.5, and diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 6aa4d0547b..6769e6ce85 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -406,7 +406,7 @@ int route_dup(const Route *src, const RouteNextHop *nh, Route **ret) { return 0; } -static void log_route_debug(const Route *route, const char *str, Manager *manager) { +void log_route_debug(const Route *route, const char *str, Manager *manager) { _cleanup_free_ char *state = NULL, *nexthop = NULL, *prefsrc = NULL, *table = NULL, *scope = NULL, *proto = NULL, *flags = NULL; const char *dst, *src; diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h index 504252187a..b39e7e25d3 100644 --- a/src/network/networkd-route.h +++ b/src/network/networkd-route.h @@ -80,6 +80,8 @@ struct Route { int gateway_onlink; }; +void log_route_debug(const Route *route, const char *str, Manager *manager); + extern const struct hash_ops route_hash_ops; extern const struct hash_ops route_hash_ops_unref; |