]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripd: add qobj registrations
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 7 Dec 2016 15:01:47 +0000 (16:01 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 9 Dec 2016 16:36:25 +0000 (17:36 +0100)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ripd/ripd.c
ripd/ripd.h

index 9de3ca7c3d300d009c8bcc31051271d26eb6c0da..36e8e6f274e9e9b59961eea78c167cd93a6bf18b 100644 (file)
@@ -45,6 +45,8 @@
 #include "ripd/ripd.h"
 #include "ripd/rip_debug.h"
 
+DEFINE_QOBJ_TYPE(rip)
+
 /* UDP receive buffer size */
 #define RIP_UDP_RCV_BUF 41600
 
@@ -2698,6 +2700,8 @@ rip_create (void)
   rip_event (RIP_READ, rip->sock);
   rip_event (RIP_UPDATE_EVENT, 1);
 
+  QOBJ_REG (rip, rip);
+
   return 0;
 }
 
@@ -3851,6 +3855,8 @@ rip_clean (void)
 
   if (rip)
     {
+      QOBJ_UNREG (rip);
+
       /* Clear RIP routes */
       for (rp = route_top (rip->table); rp; rp = route_next (rp))
         if ((list = rp->info) != NULL)
index cd4d560af9689c687c761ba2510443fd3d94b1ac..68b3d1fc6ec6d6c07adc32f9f13940b3f814150b 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _ZEBRA_RIP_H
 #define _ZEBRA_RIP_H
 
+#include "qobj.h"
 #include "rip_memory.h"
 
 /* RIP version number. */
@@ -156,7 +157,10 @@ struct rip
     int metric_config;
     u_int32_t metric;
   } route_map[ZEBRA_ROUTE_MAX];
+
+  QOBJ_FIELDS
 };
+DECLARE_QOBJ_TYPE(rip)
 
 /* RIP routing table entry which belong to rip_packet. */
 struct rte