summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.h
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2012-05-11 00:01:29 +0200
committerOndrej Filip <feela@network.cz>2012-05-11 00:01:29 +0200
commit72b2db8db7534c52e928618410ec1f18787752c8 (patch)
tree7eee7f4c26a36f72e0700e9e5d78056f5329f85c /sysdep/unix/krt.h
parent2795700c3158fa52b6cf957e9d0b9ad4a27c67a5 (diff)
parent95616c820248018f4999972cad315f2da60e4960 (diff)
Merge branch 'master' of ssh://git.nic.cz/bird
Diffstat (limited to 'sysdep/unix/krt.h')
-rw-r--r--sysdep/unix/krt.h62
1 files changed, 30 insertions, 32 deletions
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h
index 19b69e49..d6fbf721 100644
--- a/sysdep/unix/krt.h
+++ b/sysdep/unix/krt.h
@@ -15,9 +15,7 @@ struct krt_proto;
struct kif_config;
struct kif_proto;
-#include "lib/krt-scan.h"
-#include "lib/krt-set.h"
-#include "lib/krt-iface.h"
+#include "lib/krt-sys.h"
/* Flags stored in net->n.flags, rest are in nest/route.h */
@@ -45,8 +43,7 @@ extern struct protocol proto_unix_kernel;
struct krt_config {
struct proto_config c;
- struct krt_set_params set;
- struct krt_scan_params scan;
+ struct krt_params sys; /* Sysdep params */
int persist; /* Keep routes when we exit */
int scan_time; /* How often we re-scan routes */
int learn; /* Learn routes from other sources */
@@ -55,9 +52,7 @@ struct krt_config {
struct krt_proto {
struct proto p;
- struct krt_set_status set;
- struct krt_scan_status scan;
- struct krt_if_status iface;
+ struct krt_status sys; /* Sysdep state */
#ifdef KRT_ALLOW_LEARN
struct rtable krt_table; /* Internal table of inherited routes */
#endif
@@ -69,7 +64,6 @@ struct krt_proto {
int initialized; /* First scan has already been finished */
};
-extern struct proto_config *cf_krt;
extern pool *krt_pool;
#define KRT_CF ((struct krt_config *)p->p.cf)
@@ -79,6 +73,7 @@ extern pool *krt_pool;
if (pr->p.debug & fl) \
{ log(L_TRACE "%s: " msg, pr->p.name , ## args); } } while(0)
+struct proto_config * kif_init_config(int class);
void kif_request_scan(void);
void krt_got_route(struct krt_proto *p, struct rte *e);
void krt_got_route_async(struct krt_proto *p, struct rte *e, int new);
@@ -101,46 +96,49 @@ struct kif_primary_item {
struct kif_config {
struct proto_config c;
- struct krt_if_params iface;
+ struct kif_params sys; /* Sysdep params */
int scan_time; /* How often we re-scan interfaces */
list primary; /* Preferences for primary addresses (struct kif_primary_item) */
};
struct kif_proto {
struct proto p;
- struct krt_if_status iface;
+ struct kif_status sys; /* Sysdep state */
};
-extern struct proto_config *cf_kif;
-
#define KIF_CF ((struct kif_config *)p->p.cf)
-/* krt-scan.c */
+struct proto_config * krt_init_config(int class);
+
+
+/* krt sysdep */
+
+void krt_sys_init(struct krt_proto *);
+void krt_sys_start(struct krt_proto *, int);
+void krt_sys_shutdown(struct krt_proto *, int);
+int krt_sys_reconfigure(struct krt_proto *p UNUSED, struct krt_config *n, struct krt_config *o);
-void krt_scan_preconfig(struct config *);
-void krt_scan_postconfig(struct krt_config *);
-void krt_scan_construct(struct krt_config *);
-void krt_scan_start(struct krt_proto *, int);
-void krt_scan_shutdown(struct krt_proto *, int);
+void krt_sys_preconfig(struct config *);
+void krt_sys_postconfig(struct krt_config *);
+void krt_sys_init_config(struct krt_config *);
+void krt_sys_copy_config(struct krt_config *, struct krt_config *);
-void krt_scan_fire(struct krt_proto *);
+int krt_capable(rte *e);
+void krt_do_scan(struct krt_proto *);
+void krt_replace_rte(struct krt_proto *p, net *n, rte *new, rte *old, struct ea_list *eattrs);
-/* krt-set.c */
-void krt_set_construct(struct krt_config *);
-void krt_set_start(struct krt_proto *, int);
-void krt_set_shutdown(struct krt_proto *, int);
+/* kif sysdep */
-int krt_capable(rte *e);
-void krt_set_notify(struct krt_proto *p, net *n, rte *new, rte *old, struct ea_list *eattrs);
+void kif_sys_init(struct kif_proto *);
+void kif_sys_start(struct kif_proto *);
+void kif_sys_shutdown(struct kif_proto *);
+int kif_sys_reconfigure(struct kif_proto *, struct kif_config *, struct kif_config *);
-/* krt-iface.c */
+void kif_sys_init_config(struct kif_config *);
+void kif_sys_copy_config(struct kif_config *, struct kif_config *);
-void krt_if_construct(struct kif_config *);
-void krt_if_start(struct kif_proto *);
-void krt_if_shutdown(struct kif_proto *);
+void kif_do_scan(struct kif_proto *);
-void krt_if_scan(struct kif_proto *);
-void krt_if_io_init(void);
#endif