aboutsummaryrefslogtreecommitdiffstats
path: root/ipm.h
diff options
context:
space:
mode:
authorThomas Gschwantner <tharre3@gmail.com>2019-09-25 19:10:20 +0200
committerThomas Gschwantner <tharre3@gmail.com>2019-12-11 06:22:17 +0100
commitc42c5b2d4384a1111695016aa293f13fbeede03a (patch)
tree913dbd7e7b27cb5086d3200083840eb9d145c852 /ipm.h
parentSerialize/deserialize messages into a struct (diff)
downloadwg-dynamic-c42c5b2d4384a1111695016aa293f13fbeede03a.tar.xz
wg-dynamic-c42c5b2d4384a1111695016aa293f13fbeede03a.zip
Extract all RTNETLINK code into ipm.{c,h}
Diffstat (limited to 'ipm.h')
-rw-r--r--ipm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ipm.h b/ipm.h
new file mode 100644
index 0000000..b10feac
--- /dev/null
+++ b/ipm.h
@@ -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