diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-25 08:47:47 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-27 01:36:48 +0100 |
commit | 8b7615f9b97766dd119650c11063033f89ebb8e0 (patch) | |
tree | 7db16e35a9ca328dc5fafe25309a1ce104d6a5d5 /src/network/networkd-route-util.h | |
parent | network: merge gateway_is_ready() and link_address_is_reachable() (diff) | |
download | systemd-8b7615f9b97766dd119650c11063033f89ebb8e0.tar.xz systemd-8b7615f9b97766dd119650c11063033f89ebb8e0.zip |
network: introduce {manager,link}_address_is_reachable()
Diffstat (limited to 'src/network/networkd-route-util.h')
-rw-r--r-- | src/network/networkd-route-util.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/network/networkd-route-util.h b/src/network/networkd-route-util.h index 3dd3d3ace8..b862cd6774 100644 --- a/src/network/networkd-route-util.h +++ b/src/network/networkd-route-util.h @@ -8,6 +8,7 @@ typedef struct Link Link; typedef struct Manager Manager; +typedef struct Address Address; unsigned routes_max(void); @@ -15,6 +16,20 @@ int manager_find_uplink(Manager *m, int family, Link *exclude, Link **ret); bool gateway_is_ready(Link *link, bool onlink, int family, const union in_addr_union *gw); +int link_address_is_reachable( + Link *link, + int family, + const union in_addr_union *address, + const union in_addr_union *prefsrc, /* optional */ + Address **ret); + +int manager_address_is_reachable( + Manager *manager, + int family, + const union in_addr_union *address, + const union in_addr_union *prefsrc, /* optional */ + Address **ret); + int route_type_from_string(const char *s) _pure_; const char *route_type_to_string(int t) _const_; |