diff options
author | Maria Matejka <mq@ucw.cz> | 2022-10-04 15:53:12 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-10-04 15:53:12 +0200 |
commit | 4e1c582caddb6876b9fcbdc29b8bad5ab0b09ee7 (patch) | |
tree | c46d8e5337bc12ec01e3d91b9c2f5f6dd61eb8ad /nest/protocol.h | |
parent | becca314e2546d6005a23398ce2d3012d4b396cb (diff) | |
parent | 71b434a987067475b517792360f58dbe03bfee9e (diff) |
Merge commit '71b434a9' into HEAD
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index 3c823ae1..b4730126 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -60,7 +60,6 @@ struct protocol { int (*start)(struct proto *); /* Start the instance */ int (*shutdown)(struct proto *); /* Stop the instance */ void (*get_status)(struct proto *, byte *buf); /* Get instance status (for `show protocols' command) */ - void (*get_route_info)(struct rte *, byte *buf); /* Get route information (for `show route' command) */ // int (*get_attr)(const struct eattr *, byte *buf, int buflen); /* ASCIIfy dynamic attribute (returns GA_*) */ void (*show_proto_info)(struct proto *); /* Show protocol info (for `show protocols all' command) */ void (*copy_config)(struct proto_config *, struct proto_config *); /* Copy config from given protocol instance */ @@ -128,6 +127,7 @@ struct proto { list channels; /* List of channels to rtables (struct channel) */ struct channel *main_channel; /* Primary channel */ struct rte_src *main_source; /* Primary route source */ + struct rte_owner sources; /* Route source owner structure */ struct iface *vrf; /* Related VRF instance, NULL if global */ const char *name; /* Name of this instance (== cf->name) */ @@ -182,15 +182,12 @@ struct proto { * Routing entry hooks (called only for routes belonging to this protocol): * * rte_recalculate Called at the beginning of the best route selection - * rte_better Compare two rte's and decide which one is better (1=first, 0=second). - * rte_same Compare two rte's and decide whether they are identical (1=yes, 0=no). * rte_mergable Compare two rte's and decide whether they could be merged (1=yes, 0=no). * rte_insert Called whenever a rte is inserted to a routing table. * rte_remove Called whenever a rte is removed from the routing table. */ int (*rte_recalculate)(struct rtable *, struct network *, struct rte *, struct rte *, struct rte *); - int (*rte_better)(struct rte *, struct rte *); int (*rte_mergable)(struct rte *, struct rte *); void (*rte_insert)(struct network *, struct rte *); void (*rte_remove)(struct network *, struct rte *); @@ -342,7 +339,7 @@ void proto_notify_state(struct proto *p, unsigned state); */ static inline int proto_is_inactive(struct proto *p) -{ return (p->active_channels == 0) && (p->active_loops == 0); } +{ return (p->active_channels == 0) && (p->active_loops == 0) && (p->sources.uc == 0); } /* |