summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-05 14:49:04 +0200
committerMartin Mares <mj@ucw.cz>2000-06-05 14:49:04 +0200
commit73275d855dcc8a184bc19f3750c8775a59111260 (patch)
tree856069af6f8bbec53065a076abe77c9ffc8c27c7 /sysdep/unix/krt.c
parent525fa2c1f0e955455bed3fdb397aceb1e6e69a57 (diff)
downloadbird-73275d855dcc8a184bc19f3750c8775a59111260.tar
bird-73275d855dcc8a184bc19f3750c8775a59111260.zip
Documented all the sysdeps (only briefly, I admit).
Except for Filters, RIP and OSPF, the progdocs are complete.
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c57
1 files changed, 33 insertions, 24 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 9bc2980..7aee1f6 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -6,6 +6,39 @@
* Can be freely distributed and used under the terms of the GNU GPL.
*/
+/**
+ * DOC: Kernel synchronization
+ *
+ * This system dependent module implements the Kernel and Device protocol,
+ * that is synchronization of interface lists and routing tables with the
+ * OS kernel.
+ *
+ * The whole kernel synchronization is a bit messy and touches some internals
+ * of the routing table engine, because routing table maintenance is a typical
+ * example of the proverbial compatibility between different Unices and we want
+ * to keep the overhead of our krt business as low as possible and avoid maintaining
+ * a local routing table copy.
+ *
+ * The kernel syncer can work in three different modes (according to system config header):
+ * Either with a single routing table and single KRT protocol [traditional Unix]
+ * or with many routing tables and separate krt protocols for all of them
+ * or with many routing tables, but every scan including all tables, so we start
+ * separate krt protocols which cooperate with each other [Linux 2.2].
+ * In this case, we keep only a single scan timer.
+ *
+ * We use FIB node flags to keep track of route synchronization status. We also
+ * attach temporary &rte's to the routing tables, but it cannot harm the rest of
+ * BIRD since table synchronization is an atomic process.
+ *
+ * When starting up, we cheat by looking if there is another
+ * KRT instance to be initialized later and performing table scan
+ * only once for all the instances.
+ */
+
+/*
+ * If you are brave enough, continue now. You cannot say you haven't been warned.
+ */
+
#undef LOCAL_DEBUG
#include "nest/bird.h"
@@ -18,30 +51,6 @@
#include "unix.h"
#include "krt.h"
-/*
- * The whole kernel synchronization is a bit messy and touches some internals
- * of the routing table engine, because routing table maintenance is a typical
- * example of the proverbial compatibility between different Unices and we want
- * to keep the overhead of our krt business as low as possible and avoid maintaining
- * a local routing table copy.
- *
- * The kernel syncer can work in three different modes (according to system config header):
- * o Single routing table, single krt protocol. [traditional Unix]
- * o Many routing tables, separate krt protocols for all of them.
- * o Many routing tables, but every scan includes all tables, so we start
- * separate krt protocols which cooperate with each other. [Linux 2.2]
- * In this case, we keep only a single scan timer.
- *
- * The hacky bits:
- * o We use FIB node flags to keep track of route synchronization status.
- * o When starting up, we cheat by looking if there is another kernel
- * krt instance to be initialized later and performing table scan
- * only once for all the instances.
- * o We attach temporary rte's to routing tables.
- *
- * If you are brave enough, continue now. You cannot say you haven't been warned.
- */
-
static int krt_uptodate(rte *k, rte *e);
/*