diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2019-09-25 19:10:20 +0200 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-09-28 15:21:12 +0200 |
commit | 4c8b602b1d2a305d7fbb1c3a8b065bae072c5186 (patch) | |
tree | c4baee925a6d9c83d4b615dfa3050bb0ea5424a9 /ipm.h | |
parent | Serialize/deserialize messages into a struct (diff) | |
download | wg-dynamic-4c8b602b1d2a305d7fbb1c3a8b065bae072c5186.tar.xz wg-dynamic-4c8b602b1d2a305d7fbb1c3a8b065bae072c5186.zip |
Extract all RTNETLINK code into ipm.{c,h}
Diffstat (limited to 'ipm.h')
-rw-r--r-- | ipm.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2019 WireGuard LLC. All Rights Reserved. + */ + +#ifndef __IPM_H__ +#define __IPM_H__ + +#include <stdint.h> + +#include "common.h" + +void ipm_init(); +void ipm_free(); +int ipm_newaddr_v4(uint32_t ifindex, const struct in_addr *ip); +int ipm_newaddr_v6(uint32_t ifindex, const struct in6_addr *ip); +int ipm_deladdr_v4(uint32_t ifindex, const struct in_addr *ip); +int ipm_deladdr_v6(uint32_t ifindex, const struct in6_addr *ip); +int ipm_getlladdr(uint32_t ifindex, struct wg_combined_ip *addr); + +#endif |