summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-01-28 19:40:05 +0100
committerDonald Sharp <sharpd@nvidia.com>2021-01-28 19:40:05 +0100
commit94457bc6a8ce081e634e4da37a3a1c33be7871f2 (patch)
tree85a7e772c69260cc5c7533691e47377935467b9b /ripd
parentpimd: Remove #if 0 code from system (diff)
downloadfrr-94457bc6a8ce081e634e4da37a3a1c33be7871f2.tar.xz
frr-94457bc6a8ce081e634e4da37a3a1c33be7871f2.zip
ripd: #if 0 we know what you are up to.
rip, ripped out the #if 0 code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_interface.c33
-rw-r--r--ripd/rip_snmp.c11
-rw-r--r--ripd/ripd.c17
3 files changed, 0 insertions, 61 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index c601ab404..89e7e5dc1 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -208,39 +208,6 @@ static void rip_request_interface(struct interface *ifp)
rip_request_interface_send(ifp, RIPv2);
}
-#if 0
-/* Send RIP request to the neighbor. */
-static void
-rip_request_neighbor (struct in_addr addr)
-{
- struct sockaddr_in to;
-
- memset (&to, 0, sizeof(struct sockaddr_in));
- to.sin_port = htons (RIP_PORT_DEFAULT);
- to.sin_addr = addr;
-
- rip_request_send (&to, NULL, rip->version_send, NULL);
-}
-
-/* Request routes at all interfaces. */
-static void
-rip_request_neighbor_all (void)
-{
- struct route_node *rp;
-
- if (! rip)
- return;
-
- if (IS_RIP_DEBUG_EVENT)
- zlog_debug ("request to the all neighbor");
-
- /* Send request to all neighbor. */
- for (rp = route_top (rip->neighbor); rp; rp = route_next (rp))
- if (rp->info)
- rip_request_neighbor (rp->p.u.prefix4);
-}
-#endif
-
/* Multicast packet receive socket. */
static int rip_multicast_join(struct interface *ifp, int sock)
{
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index be222c7a5..4e6ed1400 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -547,18 +547,7 @@ static uint8_t *rip2PeerTable(struct variable *v, oid name[], size_t *length,
return (uint8_t *)&domain;
case RIP2PEERLASTUPDATE:
-#if 0
- /* We don't know the SNMP agent startup time. We have two choices here:
- * - assume ripd startup time equals SNMP agent startup time
- * - don't support this variable, at all
- * Currently, we do the latter...
- */
- *val_len = sizeof(time_t);
- uptime = peer->uptime; /* now - snmp_agent_startup - peer->uptime */
- return (uint8_t *) &uptime;
-#else
return (uint8_t *)NULL;
-#endif
case RIP2PEERVERSION:
*val_len = sizeof(int);
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 82dd401f9..a276dedec 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -2858,23 +2858,6 @@ void rip_event(struct rip *rip, enum rip_event event, int sock)
}
}
-#if 0
-static void
-rip_update_default_metric (void)
-{
- struct route_node *np;
- struct rip_info *rinfo = NULL;
- struct list *list = NULL;
- struct listnode *listnode = NULL;
-
- for (np = route_top (rip->table); np; np = route_next (np))
- if ((list = np->info) != NULL)
- for (ALL_LIST_ELEMENTS_RO (list, listnode, rinfo))
- if (rinfo->type != ZEBRA_ROUTE_RIP && rinfo->type != ZEBRA_ROUTE_CONNECT)
- rinfo->metric = rip->default_metric;
-}
-#endif
-
struct rip_distance *rip_distance_new(void)
{
return XCALLOC(MTYPE_RIP_DISTANCE, sizeof(struct rip_distance));