]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Channelize: rt_notify arg conversion table -> channel
authorJan Moskyto Matejka <mq@ucw.cz>
Mon, 4 Apr 2016 14:17:11 +0000 (16:17 +0200)
committerJan Moskyto Matejka <mq@ucw.cz>
Thu, 7 Apr 2016 08:08:23 +0000 (10:08 +0200)
nest/proto-hooks.c
nest/protocol.h
nest/rt-table.c
proto/ospf/topology.c
proto/ospf/topology.h
proto/pipe/pipe.c
proto/radv/radv.c
proto/rip/rip.c
sysdep/unix/krt.c

index e80f87ea527517b4cab321a891eb2bbe1738ebb6..5923ff67fa4f05d760c22f1443db9a01bfd475c3 100644 (file)
@@ -189,7 +189,7 @@ void ifa_notify(struct proto *p, unsigned flags, struct ifa *a)
 /**
  * rt_notify - notify instance about routing table change
  * @p: protocol instance
- * @table: a routing table 
+ * @channel: notifying channel
  * @net: a network entry
  * @new: new route for the network
  * @old: old route for the network
index 41e31a8078ce11ec304321e6bce097301a027e1e..19f5d0701edd96641e3a5add6880276acb6c36d0 100644 (file)
@@ -184,7 +184,7 @@ struct proto {
 
   void (*if_notify)(struct proto *, unsigned flags, struct iface *i);
   void (*ifa_notify)(struct proto *, unsigned flags, struct ifa *a);
-  void (*rt_notify)(struct proto *, struct rtable *table, struct network *net, struct rte *new, struct rte *old, struct ea_list *attrs);
+  void (*rt_notify)(struct proto *, struct channel *, struct network *net, struct rte *new, struct rte *old, struct ea_list *attrs);
   void (*neigh_notify)(struct neighbor *neigh);
   struct ea_list *(*make_tmp_attrs)(struct rte *rt, struct linpool *pool);
   void (*store_tmp_attrs)(struct rte *rt, struct ea_list *attrs);
index 2c9c6e3a954ac9346d536b0d45921c11e53e5b42..03ab3b92f0980916c9117bc16401eb9db959c841 100644 (file)
@@ -481,18 +481,18 @@ do_rt_notify(struct channel *c, net *net, rte *new, rte *old, ea_list *tmpa, int
        rte_trace_out(D_ROUTES, p, old, "removed");
     }
   if (!new)
-    p->rt_notify(p, c->table, net, NULL, old, NULL);
+    p->rt_notify(p, c, net, NULL, old, NULL);
   else if (tmpa)
     {
       ea_list *t = tmpa;
       while (t->next)
        t = t->next;
       t->next = new->attrs->eattrs;
-      p->rt_notify(p, c->table, net, new, old, tmpa);
+      p->rt_notify(p, c, net, new, old, tmpa);
       t->next = NULL;
     }
   else
-    p->rt_notify(p, c->table, net, new, old, new->attrs->eattrs);
+    p->rt_notify(p, c, net, new, old, new->attrs->eattrs);
 }
 
 static void
@@ -552,7 +552,7 @@ rt_notify_basic(struct channel *c, net *net, rte *new0, rte *old0, int refeed)
 
 #ifdef CONFIG_PIPE
     if ((p->proto == &proto_pipe) && !new0 && (p != old0->sender->proto))
-      p->rt_notify(p, c->table, net, NULL, old0, NULL);
+      p->rt_notify(p, c, net, NULL, old0, NULL);
 #endif
 
     return;
index 89bf87c7aa8529590c92917f520621fc87812250..9d0a93c7bd5081d14c0ac3d8556df4e82ba17622 100644 (file)
@@ -1241,7 +1241,7 @@ find_surrogate_fwaddr(struct ospf_proto *p, struct ospf_area *oa)
 }
 
 void
-ospf_rt_notify(struct proto *P, rtable *tbl UNUSED, net *n, rte *new, rte *old UNUSED, ea_list *ea)
+ospf_rt_notify(struct proto *P, struct channel *ch UNUSED, net *n, rte *new, rte *old UNUSED, ea_list *ea)
 {
   struct ospf_proto *p = (struct ospf_proto *) P;
   struct ospf_area *oa = NULL; /* non-NULL for NSSA-LSA */
