summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/krt.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-26 22:44:38 +0100
committerMartin Mares <mj@ucw.cz>1999-03-26 22:44:38 +0100
commit7e5f5ffdda7232048c4baf3fdec358afb494a29d (patch)
tree0cbc52ac45785f16175d04039a27aa133b4b2cf2 /sysdep/unix/krt.h
parent739ebd8e82b090ed91b3ebe77509ecd6784eca9a (diff)
downloadbird-7e5f5ffdda7232048c4baf3fdec358afb494a29d.tar
bird-7e5f5ffdda7232048c4baf3fdec358afb494a29d.zip
Moved to a much more systematic way of configuring kernel protocols.
o Nothing is configured automatically. You _need_ to specify the kernel syncer in config file in order to get it started. o Syncing has been split to route syncer (protocol "Kernel") and interface syncer (protocol "Device"), device routes are generated by protocol "Direct" (now can exist in multiple instances, so that it will be possible to feed different device routes to different routing tables once multiple tables get supported). See doc/bird.conf.example for a living example of these shiny features.
Diffstat (limited to 'sysdep/unix/krt.h')
-rw-r--r--sysdep/unix/krt.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h
index 02814c6..bde509c 100644
--- a/sysdep/unix/krt.h
+++ b/sysdep/unix/krt.h
@@ -11,6 +11,8 @@
struct krt_config;
struct krt_proto;
+struct kif_config;
+struct kif_proto;
#include "lib/krt-scan.h"
#include "lib/krt-set.h"
@@ -34,8 +36,7 @@ struct krt_config {
struct krt_scan_params scan;
struct krt_if_params iface;
int persist; /* Keep routes when we exit */
- int scan_time; /* How often we re-scan interfaces */
- int route_scan_time; /* How often we re-scan routes */
+ int scan_time; /* How often we re-scan routes */
int learn; /* Learn routes from other sources */
};
@@ -44,7 +45,6 @@ struct krt_proto {
struct krt_set_status set;
struct krt_scan_status scan;
struct krt_if_status iface;
- int accum_time; /* Accumulated route scanning time */
};
extern struct proto_config *cf_krt;
@@ -60,6 +60,23 @@ void krt_got_route_async(struct krt_proto *p, struct rte *e, int new);
#define KRT_SRC_REDIRECT 1 /* Redirect route, delete it */
#define KRT_SRC_ALIEN 2 /* Route installed by someone else */
+extern struct protocol proto_unix_iface;
+
+struct kif_config {
+ struct proto_config c;
+ struct krt_if_params iface;
+ int scan_time; /* How often we re-scan interfaces */
+};
+
+struct kif_proto {
+ struct proto p;
+ struct krt_if_status iface;
+};
+
+extern struct proto_config *cf_kif;
+
+#define KIF_CF ((struct kif_config *)p->p.cf)
+
/* krt-scan.c */
void krt_scan_preconfig(struct krt_config *);
@@ -79,10 +96,11 @@ void krt_set_notify(struct proto *x, net *net, rte *new, rte *old);
/* krt-iface.c */
-void krt_if_preconfig(struct krt_config *);
-void krt_if_start(struct krt_proto *);
-void krt_if_shutdown(struct krt_proto *);
+void krt_if_preconfig(struct kif_config *);
+void krt_if_start(struct kif_proto *);
+void krt_if_shutdown(struct kif_proto *);
-void krt_if_scan(struct krt_proto *);
+void krt_if_scan(struct kif_proto *);
+void krt_if_io_init(void);
#endif