diff options
author | Martin Mares <mj@ucw.cz> | 1999-04-03 13:05:18 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1999-04-03 13:05:18 +0000 |
commit | c10421d3d4b5f23dc953c887332bdb6e80ae0540 (patch) | |
tree | 17ea979a4796bfccbf9e58bb50fc6f501e0390be /sysdep/unix/krt.h | |
parent | 69ec9087ad3fb631f46275220909a876deadb6b5 (diff) |
More changes to the kernel syncer.
o Now compatible with filtering.
o Learning of kernel routes supported only on CONFIG_SELF_CONSCIOUS
systems (on the others it's impossible to get it semantically correct).
o Learning now stores all of its routes in a separate fib and selects
the ones the kernel really uses for forwarding packets.
o Better treatment of CONFIG_AUTO_ROUTES ports.
o Lots of internal changes.
Diffstat (limited to 'sysdep/unix/krt.h')
-rw-r--r-- | sysdep/unix/krt.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h index bde509c1..df9e6d39 100644 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@ -20,11 +20,20 @@ struct kif_proto; /* Flags stored in net->n.flags */ +#define KRF_VERDICT_MASK 0x0f #define KRF_CREATE 0 /* Not seen in kernel table */ #define KRF_SEEN 1 /* Seen in kernel table during last scan */ #define KRF_UPDATE 2 /* Need to update this entry */ #define KRF_DELETE 3 /* Should be deleted */ -#define KRF_LEARN 4 /* We should learn this route */ +#define KRF_IGNORE 4 /* To be ignored */ + +#define KRF_INSTALLED 0x80 /* This route should be installed in the kernel */ + +/* Whenever we recognize our own routes, we allow learing of foreign routes */ + +#ifdef CONFIG_SELF_CONSCIOUS +#define KRT_ALLOW_LEARN +#endif /* krt.c */ @@ -45,6 +54,9 @@ struct krt_proto { struct krt_set_status set; struct krt_scan_status scan; struct krt_if_status iface; +#ifdef KRT_ALLOW_LEARN + struct rtable krt_table; /* Internal table of inherited routes */ +#endif }; extern struct proto_config *cf_krt; @@ -92,7 +104,7 @@ void krt_set_start(struct krt_proto *); void krt_set_shutdown(struct krt_proto *); int krt_capable(rte *e); -void krt_set_notify(struct proto *x, net *net, rte *new, rte *old); +void krt_set_notify(struct krt_proto *x, net *net, rte *new, rte *old); /* krt-iface.c */ |