From 29a46b6e37393970f4e4a35778d876c26c9ca0a4 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 2 Dec 2019 08:46:55 +0100 Subject: Stop passing devname and ifindex around --- lease.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lease.h') diff --git a/lease.h b/lease.h index 9cbe547..5fa878b 100644 --- a/lease.h +++ b/lease.h @@ -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 -- cgit v1.2.3-59-g8ed1b