diff options
author | Martin Mares <mj@ucw.cz> | 1998-10-18 12:50:43 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-10-18 12:50:43 +0000 |
commit | 7e7790c61f14dff300d7c5464fdd47e4c15a0731 (patch) | |
tree | faa06678f7dc7bf821af328f29211a03a7ee7b3a /sysdep/unix/sync-rt.c | |
parent | 8b1688177b2b3c6a3740f792997f3057b9bff0da (diff) |
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 ;-)
Diffstat (limited to 'sysdep/unix/sync-rt.c')
-rw-r--r-- | sysdep/unix/sync-rt.c | 37 |
1 files changed, 17 insertions, 20 deletions
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 */ }; |