]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Cleanup in sysdep KRT code, part 3.
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 30 Apr 2012 20:34:06 +0000 (22:34 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Mon, 30 Apr 2012 20:34:06 +0000 (22:34 +0200)
Just one more renaming, old krt_set_notify() to krt_replace_rte().

sysdep/bsd/krt-sock.c
sysdep/unix/krt.c
sysdep/unix/krt.h

index 5fb5f9f7170ad07641f2aedc38fd612411149761..e970d6bdff9682de80dd7cea3e8fa67d38d53294 100644 (file)
@@ -201,8 +201,8 @@ krt_sock_send(int cmd, rte *e)
 }
 
 void
-krt_do_notify(struct krt_proto *p UNUSED, net *n, rte *new, rte *old,
-             struct ea_list *eattrs UNUSED)
+krt_replace_rte(struct krt_proto *p UNUSED, net *n, rte *new, rte *old,
+               struct ea_list *eattrs UNUSED)
 {
   int err = 0;
 
index b0d222277335edf5a6c742d6318327ba8c62e8fa..bf098774cb79cab063f1dddd731fe8b7a016147b 100644 (file)
@@ -37,7 +37,7 @@
  *
  * The code uses OS-dependent parts for kernel updates and scans. These parts are
  * in more specific sysdep directories (e.g. sysdep/linux) in functions krt_sys_* 
- * and kif_sys_* (and some others like krt_do_notify()) and krt-sys.h header file.
+ * and kif_sys_* (and some others like krt_replace_rte()) and krt-sys.h header file.
  * This is also used for platform specific protocol options and route attributes.
  *
  * There was also an old code that used traditional UNIX ioctls for these tasks.
@@ -582,7 +582,7 @@ krt_flush_routes(struct krt_proto *p)
              a->source != RTS_DEVICE && a->source != RTS_INHERIT)
            {
              /* FIXME: this does not work if gw is changed in export filter */
-             krt_do_notify(p, e->net, NULL, e, NULL);
+             krt_replace_rte(p, e->net, NULL, e, NULL);
              n->n.flags &= ~KRF_INSTALLED;
            }
        }
@@ -741,7 +741,7 @@ krt_prune(struct krt_proto *p)
          if (new && (f->flags & KRF_INSTALLED))
            {
              krt_trace_in(p, new, "reinstalling");
-             krt_do_notify(p, n, new, NULL, tmpa);
+             krt_replace_rte(p, n, new, NULL, tmpa);
            }
          break;
        case KRF_SEEN:
@@ -750,11 +750,11 @@ krt_prune(struct krt_proto *p)
          break;
        case KRF_UPDATE:
          krt_trace_in(p, new, "updating");
-         krt_do_notify(p, n, new, old, tmpa);
+         krt_replace_rte(p, n, new, old, tmpa);
          break;
        case KRF_DELETE:
          krt_trace_in(p, old, "deleting");
-         krt_do_notify(p, n, NULL, old, NULL);
+         krt_replace_rte(p, n, NULL, old, NULL);
          break;
        default:
          bug("krt_prune: invalid route status");
@@ -790,7 +790,7 @@ krt_got_route_async(struct krt_proto *p, rte *e, int new)
       if (new)
        {
          krt_trace_in(p, e, "[redirect] deleting");
-         krt_do_notify(p, net, NULL, e, NULL);
+         krt_replace_rte(p, net, NULL, e, NULL);
        }
       /* If !new, it is probably echo of our deletion */
       break;
@@ -908,7 +908,7 @@ krt_notify(struct proto *P, struct rtable *table UNUSED, net *net,
   else
     net->n.flags &= ~KRF_INSTALLED;
   if (p->initialized)          /* Before first scan we don't touch the routes */
-    krt_do_notify(p, net, new, old, eattrs);
+    krt_replace_rte(p, net, new, old, eattrs);
 }
 
 static int
index 9d5639f21bface2b94d0de60829fcbdd63fc58ac..d6fbf7213ac9d5163e346f7f158b5904e8611dd6 100644 (file)
@@ -125,7 +125,7 @@ void krt_sys_copy_config(struct krt_config *, struct krt_config *);
 
 int  krt_capable(rte *e);
 void krt_do_scan(struct krt_proto *);
-void krt_do_notify(struct krt_proto *p, net *n, rte *new, rte *old, struct ea_list *eattrs);
+void krt_replace_rte(struct krt_proto *p, net *n, rte *new, rte *old, struct ea_list *eattrs);
 
 
 /* kif sysdep */