]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib, zebra: Add ability to pass interface speed up from zebra
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 30 Mar 2017 19:37:22 +0000 (15:37 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 3 Apr 2017 18:49:35 +0000 (14:49 -0400)
This is a prepatory commit for future improvements.

Add a change to the zapi to pass the interface speed up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/if.h
lib/zclient.c
zebra/zserv.c

index 49f2a524781db7b558f63d6b026af7eacc612464..d7ec4956366f58a28c673eb00c9d805b6a3c34d3 100644 (file)
--- a/lib/if.h
+++ b/lib/if.h
@@ -229,6 +229,9 @@ struct interface
   /* Interface metric */
   uint32_t metric;
 
+  /* Interface Speed */
+  uint32_t speed;
+
   /* Interface MTU. */
   unsigned int mtu;    /* IPv4 MTU */
   unsigned int mtu6;   /* IPv6 MTU - probably, but not neccessarily same as mtu */
index 445564434524f305483d0d3c55bf292a36bca835..71b95ae7dbadcc8e3e4cad14b7c28ae33eb5d264 100644 (file)
@@ -1003,6 +1003,8 @@ zebra_router_id_update_read (struct stream *s, struct prefix *rid)
  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  * |  metric                                                       |
  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |  speed                                                        |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  * |  ifmtu                                                        |
  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  * |  ifmtu6                                                       |
@@ -1185,6 +1187,7 @@ zebra_interface_if_set_value (struct stream *s, struct interface *ifp)
   ifp->ptm_enable = stream_getc (s);
   ifp->ptm_status = stream_getc (s);
   ifp->metric = stream_getl (s);
+  ifp->speed = stream_getl (s);
   ifp->mtu = stream_getl (s);
   ifp->mtu6 = stream_getl (s);
   ifp->bandwidth = stream_getl (s);
index f9205a12c80fd8ae8ee21dcefba3094b81b119ef..85fdd531221527f74b021b7371eb5a5c5352d199 100644 (file)
@@ -167,6 +167,7 @@ zserv_encode_interface (struct stream *s, struct interface *ifp)
   stream_putc (s, ifp->ptm_enable);
   stream_putc (s, ifp->ptm_status);
   stream_putl (s, ifp->metric);
+  stream_putl (s, ifp->speed);
   stream_putl (s, ifp->mtu);
   stream_putl (s, ifp->mtu6);
   stream_putl (s, ifp->bandwidth);