From 2326b001d6f28e69b88c3c19795d8c0999f07db1 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 20 May 1998 11:54:33 +0000 Subject: Added routing table and routing attribute code. --- nest/protocol.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'nest/protocol.h') diff --git a/nest/protocol.h b/nest/protocol.h index 3ebc13b..26db248 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -9,8 +9,14 @@ #ifndef _BIRD_PROTOCOL_H_ #define _BIRD_PROTOCOL_H_ +#include "lib/lists.h" #include "lib/resource.h" +struct iface; +struct rte; +struct neighbor; +struct rtattr; + /* * Routing Protocol */ @@ -40,20 +46,23 @@ extern struct protocol proto_static; */ struct proto { - struct proto *next; + node n; struct protocol *proto; /* Protocol */ char *name; /* Name of this instance */ unsigned debug; /* Debugging flags */ pool *pool; /* Local objects */ unsigned preference; /* Default route preference */ - void (*if_notify)(struct proto *, struct iface *old, struct iface *new); - void (*rt_notify)(struct proto *, struct rte *old, struct rte *new); + void (*if_notify)(struct proto *, struct iface *new, struct iface *old); + void (*rt_notify)(struct proto *, struct rte *new, struct rte *old); void (*neigh_lost_notify)(struct proto *, struct neighbor *neigh); - void (*debug)(struct proto *); /* Debugging dump */ + void (*dump)(struct proto *); /* Debugging dump */ void (*start)(struct proto *); /* Start the instance */ void (*shutdown)(struct proto *, int time); /* Stop the instance */ + int (*rta_same)(struct rtattr *, struct rtattr *); + int (*rte_better)(struct rte *, struct rte *); + /* Reconfigure function? */ /* Interface patterns */ /* Input/output filters */ @@ -64,4 +73,6 @@ struct proto { void *proto_new(struct protocol *, unsigned size); +extern list proto_list; + #endif -- cgit v1.2.3