]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: expose route_{hash,compare}_func()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Sep 2020 01:56:03 +0000 (10:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Sep 2020 17:30:04 +0000 (02:30 +0900)
src/network/networkd-route.c
src/network/networkd-route.h

index 541bf1e793ea5c70fa9dc9f63578ee0012c8741e..e18d79739663884b417ecc4f1fd5c0e6e7c6fcc0 100644 (file)
@@ -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);
index 3beee9b03b159aa023f9bf14e8a68cb162b618a9..75651fa51228d19376e85d838657122856059d67 100644 (file)
@@ -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);