network: expose log_route_debug() and log_address_debug()

They will be used in another file in a later commit.
This commit is contained in:
Yu Watanabe
2024-11-05 02:55:15 +09:00
parent 6119221afa
commit 2afd12e0a1
4 changed files with 6 additions and 2 deletions
+1 -1
View 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);
+2
View 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
+1 -1
View 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;
+2
View 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;