bgp->implicit_eors = 0;
bgp->explicit_eors = 0;
- quagga_timestamp(3, bgp->update_delay_end_time,
- sizeof(bgp->update_delay_end_time));
+ frr_timestamp(3, bgp->update_delay_end_time,
+ sizeof(bgp->update_delay_end_time));
/*
* Add an end-of-initial-update marker to the main process queues so
if (bgp->main_peers_update_hold)
return;
- quagga_timestamp(3, bgp->update_delay_peers_resume_time,
- sizeof(bgp->update_delay_peers_resume_time));
+ frr_timestamp(3, bgp->update_delay_peers_resume_time,
+ sizeof(bgp->update_delay_peers_resume_time));
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
if (!peer_established(peer))
thread_add_timer(bm->master, bgp_establish_wait_timer, bgp,
bgp->v_establish_wait, &bgp->t_establish_wait);
- quagga_timestamp(3, bgp->update_delay_begin_time,
- sizeof(bgp->update_delay_begin_time));
+ frr_timestamp(3, bgp->update_delay_begin_time,
+ sizeof(bgp->update_delay_begin_time));
}
static void bgp_update_delay_process_status_change(struct peer *peer)
}
/* Is it end of initial update? (after startup) */
if (!dest) {
- quagga_timestamp(3, bgp->update_delay_zebra_resume_time,
- sizeof(bgp->update_delay_zebra_resume_time));
+ frr_timestamp(3, bgp->update_delay_zebra_resume_time,
+ sizeof(bgp->update_delay_zebra_resume_time));
bgp->main_zebra_update_hold = 0;
FOREACH_AFI_SAFI (afi, safi) {
}
/* For time string format. */
-size_t quagga_timestamp(int timestamp_precision, char *buf, size_t buflen)
+size_t frr_timestamp(int timestamp_precision, char *buf, size_t buflen)
{
static struct {
time_t last;
It caches the most recent localtime result and can therefore
avoid multiple calls within the same second. If buflen is too small,
*buf will be set to '\0', and 0 will be returned. */
-#define QUAGGA_TIMESTAMP_LEN 40
-extern size_t quagga_timestamp(int timestamp_precision /* # subsecond digits */,
- char *buf, size_t buflen);
+#define FRR_TIMESTAMP_LEN 40
+extern size_t frr_timestamp(int timestamp_precision /* # subsecond digits */,
+ char *buf, size_t buflen);
extern void zlog_hexdump(const void *mem, size_t len);
extern const char *zlog_sanitize(char *buf, size_t bufsz, const void *in,
size_t len; /* length of rendered timestamp */
int precision; /* configuration parameter */
int already_rendered; /* should be initialized to 0 */
- char buf[QUAGGA_TIMESTAMP_LEN]; /* will contain the rendered timestamp
- */
+ char buf[FRR_TIMESTAMP_LEN]; /* will contain the rendered timestamp
+ */
};
/* Defines for use in command construction: */
/* Output current time to the vty. */
void vty_time_print(struct vty *vty, int cr)
{
- char buf[QUAGGA_TIMESTAMP_LEN];
+ char buf[FRR_TIMESTAMP_LEN];
- if (quagga_timestamp(0, buf, sizeof(buf)) == 0) {
- zlog_info("quagga_timestamp error");
+ if (frr_timestamp(0, buf, sizeof(buf)) == 0) {
+ zlog_info("frr_timestamp error");
return;
}
if (cr)
if (vtysh_add_timestamp && strncmp(line, "exit", 4)) {
char ts[48];
- (void)quagga_timestamp(3, ts, sizeof(ts));
+ (void)frr_timestamp(3, ts, sizeof(ts));
vty_out(vty, "%% %s\n\n", ts);
}
zif = ifp->info;
zif->up_count++;
- quagga_timestamp(2, zif->up_last, sizeof(zif->up_last));
+ frr_timestamp(2, zif->up_last, sizeof(zif->up_last));
/* Notify the protocol daemons. */
if (ifp->ptm_enable && (ifp->ptm_status == ZEBRA_PTM_STATUS_DOWN)) {
zif = ifp->info;
zif->down_count++;
- quagga_timestamp(2, zif->down_last, sizeof(zif->down_last));
+ frr_timestamp(2, zif->down_last, sizeof(zif->down_last));
if_down_nhg_dependents(ifp);
/* Information about up/down changes */
unsigned int up_count;
- char up_last[QUAGGA_TIMESTAMP_LEN];
+ char up_last[FRR_TIMESTAMP_LEN];
unsigned int down_count;
- char down_last[QUAGGA_TIMESTAMP_LEN];
+ char down_last[FRR_TIMESTAMP_LEN];
#if defined(HAVE_RTADV)
struct rtadvconf rtadv;