stream_putw (obuf, info->peer->table_dump_index);
/* Originated */
-#ifdef HAVE_CLOCK_MONOTONIC
stream_putl (obuf, time(NULL) - (bgp_clock() - info->uptime));
-#else
- stream_putl (obuf, info->uptime);
-#endif /* HAVE_CLOCK_MONOTONIC */
/* Dump attribute. */
/* Skip prefix & AFI/SAFI for MP_NLRI */
if (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED))
vty_out (vty, " Must be Connected%s", VTY_NEWLINE);
}
-#ifdef HAVE_CLOCK_MONOTONIC
tbuf = time(NULL) - (bgp_clock() - bnc->last_update);
vty_out (vty, " Last update: %s", ctime(&tbuf));
-#else
- vty_out (vty, " Last update: %s", ctime(&bnc->uptime));
-#endif /* HAVE_CLOCK_MONOTONIC */
vty_out(vty, "%s", VTY_NEWLINE);
}
}
char buf1[BUFSIZ];
struct attr *attr;
int sockunion_vty_out (struct vty *, union sockunion *);
-#ifdef HAVE_CLOCK_MONOTONIC
time_t tbuf;
-#endif
json_object *json_bestpath = NULL;
json_object *json_cluster_list = NULL;
json_object *json_cluster_list_list = NULL;
}
/* Line 8 display Uptime */
-#ifdef HAVE_CLOCK_MONOTONIC
tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
if (json_paths)
{
}
else
vty_out (vty, " Last update: %s", ctime(&tbuf));
-#else
- if (json_paths)
- {
- json_last_update = json_object_new_object();
- json_object_int_add(json_last_update, "epoch", tbuf);
- json_object_string_add(json_last_update, "string", ctime(&binfo->uptime));
- json_object_object_add(json_path, "lastUpdate", json_last_update);
- }
- else
- vty_out (vty, " Last update: %s", ctime(&binfo->uptime));
-#endif /* HAVE_CLOCK_MONOTONIC */
}
/* We've constructed the json object for this path, add it to the json
static inline char *
timestamp_string (time_t ts)
{
-#ifdef HAVE_CLOCK_MONOTONIC
time_t tbuf;
tbuf = time(NULL) - (bgp_clock() - ts);
return ctime(&tbuf);
-#else
- return ctime(&ts);
-#endif /* HAVE_CLOCK_MONOTONIC */
}
static inline int