diff options
author | Martin Mares <mj@ucw.cz> | 1998-10-18 11:53:21 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-10-18 11:53:21 +0000 |
commit | 0432c0173bb4d234e8ba8e4afea0a8e708e119d8 (patch) | |
tree | 52a7c25de9102f8da2693f9daa9278b172086fb0 /nest | |
parent | 05e56feb57b8e313a2328dbe82e2c2a70ff5115a (diff) |
Split protocol init to building of protocol list and real protocol init.
Added kernel route table syncer skeleton.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/proto.c | 11 | ||||
-rw-r--r-- | nest/protocol.h | 1 | ||||
-rw-r--r-- | nest/route.h | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/nest/proto.c b/nest/proto.c index 6db5a0ef..6c0843d8 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -107,14 +107,19 @@ protos_dump_all(void) } void +protos_build(void) +{ + init_list(&protocol_list); + add_tail(&protocol_list, &proto_device.n); + add_tail(&protocol_list, &proto_rip.n); +} + +void protos_init(void) { struct protocol *p; debug("Initializing protocols\n"); - init_list(&protocol_list); - add_tail(&protocol_list, &proto_device.n); - add_tail(&protocol_list, &proto_rip.n); /* HACK: We should really read this from config */ WALK_LIST(p, protocol_list) p->init(p); } diff --git a/nest/protocol.h b/nest/protocol.h index 6059f7c2..9a0ea98d 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -32,6 +32,7 @@ struct protocol { void (*postconfig)(struct protocol *); /* After configuring */ }; +void protos_build(void); void protos_init(void); void protos_preconfig(void); void protos_postconfig(void); diff --git a/nest/route.h b/nest/route.h index e50de07d..78f9446a 100644 --- a/nest/route.h +++ b/nest/route.h @@ -248,6 +248,7 @@ void rta_dump_all(void); #define DEF_PREF_BGP 100 /* BGP */ #define DEF_PREF_OSPF_EXTERNAL 80 /* OSPF external routes */ #define DEF_PREF_RIP_EXTERNAL 70 /* RIP external routes */ +#define DEF_PREF_UKR 50 /* Unidentified Kernel Route */ #define DEF_PREF_SINK 10 /* Sink route */ #endif |