summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proto/wireguard/wireguard.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/proto/wireguard/wireguard.c b/proto/wireguard/wireguard.c
index 85d6d10b..3cb80ed6 100644
--- a/proto/wireguard/wireguard.c
+++ b/proto/wireguard/wireguard.c
@@ -1,6 +1,7 @@
// Based on proto/rip/rip.c
#include <stdio.h>
+#include <stdlib.h>
#include "nest/protocol.h"
#include "nest/iface.h"
#include "sysdep/linux/wireguard.h"
@@ -10,14 +11,13 @@
static void
wg_init_entry(void *e_)
{
- struct wg_entry *e = e_;
+ struct wg_entry *e UNUSED = e_;
// debug("wg_init_entry\n");
}
static void
-wg_postconfig(struct proto_config *C)
+wg_postconfig(struct proto_config *C UNUSED)
{
- C;
debug("postconfig\n");
}
@@ -25,7 +25,7 @@ static void
wg_if_notify(struct proto *P, unsigned flags, struct iface *i)
{
struct wg_proto *p = (struct wg_proto *) P;
- struct wg_config *c = P->cf;
+ struct wg_config *c = (struct wg_config *) P->cf;
debug("WG: if_notify %p %s %d %s\n", i, i->name, flags, c->ifname);
if (c->ifname && !strcmp(i->name, c->ifname)) {
@@ -35,11 +35,11 @@ wg_if_notify(struct proto *P, unsigned flags, struct iface *i)
}
static void
-wg_rt_notify(struct proto *P, struct channel *ch, net *n,
- rte *new, rte *old, ea_list *attrs)
+wg_rt_notify(struct proto *P, struct channel *ch UNUSED, struct network *n,
+ struct rte *new, struct rte *old UNUSED)
{
struct wg_proto *p = (struct wg_proto *) P;
- struct wg_config *c = P->cf;
+ struct wg_config *c = (struct wg_config *) P->cf;
struct wg_entry *en;
struct iface *iface = NULL;
const char *ifname = NULL;
@@ -272,27 +272,25 @@ wg_rt_notify(struct proto *P, struct channel *ch, net *n,
// TRACE(D_EVENTS, "wg notify %s %s", src_table->name, ifname?ifname:"(null)");
}
-static int
-wg_reload_routes(struct proto *P)
+static void
+wg_reload_routes(struct channel *C)
{
- struct wg_proto *p = (struct wg_proto *) P;
+ struct wg_proto *p UNUSED = (struct wg_proto *) C->proto;
debug("reload routes\n");
// TODO
// WALK_LIST(c, p->channels)
// channel_request_feeding(c);
-
- return 1;
}
static struct proto *
wg_init(struct proto_config *C)
{
- struct wg_config *c = (struct pipe_config *) C;
+ struct wg_config *c UNUSED = (struct wg_config *) C;
struct proto *P = proto_new(C);
- struct wg_proto *p = (struct wg_proto *) P;
+ struct wg_proto *p UNUSED = (struct wg_proto *) P;
debug("init\n");
@@ -310,7 +308,7 @@ wg_init(struct proto_config *C)
static int
wg_start(struct proto *P)
{
- struct wg_config *cf = (struct wg_config *) P->cf;
+ struct wg_config *cf UNUSED = (struct wg_config *) P->cf;
struct wg_proto *p = (struct wg_proto *) P;
debug("start\n");