diff options
author | Linus Nordberg <linus@nordberg.se> | 2019-12-02 08:46:55 +0100 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-12-11 06:22:17 +0100 |
commit | 29a46b6e37393970f4e4a35778d876c26c9ca0a4 (patch) | |
tree | 700b2bf3551dccca8550cbd443eb686739ce30a6 /lease.h | |
parent | Ignore routes not for the wg interface (diff) | |
download | wg-dynamic-29a46b6e37393970f4e4a35778d876c26c9ca0a4.tar.xz wg-dynamic-29a46b6e37393970f4e4a35778d876c26c9ca0a4.zip |
Stop passing devname and ifindex around
Diffstat (limited to 'lease.h')
-rw-r--r-- | lease.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -28,7 +28,8 @@ struct wg_dynamic_lease { * Initializes internal state, retrieves routes from nlsock and reads leases * from fname. */ -void leases_init(char *fname, struct mnl_socket *nlsock, uint32_t ifindex); +void leases_init(const char *device_name, int interface_index, char *fname, + struct mnl_socket *nlsock); /* * Frees everything, closes file. @@ -41,8 +42,7 @@ void leases_free(); * taken. Frees currently held lease, if any. Updates allowedips for * the peer. */ -struct wg_dynamic_lease *set_lease(const char *devname, wg_key pubkey, - uint32_t leasetime, +struct wg_dynamic_lease *set_lease(wg_key pubkey, uint32_t leasetime, const struct in6_addr *lladdr, const struct in_addr *ipv4, const struct in6_addr *ipv6); @@ -55,11 +55,11 @@ struct wg_dynamic_lease *get_leases(wg_key pubkey); /* Refreshes all leases, meaning expired ones will be removed. Returns the * amount of seconds until the next lease will expire, or at most INT_MAX/1000. */ -int leases_refresh(const char *devname); +int leases_refresh(); /* * Updates all pools with information from the mnl socket nlsock. */ -void leases_update_pools(struct mnl_socket *nlsock, uint32_t ifindex); +void leases_update_pools(struct mnl_socket *nlsock); #endif |