summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/bsd/krt-sock.c36
-rw-r--r--sysdep/bsd/krt-sock.h1
2 files changed, 18 insertions, 19 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index b315d5a..806bd2b 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -217,6 +217,20 @@ krt_set_notify(struct krt_proto *p UNUSED, net *net UNUSED, rte *new, rte *old)
}
}
+static int
+krt_set_hook(sock *sk, int size UNUSED)
+{
+ struct ks_msg msg;
+ int l = read(sk->fd, (char *)&msg, sizeof(msg));
+
+ if(l <= 0)
+ log(L_ERR "krt-sock: read failed");
+ else
+ krt_read_msg((struct proto *)sk->data, &msg, 0);
+
+ return 0;
+}
+
void
krt_set_start(struct krt_proto *x, int first UNUSED)
{
@@ -242,21 +256,7 @@ krt_set_start(struct krt_proto *x, int first UNUSED)
bug("krt-sock: sk_open failed");
}
-static int
-krt_set_hook(sock *sk, int size UNUSED)
-{
- struct ks_msg msg;
- int l = read(sk->fd, (char *)&msg, sizeof(msg));
-
- if(l <= 0)
- log(L_ERR "krt-sock: read failed");
- else
- krt_read_msg((struct proto *)sk->data, &msg, 0);
-
- return 0;
-}
-
-void
+static void
krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
{
sockaddr gate, mask, dst;
@@ -386,7 +386,7 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
krt_got_route_async(p, e, new);
}
-void
+static void
krt_read_ifinfo(struct ks_msg *msg)
{
struct if_msghdr *ifm = (struct if_msghdr *)&msg->rtm;
@@ -452,7 +452,7 @@ krt_read_ifinfo(struct ks_msg *msg)
if_update(&f); /* Just if something happens */
}
-void
+static void
krt_read_addr(struct ks_msg *msg)
{
struct ifa_msghdr *ifam = (struct ifa_msghdr *)&msg->rtm;
@@ -573,7 +573,7 @@ krt_scan_shutdown(struct krt_proto *x UNUSED, int last UNUSED)
{
}
-void
+static void
krt_sysctl_scan(struct proto *p, pool *pool, byte **buf, int *bl, int cmd)
{
byte *next;
diff --git a/sysdep/bsd/krt-sock.h b/sysdep/bsd/krt-sock.h
index c585435..d2a7efb 100644
--- a/sysdep/bsd/krt-sock.h
+++ b/sysdep/bsd/krt-sock.h
@@ -40,7 +40,6 @@ struct krt_if_params {
struct krt_if_status {
};
-static int krt_set_hook(sock *sk, int size);
static inline int krt_set_params_same(struct krt_set_params *o UNUSED, struct krt_set_params *n UNUSED) { return 1; }
void krt_read_msg(struct proto *p, struct ks_msg *msg, int scan);