]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: expose log_route_debug() and log_address_debug()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 2 Nov 2024 09:32:02 +0000 (18:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 4 Nov 2024 17:55:15 +0000 (02:55 +0900)
They will be used in another file in a later commit.

src/network/networkd-address.c
src/network/networkd-address.h
src/network/networkd-route.c
src/network/networkd-route.h

index 452258891cf1dc6ef6df12346ddddbd08886dd14..ca9e825b56ad1c21bc960e8194741e95a271fbd3 100644 (file)
@@ -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);
index f799d59460e24ecce7e83b1a5cd1e5ce6b6d76e1..fc6f33b0f9c09e5ddcfa8fdd916f95e88d472e69 100644 (file)
@@ -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
index 6aa4d0547bb5d4f6663186da90800cadd320ec65..6769e6ce850c2a1e42320a822dac6cf0d8c7bc85 100644 (file)
@@ -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;
index 504252187a1efc18284686de25875b47f5ab002e..b39e7e25d3e20c3083677eea95e02334fb871ca3 100644 (file)
@@ -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;