diff options
Diffstat (limited to 'proto/ospf')
-rw-r--r-- | proto/ospf/dbdes.c | 10 | ||||
-rw-r--r-- | proto/ospf/iface.c | 28 | ||||
-rw-r--r-- | proto/ospf/lsupd.c | 14 | ||||
-rw-r--r-- | proto/ospf/neighbor.c | 26 | ||||
-rw-r--r-- | proto/ospf/ospf.c | 6 | ||||
-rw-r--r-- | proto/ospf/ospf.h | 2 | ||||
-rw-r--r-- | proto/ospf/rt.c | 6 |
7 files changed, 46 insertions, 46 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 270259a7..f211935f 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -279,8 +279,8 @@ ospf_process_dbdes(struct ospf_proto *p, struct ospf_packet *pkt, struct ospf_ne req->lsa = lsa; req->lsa_body = LSA_BODY_DUMMY; - if (!tm2_active(n->lsrq_timer)) - tm2_start(n->lsrq_timer, 0); + if (!tm_active(n->lsrq_timer)) + tm_start(n->lsrq_timer, 0); } } @@ -366,7 +366,7 @@ ospf_receive_dbdes(struct ospf_packet *pkt, struct ospf_iface *ifa, n->options = rcv_options; n->myimms &= ~DBDES_MS; n->imms = rcv_imms; - tm2_stop(n->dbdes_timer); + tm_stop(n->dbdes_timer); ospf_neigh_sm(n, INM_NEGDONE); ospf_send_dbdes(p, n); break; @@ -422,13 +422,13 @@ ospf_receive_dbdes(struct ospf_packet *pkt, struct ospf_iface *ifa, if (!(n->myimms & DBDES_M) && !(n->imms & DBDES_M)) { - tm2_stop(n->dbdes_timer); + tm_stop(n->dbdes_timer); ospf_neigh_sm(n, INM_EXDONE); break; } ospf_send_dbdes(p, n); - tm2_start(n->dbdes_timer, n->ifa->rxmtint S); + tm_start(n->dbdes_timer, n->ifa->rxmtint S); } else { diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 33ec21fb..29d21a07 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -263,13 +263,13 @@ ospf_iface_down(struct ospf_iface *ifa) ospf_neigh_sm(n, INM_KILLNBR); if (ifa->hello_timer) - tm2_stop(ifa->hello_timer); + tm_stop(ifa->hello_timer); if (ifa->poll_timer) - tm2_stop(ifa->poll_timer); + tm_stop(ifa->poll_timer); if (ifa->wait_timer) - tm2_stop(ifa->wait_timer); + tm_stop(ifa->wait_timer); ospf_flush2_lsa(p, &ifa->link_lsa); ospf_flush2_lsa(p, &ifa->net_lsa); @@ -396,15 +396,15 @@ ospf_iface_sm(struct ospf_iface *ifa, int event) { ospf_iface_chstate(ifa, OSPF_IS_WAITING); if (ifa->wait_timer) - tm2_start(ifa->wait_timer, ifa->waitint S); + tm_start(ifa->wait_timer, ifa->waitint S); } } if (ifa->hello_timer) - tm2_start(ifa->hello_timer, ifa->helloint S); + tm_start(ifa->hello_timer, ifa->helloint S); if (ifa->poll_timer) - tm2_start(ifa->poll_timer, ifa->pollint S); + tm_start(ifa->poll_timer, ifa->pollint S); ospf_send_hello(ifa, OHS_HELLO, NULL); } @@ -494,13 +494,13 @@ ospf_iface_add(struct object_lock *lock) if (! ifa->stub) { - ifa->hello_timer = tm2_new_init(ifa->pool, hello_timer_hook, ifa, ifa->helloint S, 0); + ifa->hello_timer = tm_new_init(ifa->pool, hello_timer_hook, ifa, ifa->helloint S, 0); if (ifa->type == OSPF_IT_NBMA) - ifa->poll_timer = tm2_new_init(ifa->pool, poll_timer_hook, ifa, ifa->pollint S, 0); + ifa->poll_timer = tm_new_init(ifa->pool, poll_timer_hook, ifa, ifa->pollint S, 0); if ((ifa->type == OSPF_IT_BCAST) || (ifa->type == OSPF_IT_NBMA)) - ifa->wait_timer = tm2_new_init(ifa->pool, wait_timer_hook, ifa, 0, 0); + ifa->wait_timer = tm_new_init(ifa->pool, wait_timer_hook, ifa, 0, 0); ifa->flood_queue_size = ifa_flood_queue_size(ifa); ifa->flood_queue = mb_allocz(ifa->pool, ifa->flood_queue_size * sizeof(void *)); @@ -703,7 +703,7 @@ ospf_iface_new_vlink(struct ospf_proto *p, struct ospf_iface_patt *ip) add_tail(&p->iface_list, NODE ifa); - ifa->hello_timer = tm2_new_init(ifa->pool, hello_timer_hook, ifa, ifa->helloint S, 0); + ifa->hello_timer = tm_new_init(ifa->pool, hello_timer_hook, ifa, ifa->helloint S, 0); ifa->flood_queue_size = ifa_flood_queue_size(ifa); ifa->flood_queue = mb_allocz(ifa->pool, ifa->flood_queue_size * sizeof(void *)); @@ -717,8 +717,8 @@ ospf_iface_change_timer(timer *tm, uint val) tm->recurrent = val S; - if (tm2_active(tm)) - tm2_start(tm, val S); + if (tm_active(tm)) + tm_start(tm, val S); } static inline void @@ -801,8 +801,8 @@ ospf_iface_reconfigure(struct ospf_iface *ifa, struct ospf_iface_patt *new) ifname, ifa->waitint, new->waitint); ifa->waitint = new->waitint; - if (ifa->wait_timer && tm2_active(ifa->wait_timer)) - tm2_start(ifa->wait_timer, ifa->waitint S); + if (ifa->wait_timer && tm_active(ifa->wait_timer)) + tm_start(ifa->wait_timer, ifa->waitint S); } /* DEAD TIMER */ diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 18811392..a98c9098 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -115,7 +115,7 @@ ospf_lsa_lsrq_down(struct top_hash_entry *req, struct ospf_neighbor *n) if (EMPTY_SLIST(n->lsrql)) { - tm2_stop(n->lsrq_timer); + tm_stop(n->lsrq_timer); if (n->state == NEIGHBOR_LOADING) ospf_neigh_sm(n, INM_LOADDONE); @@ -136,8 +136,8 @@ ospf_lsa_lsrt_up(struct top_hash_entry *en, struct ospf_neighbor *n) ret->lsa = en->lsa; ret->lsa_body = LSA_BODY_DUMMY; - if (!tm2_active(n->lsrt_timer)) - tm2_start(n->lsrt_timer, n->ifa->rxmtint S); + if (!tm_active(n->lsrt_timer)) + tm_start(n->lsrt_timer, n->ifa->rxmtint S); } void @@ -150,7 +150,7 @@ ospf_lsa_lsrt_down_(struct top_hash_entry *en, struct ospf_neighbor *n, struct t ospf_hash_delete(n->lsrth, ret); if (EMPTY_SLIST(n->lsrtl)) - tm2_stop(n->lsrt_timer); + tm_stop(n->lsrt_timer); } static inline int @@ -175,8 +175,8 @@ ospf_add_flushed_to_lsrt(struct ospf_proto *p, struct ospf_neighbor *n) ospf_lsa_lsrt_up(en, n); /* If we found any flushed LSA, we send them ASAP */ - if (tm2_active(n->lsrt_timer)) - tm2_start(n->lsrt_timer, 0); + if (tm_active(n->lsrt_timer)) + tm_start(n->lsrt_timer, 0); } static int ospf_flood_lsupd(struct ospf_proto *p, struct top_hash_entry **lsa_list, uint lsa_count, uint lsa_min_count, struct ospf_iface *ifa); @@ -700,7 +700,7 @@ ospf_receive_lsupd(struct ospf_packet *pkt, struct ospf_iface *ifa, if (!EMPTY_SLIST(n->lsrql) && (n->lsrqi == SHEAD(n->lsrql))) { ospf_send_lsreq(p, n); - tm2_start(n->lsrq_timer, n->ifa->rxmtint S); + tm_start(n->lsrq_timer, n->ifa->rxmtint S); } return; diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 12eb9e84..f2d3505e 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -66,10 +66,10 @@ reset_lists(struct ospf_proto *p, struct ospf_neighbor *n) ospf_top_free(n->lsrth); ospf_reset_lsack_queue(n); - tm2_stop(n->dbdes_timer); - tm2_stop(n->lsrq_timer); - tm2_stop(n->lsrt_timer); - tm2_stop(n->ackd_timer); + tm_stop(n->dbdes_timer); + tm_stop(n->lsrq_timer); + tm_stop(n->lsrt_timer); + tm_stop(n->ackd_timer); init_lists(p, n); } @@ -94,11 +94,11 @@ ospf_neighbor_new(struct ospf_iface *ifa) init_list(&n->ackl[ACKL_DIRECT]); init_list(&n->ackl[ACKL_DELAY]); - n->inactim = tm2_new_init(pool, inactivity_timer_hook, n, 0, 0); - n->dbdes_timer = tm2_new_init(pool, dbdes_timer_hook, n, ifa->rxmtint S, 0); - n->lsrq_timer = tm2_new_init(pool, lsrq_timer_hook, n, ifa->rxmtint S, 0); - n->lsrt_timer = tm2_new_init(pool, lsrt_timer_hook, n, ifa->rxmtint S, 0); - n->ackd_timer = tm2_new_init(pool, ackd_timer_hook, n, ifa->rxmtint S / 2, 0); + n->inactim = tm_new_init(pool, inactivity_timer_hook, n, 0, 0); + n->dbdes_timer = tm_new_init(pool, dbdes_timer_hook, n, ifa->rxmtint S, 0); + n->lsrq_timer = tm_new_init(pool, lsrq_timer_hook, n, ifa->rxmtint S, 0); + n->lsrt_timer = tm_new_init(pool, lsrt_timer_hook, n, ifa->rxmtint S, 0); + n->ackd_timer = tm_new_init(pool, ackd_timer_hook, n, ifa->rxmtint S / 2, 0); return (n); } @@ -185,8 +185,8 @@ ospf_neigh_chstate(struct ospf_neighbor *n, u8 state) n->dds++; n->myimms = DBDES_IMMS; - tm2_start(n->dbdes_timer, 0); - tm2_start(n->ackd_timer, ifa->rxmtint S / 2); + tm_start(n->dbdes_timer, 0); + tm_start(n->ackd_timer, ifa->rxmtint S / 2); } if (state > NEIGHBOR_EXSTART) @@ -231,7 +231,7 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event) ospf_neigh_chstate(n, NEIGHBOR_INIT); /* Restart inactivity timer */ - tm2_start(n->inactim, n->ifa->deadint S); + tm_start(n->inactim, n->ifa->deadint S); break; case INM_2WAYREC: @@ -664,5 +664,5 @@ ospf_sh_neigh_info(struct ospf_neighbor *n) cli_msg(-1013, "%-1R\t%3u\t%s/%s\t%7t\t%-10s %-1I", n->rid, n->priority, ospf_ns_names[n->state], pos, - tm2_remains(n->inactim), ifa->ifname, n->ip); + tm_remains(n->inactim), ifa->ifname, n->ip); } diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 13f3845b..3ebebdaa 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -241,8 +241,8 @@ ospf_start(struct proto *P) p->asbr = c->asbr; p->ecmp = c->ecmp; p->tick = c->tick; - p->disp_timer = tm2_new_init(P->pool, ospf_disp, p, p->tick S, 0); - tm2_start(p->disp_timer, 100 MS); + p->disp_timer = tm_new_init(P->pool, ospf_disp, p, p->tick S, 0); + tm_start(p->disp_timer, 100 MS); p->lsab_size = 256; p->lsab_used = 0; p->lsab = mb_alloc(P->pool, p->lsab_size); @@ -677,7 +677,7 @@ ospf_reconfigure(struct proto *P, struct proto_config *CF) p->ecmp = new->ecmp; p->tick = new->tick; p->disp_timer->recurrent = p->tick S; - tm2_start(p->disp_timer, 100 MS); + tm_start(p->disp_timer, 100 MS); /* Mark all areas and ifaces */ WALK_LIST(oa, p->area_list) diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h index d4571bf6..54eeb74c 100644 --- a/proto/ospf/ospf.h +++ b/proto/ospf/ospf.h @@ -18,7 +18,7 @@ #include "lib/lists.h" #include "lib/slists.h" #include "lib/socket.h" -#include "sysdep/unix/timer.h" +#include "lib/timer.h" #include "lib/resource.h" #include "nest/protocol.h" #include "nest/iface.h" diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index 36bf0387..c0fe218a 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -1321,7 +1321,7 @@ ospf_rt_abr2(struct ospf_proto *p) if (translate && (oa->translate != TRANS_ON)) { if (oa->translate == TRANS_WAIT) - tm2_stop(oa->translator_timer); + tm_stop(oa->translator_timer); oa->translate = TRANS_ON; } @@ -1329,10 +1329,10 @@ ospf_rt_abr2(struct ospf_proto *p) if (!translate && (oa->translate == TRANS_ON)) { if (oa->translator_timer == NULL) - oa->translator_timer = tm2_new_init(p->p.pool, translator_timer_hook, oa, 0, 0); + oa->translator_timer = tm_new_init(p->p.pool, translator_timer_hook, oa, 0, 0); /* Schedule the end of translation */ - tm2_start(oa->translator_timer, oa->ac->transint S); + tm_start(oa->translator_timer, oa->ac->transint S); oa->translate = TRANS_WAIT; } } |