From: Yu Watanabe Date: Fri, 4 Sep 2020 01:56:03 +0000 (+0900) Subject: network: expose route_{hash,compare}_func() X-Git-Tag: v247-rc1~286^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=501b09dbf2ab75d90cd05ec4b44c92341e201e46;p=thirdparty%2Fsystemd.git network: expose route_{hash,compare}_func() --- diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 541bf1e793e..e18d7973966 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -161,7 +161,7 @@ void route_free(Route *route) { free(route); } -static void route_hash_func(const Route *route, struct siphash *state) { +void route_hash_func(const Route *route, struct siphash *state) { assert(route); siphash24_compress(&route->family, sizeof(route->family), state); @@ -196,7 +196,7 @@ static void route_hash_func(const Route *route, struct siphash *state) { } } -static int route_compare_func(const Route *a, const Route *b) { +int route_compare_func(const Route *a, const Route *b) { int r; r = CMP(a->family, b->family); diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h index 3beee9b03b1..75651fa5122 100644 --- a/src/network/networkd-route.h +++ b/src/network/networkd-route.h @@ -62,6 +62,8 @@ struct Route { LIST_FIELDS(Route, routes); }; +void route_hash_func(const Route *route, struct siphash *state); +int route_compare_func(const Route *a, const Route *b); extern const struct hash_ops route_hash_ops; int route_new(Route **ret);