From 7e7790c61f14dff300d7c5464fdd47e4c15a0731 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 18 Oct 1998 12:50:43 +0000 Subject: Since almost every UNIX system requires different techniques for reading the kernel routing table as opposed to modifying it which is approximately the same on non-netlink systems, I've split the kernel routing table routines to read and write parts. To be implemented later ;-) --- sysdep/unix/sync-rt.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'sysdep/unix/sync-rt.c') diff --git a/sysdep/unix/sync-rt.c b/sysdep/unix/sync-rt.c index c1bf7f76..69b2bde1 100644 --- a/sysdep/unix/sync-rt.c +++ b/sysdep/unix/sync-rt.c @@ -21,42 +21,39 @@ #include "lib/timer.h" #include "unix.h" +#include "krt.h" void -uk_rt_notify(struct proto *p, net *net, rte *new, rte *old) +krt_start(struct proto *P) { + struct krt_proto *p = (struct krt_proto *) P; + krt_scan_start(p); } void -uk_start(struct proto *p) +krt_shutdown(struct proto *P, int time) { + struct krt_proto *p = (struct krt_proto *) P; + krt_scan_shutdown(p); } void -uk_init(struct protocol *x) +krt_preconfig(struct protocol *x) { -} - -void -uk_preconfig(struct protocol *x) -{ - struct proto *p = proto_new(&proto_unix_kernel, sizeof(struct proto)); + struct krt_proto *p = (struct krt_proto *) proto_new(&proto_unix_kernel, sizeof(struct krt_proto)); - p->preference = DEF_PREF_UKR; - p->rt_notify = uk_rt_notify; - p->start = uk_start; -} - -void -uk_postconfig(struct protocol *x) -{ + p->p.preference = DEF_PREF_UKR; + p->p.start = krt_start; + p->p.shutdown = krt_shutdown; + krt_scan_preconfig(p); + krt_set_preconfig(p); } struct protocol proto_unix_kernel = { { NULL, NULL }, "kernel", 0, - uk_init, - uk_preconfig, - uk_postconfig + NULL, /* init */ + krt_preconfig, + NULL /* postconfig */ }; -- cgit v1.2.3