summaryrefslogtreecommitdiff
path: root/zebra/kernel_null.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-07-27 19:59:58 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-07-27 19:59:58 +0000
commit457eb9af72e6e7aa85c26b65ba4d053f9ecbffac (patch)
treeca93002285032e0c845749cfd770a446a9fc702b /zebra/kernel_null.c
parent1893740016d35d75de567a5f6b74db2314ffdc52 (diff)
[zebra] Add test rig code, for testing the zebra RIB
2006-07-27 Paul Jakma <paul.jakma@sun.com> * {ioctl,kernel}_null.c: Dummy/Null kernel method implementations, useful for testing zebra code that calls such methods. * {redistribute,misc}_null.c: Dummy/Null methods, as above. But for zclient, and for various misc functions. * test_main.c: Test harness for zebra, currently just to test the RIB. * Makefile.am: Build testzebra using above. * zebra_rib.c: Add a global for the workqueue hold time, useful for testing.
Diffstat (limited to 'zebra/kernel_null.c')
-rw-r--r--zebra/kernel_null.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/zebra/kernel_null.c b/zebra/kernel_null.c
new file mode 100644
index 00000000..a84f4371
--- /dev/null
+++ b/zebra/kernel_null.c
@@ -0,0 +1,25 @@
+/* NULL kernel methods for testing. */
+
+#include <zebra.h>
+
+#include "zebra/zserv.h"
+#include "zebra/rt.h"
+#include "zebra/redistribute.h"
+
+int kernel_add_ipv4 (struct prefix *a, struct rib *b) { return 0; }
+#pragma weak kernel_delete_ipv4 = kernel_add_ipv4
+int kernel_add_ipv6 (struct prefix *a, struct rib *b) { return 0; }
+#pragma weak kernel_delete_ipv6 = kernel_add_ipv6
+int kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
+ unsigned int index, int flags, int table)
+{ return 0; }
+
+int kernel_add_route (struct prefix_ipv4 *a, struct in_addr *b, int c, int d)
+{ return 0; }
+
+int kernel_address_add_ipv4 (struct interface *a, struct connected *b)
+{ return 0; }
+#pragma weak kernel_address_delete_ipv4 = kernel_address_add_ipv4
+
+void kernel_init (void) { return; }
+#pragma weak route_read = kernel_init