summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/event.c12
-rw-r--r--lib/if.c41
-rw-r--r--lib/plist.c8
3 files changed, 2 insertions, 59 deletions
diff --git a/lib/event.c b/lib/event.c
index cfe8c3adc0..d95b3021a7 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -429,9 +429,6 @@ DEFUN_NOSH (show_event_poll,
return CMD_SUCCESS;
}
-#if CONFDATE > 20241231
-CPP_NOTICE("Remove `clear thread cpu` command")
-#endif
DEFUN (clear_event_cpu,
clear_event_cpu_cmd,
"clear event cpu [FILTER]",
@@ -457,14 +454,6 @@ DEFUN (clear_event_cpu,
return CMD_SUCCESS;
}
-ALIAS (clear_event_cpu,
- clear_thread_cpu_cmd,
- "clear thread cpu [FILTER]",
- "Clear stored data in all pthreads\n"
- "Thread information\n"
- "Thread CPU usage\n"
- "Display filter (rwtexb)\n")
-
static void show_event_timers_helper(struct vty *vty, struct event_loop *m)
{
const char *name = m->name ? m->name : "main";
@@ -504,7 +493,6 @@ void event_cmd_init(void)
{
install_element(VIEW_NODE, &show_event_cpu_cmd);
install_element(VIEW_NODE, &show_event_poll_cmd);
- install_element(ENABLE_NODE, &clear_thread_cpu_cmd);
install_element(ENABLE_NODE, &clear_event_cpu_cmd);
install_element(CONFIG_NODE, &service_cputime_stats_cmd);
diff --git a/lib/if.c b/lib/if.c
index 586fc1d5cd..864c82bbf2 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -858,47 +858,6 @@ struct nbr_connected *nbr_connected_check(struct interface *ifp,
return NULL;
}
-/* Print if_addr structure. */
-static void __attribute__((unused))
-connected_log(struct connected *connected, char *str)
-{
- struct prefix *p;
- struct interface *ifp;
- char logbuf[BUFSIZ];
- char buf[BUFSIZ];
-
- ifp = connected->ifp;
- p = connected->address;
-
- snprintf(logbuf, sizeof(logbuf), "%s interface %s vrf %s(%u) %s %pFX ",
- str, ifp->name, ifp->vrf->name, ifp->vrf->vrf_id,
- prefix_family_str(p), p);
-
- p = connected->destination;
- if (p) {
- strlcat(logbuf, inet_ntop(p->family, &p->u.prefix, buf, BUFSIZ),
- BUFSIZ);
- }
- zlog_info("%s", logbuf);
-}
-
-/* Print if_addr structure. */
-static void __attribute__((unused))
-nbr_connected_log(struct nbr_connected *connected, char *str)
-{
- struct prefix *p;
- struct interface *ifp;
- char logbuf[BUFSIZ];
-
- ifp = connected->ifp;
- p = connected->address;
-
- snprintf(logbuf, sizeof(logbuf), "%s interface %s %s %pFX ", str,
- ifp->name, prefix_family_str(p), p);
-
- zlog_info("%s", logbuf);
-}
-
/* count the number of connected addresses that are in the given family */
unsigned int connected_count_by_family(struct interface *ifp, int family)
{
diff --git a/lib/plist.c b/lib/plist.c
index 6950ab5761..713eee25ed 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -1536,7 +1536,6 @@ int prefix_bgp_show_prefix_list(struct vty *vty, afi_t afi, char *name,
if (use_json) {
json = json_object_new_object();
json_prefix = json_object_new_object();
- json_list = json_object_new_object();
json_object_int_add(json_prefix, "prefixListCounter",
plist->count);
@@ -1544,10 +1543,7 @@ int prefix_bgp_show_prefix_list(struct vty *vty, afi_t afi, char *name,
plist->name);
for (pentry = plist->head; pentry; pentry = pentry->next) {
- struct prefix *p = &pentry->prefix;
- char buf_a[BUFSIZ];
-
- snprintf(buf_a, sizeof(buf_a), "%pFX", p);
+ json_list = json_object_new_object();
json_object_int_add(json_list, "seq", pentry->seq);
json_object_string_add(json_list, "seqPrefixListType",
@@ -1560,7 +1556,7 @@ int prefix_bgp_show_prefix_list(struct vty *vty, afi_t afi, char *name,
json_object_int_add(json_list, "le",
pentry->le);
- json_object_object_add(json_prefix, buf_a, json_list);
+ json_object_object_addf(json_prefix, json_list, "%pFX", &pentry->prefix);
}
if (afi == AFI_IP)
json_object_object_add(json, "ipPrefixList",