index 1dbee070b81939801ab6941d92e2be07ce790af5..38447fdfa82fa8c5a5568bf2fa8e2e17b9594d57 100644 (file)
@@ -188,7 +188,7 @@ void ospf_originate_sum_net_lsa(struct ospf_proto *p, struct ospf_area *oa, ort
 void ospf_originate_sum_rt_lsa(struct ospf_proto *p, struct ospf_area *oa, u32 drid, int metric, u32 options);
 void ospf_originate_ext_lsa(struct ospf_proto *p, struct ospf_area *oa, ort *nf, u8 mode, u32 metric, u32 ebit, ip_addr fwaddr, u32 tag, int pbit);
 
-void ospf_rt_notify(struct proto *P, rtable *tbl, net *n, rte *new, rte *old, ea_list *attrs);
+void ospf_rt_notify(struct proto *P, struct channel *ch, net *n, rte *new, rte *old, ea_list *attrs);
 void ospf_update_topology(struct ospf_proto *p);
 
 struct top_hash_entry *ospf_hash_find(struct top_graph *, u32 domain, u32 lsa, u32 rtr, u32 type);
index 57db3e8bc54ae28aa73ca55dcc81eaef5ee75b67..f3df3e7148701f79fa20550ced08d713a90deb25 100644 (file)
 #include "pipe.h"
 
 static void
-pipe_rt_notify(struct proto *P, rtable *src_table, net *n, rte *new, rte *old, ea_list *attrs)
+pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *old, ea_list *attrs)
 {
   struct pipe_proto *p = (void *) P;
-  struct channel *dst = (src_table == p->pri->table) ? p->sec : p->pri;
+  struct channel *dst = (src_ch == p->pri) ? p->sec : p->pri;
   struct rte_src *src;
 
   net *nn;
@@ -89,9 +89,9 @@ pipe_rt_notify(struct proto *P, rtable *src_table, net *n, rte *new, rte *old, e
       src = old->attrs->src;
     }
 
-  src_table->pipe_busy = 1;
+  src_ch->table->pipe_busy = 1;
   rte_update2(dst, nn, e, src);
-  src_table->pipe_busy = 0;
+  src_ch->table->pipe_busy = 0;
 }
 
 static int
index f9c0940f4c98e7975d1deed8359450a5250f7c50..4c845f7abb845c5062ca5feb087c3a4fd4b3990a 100644 (file)
@@ -281,7 +281,7 @@ radv_import_control(struct proto *p, rte **new, ea_list **attrs UNUSED, struct l
 }
 
 static void
-radv_rt_notify(struct proto *p, rtable *tbl UNUSED, net *n, rte *new, rte *old UNUSED, ea_list *attrs UNUSED)
+radv_rt_notify(struct proto *p, struct channel *ch UNUSED, net *n, rte *new, rte *old UNUSED, ea_list *attrs UNUSED)
 {
   struct proto_radv *ra = (struct proto_radv *) p;
   struct radv_config *cf = (struct radv_config *) (p->cf);
index f020bc5b4c6edeb46f403ab652e6da94e882d4c7..2202327929ef67b0eec789a7bb8cc6058647ef47 100644 (file)
@@ -309,7 +309,7 @@ rip_withdraw_rte(struct rip_proto *p, net_addr *n, struct rip_neighbor *from)
  * it into our data structures.
  */
 static void
-rip_rt_notify(struct proto *P, struct rtable *table UNUSED, struct network *net, struct rte *new,
+rip_rt_notify(struct proto *P, struct channel *ch UNUSED, struct network *net, struct rte *new,
              struct rte *old UNUSED, struct ea_list *attrs)
 {
   struct rip_proto *p = (struct rip_proto *) P;
index 6af3a84ff35ef11a449563c32b736983ef3fa9b2..6b3b4eee004b735c2fbff4ba3f309d15ccc73ac2 100644 (file)
@@ -1014,7 +1014,7 @@ krt_import_control(struct proto *P, rte **new, ea_list **attrs, struct linpool *
 }
 
 static void
-krt_rt_notify(struct proto *P, struct rtable *table UNUSED, net *net,
+krt_rt_notify(struct proto *P, struct channel *ch UNUSED, net *net,
              rte *new, rte *old, struct ea_list *eattrs)
 {
   struct krt_proto *p = (struct krt_proto *) P;