]> git.puffer.fish Git - mirror/frr.git/commitdiff
rip*,ospf*,pimd: Remove use of the EVENT_OFF macro
authorMark Stapp <mjs@cisco.com>
Tue, 29 Apr 2025 18:03:41 +0000 (14:03 -0400)
committerMark Stapp <mjs@cisco.com>
Tue, 29 Apr 2025 18:45:29 +0000 (14:45 -0400)
Replace use of the macro with the cancel function.

Signed-off-by: Mark Stapp <mjs@cisco.com>
60 files changed:
ospf6d/ospf6_area.c
ospf6d/ospf6_asbr.c
ospf6d/ospf6_bfd.c
ospf6d/ospf6_flood.c
ospf6d/ospf6_gr.c
ospf6d/ospf6_gr_helper.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_intra.h
ospf6d/ospf6_lsa.c
ospf6d/ospf6_lsdb.c
ospf6d/ospf6_main.c
ospf6d/ospf6_message.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_nssa.c
ospf6d/ospf6_spf.c
ospf6d/ospf6_top.c
ospfd/ospf_abr.c
ospfd/ospf_apiserver.c
ospfd/ospf_asbr.c
ospfd/ospf_flood.c
ospfd/ospf_gr.c
ospfd/ospf_gr_helper.c
ospfd/ospf_interface.c
ospfd/ospf_ism.c
ospfd/ospf_ldp_sync.c
ospfd/ospf_lsa.c
ospfd/ospf_main.c
ospfd/ospf_neighbor.c
ospfd/ospf_nsm.c
ospfd/ospf_opaque.c
ospfd/ospf_packet.c
ospfd/ospf_sr.c
ospfd/ospf_vty.c
ospfd/ospfd.c
pimd/pim6_mld.c
pimd/pim_assert.c
pimd/pim_bsm.c
pimd/pim_bsr_rpdb.c
pimd/pim_ifchannel.c
pimd/pim_igmp.c
pimd/pim_igmpv3.c
pimd/pim_join.c
pimd/pim_mroute.c
pimd/pim_msdp.c
pimd/pim_neighbor.c
pimd/pim_oil.c
pimd/pim_pim.c
pimd/pim_register.c
pimd/pim_ssmpingd.c
pimd/pim_upstream.c
pimd/pim_vxlan.c
pimd/pim_zlookup.c
ripd/rip_interface.c
ripd/rip_nb_rpcs.c
ripd/rip_peer.c
ripd/ripd.c
ripngd/ripng_interface.c
ripngd/ripng_nb_rpcs.c
ripngd/ripng_peer.c
ripngd/ripngd.c

index f512e60ef2ff34d666f00d545e12b572c77ae3a3..bbe9de60fcf1f92498f8204142beb023166eb4a9 100644 (file)
@@ -435,8 +435,8 @@ void ospf6_area_disable(struct ospf6_area *oa)
        ospf6_spf_table_finish(oa->spf_table);
        ospf6_route_remove_all(oa->route_table);
 
-       EVENT_OFF(oa->thread_router_lsa);
-       EVENT_OFF(oa->thread_intra_prefix_lsa);
+       event_cancel(&oa->thread_router_lsa);
+       event_cancel(&oa->thread_intra_prefix_lsa);
 }
 
 
index df2758b081a45781c84def69df1df127719616d4..6e467826464537631d7b2ebc0fb48e5b309c44ba 100644 (file)
@@ -3117,7 +3117,7 @@ static void ospf6_aggr_handle_external_info(void *data)
                        if (IS_OSPF6_DEBUG_AGGR)
                                zlog_debug("%s: LSA found, refresh it",
                                           __func__);
-                       EVENT_OFF(lsa->refresh);
+                       event_cancel(&lsa->refresh);
                        event_add_event(master, ospf6_lsa_refresh, lsa, 0,
                                        &lsa->refresh);
                        return;
@@ -3319,7 +3319,7 @@ static void ospf6_handle_exnl_rt_after_aggr_del(struct ospf6 *ospf6,
        lsa = ospf6_find_external_lsa(ospf6, &rt->prefix);
 
        if (lsa) {
-               EVENT_OFF(lsa->refresh);
+               event_cancel(&lsa->refresh);
                event_add_event(master, ospf6_lsa_refresh, lsa, 0,
                                &lsa->refresh);
        } else {
@@ -3468,7 +3468,7 @@ ospf6_start_asbr_summary_delay_timer(struct ospf6 *ospf6,
                        if (IS_OSPF6_DEBUG_AGGR)
                                zlog_debug("%s, Restarting Aggregator delay timer.",
                                                        __func__);
-                       EVENT_OFF(ospf6->t_external_aggr);
+                       event_cancel(&ospf6->t_external_aggr);
                }
        }
 
index 0b00558572b4bf09036bb7fb74bd68658e7a587b..bc726c75f6b7ae49dd07087a9aac7374e193223f 100644 (file)
@@ -103,7 +103,7 @@ static void ospf6_bfd_callback(struct bfd_session_params *bsp,
 
        if (bss->state == BFD_STATUS_DOWN
            && bss->previous_state == BFD_STATUS_UP) {
-               EVENT_OFF(on->inactivity_timer);
+               event_cancel(&on->inactivity_timer);
                event_add_event(master, inactivity_timer, on, 0, NULL);
        }
 }
index 261eed30ea4d3c0c4bf756a3d185b7eb4354525a..738c5a414abba54619025ef00f3a92ca72f6acc1 100644 (file)
@@ -104,7 +104,7 @@ void ospf6_lsa_originate(struct ospf6 *ospf6, struct ospf6_lsa *lsa)
        lsdb_self = ospf6_get_scoped_lsdb_self(lsa);
        ospf6_lsdb_add(ospf6_lsa_copy(lsa), lsdb_self);
 
-       EVENT_OFF(lsa->refresh);
+       event_cancel(&lsa->refresh);
        event_add_timer(master, ospf6_lsa_refresh, lsa, OSPF_LS_REFRESH_TIME,
                        &lsa->refresh);
 
@@ -169,8 +169,8 @@ void ospf6_lsa_purge(struct ospf6_lsa *lsa)
        self = ospf6_lsdb_lookup(lsa->header->type, lsa->header->id,
                                 lsa->header->adv_router, lsdb_self);
        if (self) {
-               EVENT_OFF(self->expire);
-               EVENT_OFF(self->refresh);
+               event_cancel(&self->expire);
+               event_cancel(&self->refresh);
                ospf6_lsdb_remove(self, lsdb_self);
        }
 
@@ -251,8 +251,8 @@ void ospf6_install_lsa(struct ospf6_lsa *lsa)
                                           lsa->name);
                        lsa->external_lsa_id = old->external_lsa_id;
                }
-               EVENT_OFF(old->expire);
-               EVENT_OFF(old->refresh);
+               event_cancel(&old->expire);
+               event_cancel(&old->refresh);
                ospf6_flood_clear(old);
        }
 
@@ -524,7 +524,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
        } else {
                /* reschedule retransmissions to all neighbors */
                for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) {
-                       EVENT_OFF(on->thread_send_lsupdate);
+                       event_cancel(&on->thread_send_lsupdate);
                        event_add_event(master, ospf6_lsupdate_send_neighbor,
                                        on, 0, &on->thread_send_lsupdate);
                }
index 27b8df0828c27784dd90ae3e6a839189c0de0ae6..a20b059908a471158d9c504d93ba48d8126923c8 100644 (file)
@@ -172,7 +172,7 @@ static void ospf6_gr_restart_exit(struct ospf6 *ospf6, const char *reason)
        ospf6->gr_info.finishing_restart = true;
        XFREE(MTYPE_TMP, ospf6->gr_info.exit_reason);
        ospf6->gr_info.exit_reason = XSTRDUP(MTYPE_TMP, reason);
-       EVENT_OFF(ospf6->gr_info.t_grace_period);
+       event_cancel(&ospf6->gr_info.t_grace_period);
 
        for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, onode, area)) {
                struct ospf6_interface *oi;
@@ -194,7 +194,7 @@ static void ospf6_gr_restart_exit(struct ospf6 *ospf6, const char *reason)
                        /* Disable hello delay. */
                        if (oi->gr.hello_delay.t_grace_send) {
                                oi->gr.hello_delay.elapsed_seconds = 0;
-                               EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+                               event_cancel(&oi->gr.hello_delay.t_grace_send);
                                event_add_event(master, ospf6_hello_send, oi, 0,
                                                &oi->thread_send_hello);
                        }
index da8b829cf1ddf3ce9590a841144d07d13c81645e..a08c598df06d5aa9c8e62fcd61bf88b35b06f369 100644 (file)
@@ -383,7 +383,7 @@ int ospf6_process_grace_lsa(struct ospf6 *ospf6, struct ospf6_lsa *lsa,
        }
 
        if (OSPF6_GR_IS_ACTIVE_HELPER(restarter)) {
-               EVENT_OFF(restarter->gr_helper_info.t_grace_timer);
+               event_cancel(&restarter->gr_helper_info.t_grace_timer);
 
                if (ospf6->ospf6_helper_cfg.active_restarter_cnt > 0)
                        ospf6->ospf6_helper_cfg.active_restarter_cnt--;
@@ -471,7 +471,7 @@ void ospf6_gr_helper_exit(struct ospf6_neighbor *nbr,
         * expiry, stop the grace timer.
         */
        if (reason != OSPF6_GR_HELPER_GRACE_TIMEOUT)
-               EVENT_OFF(nbr->gr_helper_info.t_grace_timer);
+               event_cancel(&nbr->gr_helper_info.t_grace_timer);
 
        if (ospf6->ospf6_helper_cfg.active_restarter_cnt <= 0) {
                zlog_err(
index 1022101eb397778eee94fab508fe4bbd0eb187f3..e79bc34983610a2e595bb9681612c9ca836fba74 100644 (file)
@@ -272,11 +272,11 @@ void ospf6_interface_delete(struct ospf6_interface *oi)
 
        list_delete(&oi->neighbor_list);
 
-       EVENT_OFF(oi->thread_send_hello);
-       EVENT_OFF(oi->thread_send_lsupdate);
-       EVENT_OFF(oi->thread_send_lsack);
-       EVENT_OFF(oi->thread_sso);
-       EVENT_OFF(oi->thread_wait_timer);
+       event_cancel(&oi->thread_send_hello);
+       event_cancel(&oi->thread_send_lsupdate);
+       event_cancel(&oi->thread_send_lsack);
+       event_cancel(&oi->thread_sso);
+       event_cancel(&oi->thread_wait_timer);
 
        ospf6_lsdb_remove_all(oi->lsdb);
        ospf6_lsdb_remove_all(oi->lsupdate_list);
@@ -326,19 +326,19 @@ void ospf6_interface_disable(struct ospf6_interface *oi)
        ospf6_lsdb_remove_all(oi->lsupdate_list);
        ospf6_lsdb_remove_all(oi->lsack_list);
 
-       EVENT_OFF(oi->thread_send_hello);
-       EVENT_OFF(oi->thread_send_lsupdate);
-       EVENT_OFF(oi->thread_send_lsack);
-       EVENT_OFF(oi->thread_sso);
+       event_cancel(&oi->thread_send_hello);
+       event_cancel(&oi->thread_send_lsupdate);
+       event_cancel(&oi->thread_send_lsack);
+       event_cancel(&oi->thread_sso);
 
-       EVENT_OFF(oi->thread_network_lsa);
-       EVENT_OFF(oi->thread_link_lsa);
-       EVENT_OFF(oi->thread_intra_prefix_lsa);
-       EVENT_OFF(oi->thread_as_extern_lsa);
-       EVENT_OFF(oi->thread_wait_timer);
+       event_cancel(&oi->thread_network_lsa);
+       event_cancel(&oi->thread_link_lsa);
+       event_cancel(&oi->thread_intra_prefix_lsa);
+       event_cancel(&oi->thread_as_extern_lsa);
+       event_cancel(&oi->thread_wait_timer);
 
        oi->gr.hello_delay.elapsed_seconds = 0;
-       EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+       event_cancel(&oi->gr.hello_delay.t_grace_send);
 }
 
 static struct in6_addr *
@@ -944,10 +944,10 @@ void interface_down(struct event *thread)
                           oi->interface->name);
 
        /* Stop Hellos */
-       EVENT_OFF(oi->thread_send_hello);
+       event_cancel(&oi->thread_send_hello);
 
        /* Stop trying to set socket options. */
-       EVENT_OFF(oi->thread_sso);
+       event_cancel(&oi->thread_sso);
 
        /* Cease the HELPER role for all the neighbours
         * of this interface.
@@ -1948,7 +1948,7 @@ DEFUN (ipv6_ospf6_ifmtu,
 
        /* re-establish adjacencies */
        for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) {
-               EVENT_OFF(on->inactivity_timer);
+               event_cancel(&on->inactivity_timer);
                event_add_event(master, inactivity_timer, on, 0, NULL);
        }
 
@@ -1994,7 +1994,7 @@ DEFUN (no_ipv6_ospf6_ifmtu,
 
        /* re-establish adjacencies */
        for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) {
-               EVENT_OFF(on->inactivity_timer);
+               event_cancel(&on->inactivity_timer);
                event_add_event(master, inactivity_timer, on, 0, NULL);
        }
 
@@ -2178,7 +2178,7 @@ DEFUN (ipv6_ospf6_hellointerval,
         * If the thread is scheduled, send the new hello now.
         */
        if (event_is_scheduled(oi->thread_send_hello)) {
-               EVENT_OFF(oi->thread_send_hello);
+               event_cancel(&oi->thread_send_hello);
 
                event_add_timer(master, ospf6_hello_send, oi, 0,
                                &oi->thread_send_hello);
@@ -2270,7 +2270,7 @@ DEFPY(no_ipv6_ospf6_gr_hdelay,
 
        oi->gr.hello_delay.interval = OSPF_HELLO_DELAY_DEFAULT;
        oi->gr.hello_delay.elapsed_seconds = 0;
-       EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+       event_cancel(&oi->gr.hello_delay.t_grace_send);
 
        return CMD_SUCCESS;
 }
@@ -2439,11 +2439,11 @@ DEFUN (ipv6_ospf6_passive,
        assert(oi);
 
        SET_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE);
-       EVENT_OFF(oi->thread_send_hello);
-       EVENT_OFF(oi->thread_sso);
+       event_cancel(&oi->thread_send_hello);
+       event_cancel(&oi->thread_sso);
 
        for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) {
-               EVENT_OFF(on->inactivity_timer);
+               event_cancel(&on->inactivity_timer);
                event_add_event(master, inactivity_timer, on, 0, NULL);
        }
 
@@ -2469,8 +2469,8 @@ DEFUN (no_ipv6_ospf6_passive,
        assert(oi);
 
        UNSET_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE);
-       EVENT_OFF(oi->thread_send_hello);
-       EVENT_OFF(oi->thread_sso);
+       event_cancel(&oi->thread_send_hello);
+       event_cancel(&oi->thread_sso);
 
        /* don't send hellos over loopback interface */
        if (!if_is_loopback(oi->interface))
index fafa6d1282cc6aa47a6982296bdf4a1e5f85950b..17074e22c1d39dff226679282ff442615abdabe6 100644 (file)
@@ -142,7 +142,7 @@ enum stub_router_mode {
 
 #define OSPF6_NETWORK_LSA_EXECUTE(oi)                                          \
        do {                                                                   \
-               EVENT_OFF((oi)->thread_network_lsa);                           \
+               event_cancel(&(oi)->thread_network_lsa);                           \
                event_execute(master, ospf6_network_lsa_originate, oi, 0,      \
                              NULL);                                           \
        } while (0)
@@ -156,7 +156,7 @@ enum stub_router_mode {
 
 #define OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(oi)                             \
        do {                                                                   \
-               EVENT_OFF((oi)->thread_intra_prefix_lsa);                      \
+               event_cancel(&(oi)->thread_intra_prefix_lsa);                      \
                event_execute(master,                                          \
                              ospf6_intra_prefix_lsa_originate_transit, oi,    \
                              0, NULL);                                        \
@@ -164,7 +164,7 @@ enum stub_router_mode {
 
 #define OSPF6_AS_EXTERN_LSA_EXECUTE(oi)                                        \
        do {                                                                   \
-               EVENT_OFF((oi)->thread_as_extern_lsa);                         \
+               event_cancel(&(oi)->thread_as_extern_lsa);                         \
                event_execute(master, ospf6_orig_as_external_lsa, oi, 0, NULL);\
        } while (0)
 
index 622e5f9e0f73f6f84294ba7abc74f39f18ab42aa..95ea51fd89734f31eb8c6592fc229af227ec8b4e 100644 (file)
@@ -379,8 +379,8 @@ void ospf6_lsa_premature_aging(struct ospf6_lsa *lsa)
        if (IS_OSPF6_DEBUG_LSA_TYPE(lsa->header->type))
                zlog_debug("LSA: Premature aging: %s", lsa->name);
 
-       EVENT_OFF(lsa->expire);
-       EVENT_OFF(lsa->refresh);
+       event_cancel(&lsa->expire);
+       event_cancel(&lsa->refresh);
 
        /*
         * We clear the LSA from the neighbor retx lists now because it
@@ -837,8 +837,8 @@ void ospf6_lsa_delete(struct ospf6_lsa *lsa)
        assert(lsa->lock == 0);
 
        /* cancel threads */
-       EVENT_OFF(lsa->expire);
-       EVENT_OFF(lsa->refresh);
+       event_cancel(&lsa->expire);
+       event_cancel(&lsa->refresh);
 
        /* do free */
        XFREE(MTYPE_OSPF6_LSA_HEADER, lsa->header);
index 3215d51a7a4745ae0ea3410b465b16dd6883f84b..59d1989e4b34837d227936124e330bef85f06c3d 100644 (file)
@@ -396,7 +396,7 @@ int ospf6_lsdb_maxage_remover(struct ospf6_lsdb *lsdb)
                                htonl(OSPF_MAX_SEQUENCE_NUMBER + 1);
                        ospf6_lsa_checksum(lsa->header);
 
-                       EVENT_OFF(lsa->refresh);
+                       event_cancel(&lsa->refresh);
                        event_execute(master, ospf6_lsa_refresh, lsa, 0, NULL);
                } else {
                        if (IS_OSPF6_DEBUG_LSA_TYPE(lsa->header->type))
index ae61e8b35fde32fb1c8e513057229d495b080046..0696dfab2450b90f2bf9bc24937c087e88cd48a4 100644 (file)
@@ -214,7 +214,7 @@ static void ospf6_config_start(void)
 {
        if (IS_OSPF6_DEBUG_EVENT)
                zlog_debug("ospf6d config start received");
-       EVENT_OFF(t_ospf6_cfg);
+       event_cancel(&t_ospf6_cfg);
        event_add_timer(master, ospf6_config_finish, NULL,
                        OSPF6_PRE_CONFIG_MAX_WAIT_SECONDS, &t_ospf6_cfg);
 }
@@ -224,7 +224,7 @@ static void ospf6_config_end(void)
        if (IS_OSPF6_DEBUG_EVENT)
                zlog_debug("ospf6d config end received");
 
-       EVENT_OFF(t_ospf6_cfg);
+       event_cancel(&t_ospf6_cfg);
 }
 
 /* Main routine of ospf6d. Treatment of argument and starting ospf finite
index 33d15e72438955052596db5ad51ab6086e930318..f92053aebd05a946428946d4590b9e8a12a7a5cc 100644 (file)
@@ -822,7 +822,7 @@ static void ospf6_dbdesc_recv_master(struct ospf6_header *oh,
                event_add_event(master, ospf6_lsreq_send, on, 0,
                                &on->thread_send_lsreq);
 
-       EVENT_OFF(on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_dbdesc);
 
        /* More bit check */
        if (!CHECK_FLAG(dbdesc->bits, OSPF6_DBDESC_MBIT)
@@ -907,7 +907,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh,
                        if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV_HDR))
                                zlog_debug(
                                        "Duplicated dbdesc causes retransmit");
-                       EVENT_OFF(on->thread_send_dbdesc);
+                       event_cancel(&on->thread_send_dbdesc);
                        event_add_event(master, ospf6_dbdesc_send, on, 0,
                                        &on->thread_send_dbdesc);
                        return;
@@ -960,7 +960,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh,
                        if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV_HDR))
                                zlog_debug(
                                        "Duplicated dbdesc causes retransmit");
-                       EVENT_OFF(on->thread_send_dbdesc);
+                       event_cancel(&on->thread_send_dbdesc);
                        event_add_event(master, ospf6_dbdesc_send, on, 0,
                                        &on->thread_send_dbdesc);
                        return;
@@ -1034,7 +1034,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh,
                event_add_event(master, ospf6_lsreq_send, on, 0,
                                &on->thread_send_lsreq);
 
-       EVENT_OFF(on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_dbdesc);
        event_add_event(master, ospf6_dbdesc_send_newone, on, 0,
                        &on->thread_send_dbdesc);
 
@@ -1168,7 +1168,7 @@ static void ospf6_lsreq_recv(struct in6_addr *src, struct in6_addr *dst,
        assert(p == OSPF6_MESSAGE_END(oh));
 
        /* schedule send lsupdate */
-       EVENT_OFF(on->thread_send_lsupdate);
+       event_cancel(&on->thread_send_lsupdate);
        event_add_event(master, ospf6_lsupdate_send_neighbor, on, 0,
                        &on->thread_send_lsupdate);
 }
@@ -3000,7 +3000,7 @@ static uint16_t ospf6_make_lsack_interface(struct ospf6_interface *oi,
                    > ospf6_packet_max(oi)) {
                        /* if we run out of packet size/space here,
                           better to try again soon. */
-                       EVENT_OFF(oi->thread_send_lsack);
+                       event_cancel(&oi->thread_send_lsack);
                        event_add_event(master, ospf6_lsack_send_interface, oi,
                                        0, &oi->thread_send_lsack);
 
index acf15da4c3be7a8bd1cb5f931bd1b5fc83eaa8d7..af5bf34c84efc562a01589db2d181899f55a803f 100644 (file)
@@ -178,19 +178,19 @@ void ospf6_neighbor_delete(struct ospf6_neighbor *on)
        ospf6_lsdb_delete(on->lsupdate_list);
        ospf6_lsdb_delete(on->lsack_list);
 
-       EVENT_OFF(on->inactivity_timer);
+       event_cancel(&on->inactivity_timer);
 
-       EVENT_OFF(on->last_dbdesc_release_timer);
+       event_cancel(&on->last_dbdesc_release_timer);
 
-       EVENT_OFF(on->thread_send_dbdesc);
-       EVENT_OFF(on->thread_send_lsreq);
-       EVENT_OFF(on->thread_send_lsupdate);
-       EVENT_OFF(on->thread_send_lsack);
-       EVENT_OFF(on->thread_exchange_done);
-       EVENT_OFF(on->thread_adj_ok);
-       EVENT_OFF(on->event_loading_done);
+       event_cancel(&on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_lsreq);
+       event_cancel(&on->thread_send_lsupdate);
+       event_cancel(&on->thread_send_lsack);
+       event_cancel(&on->thread_exchange_done);
+       event_cancel(&on->thread_adj_ok);
+       event_cancel(&on->event_loading_done);
 
-       EVENT_OFF(on->gr_helper_info.t_grace_timer);
+       event_cancel(&on->gr_helper_info.t_grace_timer);
 
        bfd_sess_free(&on->bfd_session);
        XFREE(MTYPE_OSPF6_NEIGHBOR, on);
@@ -312,7 +312,7 @@ void hello_received(struct event *thread)
                zlog_debug("Neighbor Event %s: *HelloReceived*", on->name);
 
        /* reset Inactivity Timer */
-       EVENT_OFF(on->inactivity_timer);
+       event_cancel(&on->inactivity_timer);
        event_add_timer(master, inactivity_timer, on,
                        on->ospf6_if->dead_interval, &on->inactivity_timer);
 
@@ -348,7 +348,7 @@ void twoway_received(struct event *thread)
        SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT);
        SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT);
 
-       EVENT_OFF(on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_dbdesc);
        event_add_event(master, ospf6_dbdesc_send, on, 0,
                        &on->thread_send_dbdesc);
 }
@@ -423,12 +423,12 @@ void exchange_done(struct event *thread)
        if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT))
                zlog_debug("Neighbor Event %s: *ExchangeDone*", on->name);
 
-       EVENT_OFF(on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_dbdesc);
        ospf6_lsdb_remove_all(on->dbdesc_list);
 
        /* RFC 2328 (10.8): Release the last dbdesc after dead_interval */
        if (!CHECK_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MSBIT)) {
-               EVENT_OFF(on->last_dbdesc_release_timer);
+               event_cancel(&on->last_dbdesc_release_timer);
                event_add_timer(master, ospf6_neighbor_last_dbdesc_release, on,
                                on->ospf6_if->dead_interval,
                                &on->last_dbdesc_release_timer);
@@ -459,7 +459,7 @@ void ospf6_check_nbr_loading(struct ospf6_neighbor *on)
                        event_add_event(master, loading_done, on, 0,
                                        &on->event_loading_done);
                else if (on->last_ls_req == NULL) {
-                       EVENT_OFF(on->thread_send_lsreq);
+                       event_cancel(&on->thread_send_lsreq);
                        event_add_event(master, ospf6_lsreq_send, on, 0,
                                        &on->thread_send_lsreq);
                }
@@ -502,7 +502,7 @@ void adj_ok(struct event *thread)
                SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT);
                SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT);
 
-               EVENT_OFF(on->thread_send_dbdesc);
+               event_cancel(&on->thread_send_dbdesc);
                event_add_event(master, ospf6_dbdesc_send, on, 0,
                                &on->thread_send_dbdesc);
 
@@ -534,7 +534,7 @@ void seqnumber_mismatch(struct event *thread)
 
        ospf6_neighbor_clear_ls_lists(on);
 
-       EVENT_OFF(on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_dbdesc);
        on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */
 
        event_add_event(master, ospf6_dbdesc_send, on, 0,
@@ -562,7 +562,7 @@ void bad_lsreq(struct event *thread)
 
        ospf6_neighbor_clear_ls_lists(on);
 
-       EVENT_OFF(on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_dbdesc);
        on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */
 
        event_add_event(master, ospf6_dbdesc_send, on, 0,
@@ -588,12 +588,12 @@ void oneway_received(struct event *thread)
 
        ospf6_neighbor_clear_ls_lists(on);
 
-       EVENT_OFF(on->thread_send_dbdesc);
-       EVENT_OFF(on->thread_send_lsreq);
-       EVENT_OFF(on->thread_send_lsupdate);
-       EVENT_OFF(on->thread_send_lsack);
-       EVENT_OFF(on->thread_exchange_done);
-       EVENT_OFF(on->thread_adj_ok);
+       event_cancel(&on->thread_send_dbdesc);
+       event_cancel(&on->thread_send_lsreq);
+       event_cancel(&on->thread_send_lsupdate);
+       event_cancel(&on->thread_send_lsack);
+       event_cancel(&on->thread_exchange_done);
+       event_cancel(&on->thread_adj_ok);
 }
 
 void inactivity_timer(struct event *thread)
@@ -681,7 +681,7 @@ ospf6_if_p2xp_get(struct ospf6_interface *oi, const struct in6_addr *addr)
 
 static void ospf6_if_p2xp_destroy(struct ospf6_if_p2xp_neighcfg *p2xp_cfg)
 {
-       EVENT_OFF(p2xp_cfg->t_unicast_hello);
+       event_cancel(&p2xp_cfg->t_unicast_hello);
        ospf6_if_p2xp_neighcfgs_del(&p2xp_cfg->ospf6_if->p2xp_neighs, p2xp_cfg);
 
        XFREE(MTYPE_OSPF6_NEIGHBOR_P2XP_CFG, p2xp_cfg);
@@ -798,7 +798,7 @@ static void p2xp_unicast_hello_sched(struct ospf6_if_p2xp_neighcfg *p2xp_cfg)
            (p2xp_cfg->ospf6_if->state != OSPF6_INTERFACE_POINTTOMULTIPOINT &&
             p2xp_cfg->ospf6_if->state != OSPF6_INTERFACE_POINTTOPOINT))
                /* state check covers DOWN state too */
-               EVENT_OFF(p2xp_cfg->t_unicast_hello);
+               event_cancel(&p2xp_cfg->t_unicast_hello);
        else
                event_add_timer(master, p2xp_unicast_hello_send, p2xp_cfg,
                                p2xp_cfg->poll_interval,
index 8a5de468c9310cb316a2a425bc5a113c5f5d51b8..96908b6644db4b08aac8c07d3e3fb82c27c87023 100644 (file)
@@ -1079,7 +1079,7 @@ static void ospf6_ase_lsa_refresh(struct ospf6 *o)
                                        route->path.origin.id, o->router_id,
                                        o->lsdb);
                if (old) {
-                       EVENT_OFF(old->refresh);
+                       event_cancel(&old->refresh);
                        event_add_event(master, ospf6_lsa_refresh, old, 0,
                                        &old->refresh);
                } else {
@@ -1154,7 +1154,7 @@ void ospf6_area_nssa_update(struct ospf6_area *area)
                                                   lsa)) {
                                if (IS_OSPF6_DEBUG_NSSA)
                                        ospf6_lsa_header_print(lsa);
-                               EVENT_OFF(lsa->refresh);
+                               event_cancel(&lsa->refresh);
                                event_add_event(master, ospf6_lsa_refresh, lsa,
                                                0, &lsa->refresh);
                        }
index 5f2c5a6c470c8d9ad8dd3d4adcbb5167c8678867..08d72c0c60f889211181eff865cad49f17161bab 100644 (file)
@@ -722,7 +722,7 @@ void ospf6_spf_schedule(struct ospf6 *ospf6, unsigned int reason)
        if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF(TIME))
                zlog_debug("SPF: Rescheduling in %ld msec", delay);
 
-       EVENT_OFF(ospf6->t_spf_calc);
+       event_cancel(&ospf6->t_spf_calc);
        event_add_timer_msec(master, ospf6_spf_calculation_thread, ospf6, delay,
                             &ospf6->t_spf_calc);
 }
index 9755cc44ccc70a8fe3aa887dde03c52e46edf8fd..8cd2512d1aeb06366f8ea488303281c1c70c5d3f 100644 (file)
@@ -554,15 +554,15 @@ static void ospf6_disable(struct ospf6 *o)
                ospf6_route_remove_all(o->route_table);
                ospf6_route_remove_all(o->brouter_table);
 
-               EVENT_OFF(o->maxage_remover);
-               EVENT_OFF(o->t_spf_calc);
-               EVENT_OFF(o->t_ase_calc);
-               EVENT_OFF(o->t_distribute_update);
-               EVENT_OFF(o->t_ospf6_receive);
-               EVENT_OFF(o->t_external_aggr);
-               EVENT_OFF(o->gr_info.t_grace_period);
-               EVENT_OFF(o->t_write);
-               EVENT_OFF(o->t_abr_task);
+               event_cancel(&o->maxage_remover);
+               event_cancel(&o->t_spf_calc);
+               event_cancel(&o->t_ase_calc);
+               event_cancel(&o->t_distribute_update);
+               event_cancel(&o->t_ospf6_receive);
+               event_cancel(&o->t_external_aggr);
+               event_cancel(&o->gr_info.t_grace_period);
+               event_cancel(&o->t_write);
+               event_cancel(&o->t_abr_task);
        }
 }
 
index eed1bfcb30cb146108caf3ca9e8519aa3c71b429..cecdb1deafb2cff01c86143240c1e59d3e8191ef 100644 (file)
@@ -1739,7 +1739,7 @@ static void ospf_abr_announce_non_dna_routers(struct event *thread)
        struct listnode *node;
        struct ospf *ospf = EVENT_ARG(thread);
 
-       EVENT_OFF(ospf->t_abr_fr);
+       event_cancel(&ospf->t_abr_fr);
 
        if (!IS_OSPF_ABR(ospf))
                return;
index 6582db5390e0cd9be538c09476540ceb03d27d76..0434b67bfcb4bd6ff2960a5cd68f7e4fd1f8109e 100644 (file)
@@ -310,12 +310,12 @@ void ospf_apiserver_free(struct ospf_apiserver *apiserv)
        struct listnode *node;
 
        /* Cancel read and write threads. */
-       EVENT_OFF(apiserv->t_sync_read);
+       event_cancel(&apiserv->t_sync_read);
 #ifdef USE_ASYNC_READ
-       EVENT_OFF(apiserv->t_async_read);
+       event_cancel(&apiserv->t_async_read);
 #endif /* USE_ASYNC_READ */
-       EVENT_OFF(apiserv->t_sync_write);
-       EVENT_OFF(apiserv->t_async_write);
+       event_cancel(&apiserv->t_sync_write);
+       event_cancel(&apiserv->t_async_write);
 
        /* Unregister all opaque types that application registered
           and flush opaque LSAs if still in LSDB. */
index 978a6fcc13e8f5cecd1bcc7072760d8e61be8772..c21c62cfca184926110dff1285c8fe9d21f5d08f 100644 (file)
@@ -1157,7 +1157,7 @@ static void ospf_external_aggr_timer(struct ospf *ospf,
                                zlog_debug(
                                        "%s, Restarting Aggregator delay timer.",
                                        __func__);
-                       EVENT_OFF(ospf->t_external_aggr);
+                       event_cancel(&ospf->t_external_aggr);
                }
        }
 
index 6184d1352cbcbfe8541fc5df8705b6bdca02f51f..6cb3d5ff4ae7507dcc78dd2a3fe45d8b4a6d90e2 100644 (file)
@@ -1237,7 +1237,7 @@ void ospf_ls_retransmit_set_timer(struct ospf_neighbor *nbr)
        struct ospf_lsa_list_entry *ls_rxmt_list_entry;
 
        if (nbr->t_ls_rxmt)
-               EVENT_OFF(nbr->t_ls_rxmt);
+               event_cancel(&nbr->t_ls_rxmt);
 
        ls_rxmt_list_entry = ospf_lsa_list_first(&nbr->ls_rxmt_list);
        if (ls_rxmt_list_entry) {
index 0a4d579fc97603e1648a6fda88b1e7ce45b7fc09..6ad3e708e93ca36098903982c3bedfeed77d8632 100644 (file)
@@ -225,7 +225,7 @@ static void ospf_gr_restart_exit(struct ospf *ospf, const char *reason)
                zlog_debug("GR: exiting graceful restart: %s", reason);
 
        ospf->gr_info.restart_in_progress = false;
-       EVENT_OFF(ospf->gr_info.t_grace_period);
+       event_cancel(&ospf->gr_info.t_grace_period);
 
        for (ALL_LIST_ELEMENTS_RO(ospf->areas, onode, area)) {
                struct ospf_interface *oi;
@@ -241,7 +241,7 @@ static void ospf_gr_restart_exit(struct ospf *ospf, const char *reason)
                        /* Disable hello delay. */
                        if (oi->gr.hello_delay.t_grace_send) {
                                oi->gr.hello_delay.elapsed_seconds = 0;
-                               EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+                               event_cancel(&oi->gr.hello_delay.t_grace_send);
                                OSPF_ISM_TIMER_MSEC_ON(oi->t_hello,
                                                       ospf_hello_timer, 1);
                        }
index b97b6802b2feb7b459e17e477bc99965b054e2cf..f66398db05a01b3ad52621f5d886608ce47ed6db 100644 (file)
@@ -500,7 +500,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
 
        if (OSPF_GR_IS_ACTIVE_HELPER(restarter)) {
                if (restarter->gr_helper_info.t_grace_timer)
-                       EVENT_OFF(restarter->gr_helper_info.t_grace_timer);
+                       event_cancel(&restarter->gr_helper_info.t_grace_timer);
 
                if (ospf->active_restarter_cnt > 0)
                        ospf->active_restarter_cnt--;
@@ -699,7 +699,7 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr,
         * expiry, stop the grace timer.
         */
        if (reason != OSPF_GR_HELPER_GRACE_TIMEOUT)
-               EVENT_OFF(nbr->gr_helper_info.t_grace_timer);
+               event_cancel(&nbr->gr_helper_info.t_grace_timer);
 
        /* check exit triggered due to successful completion
         * of graceful restart.
index c4210eb70c7ce9d19e7ca711b48a17ca18211a7f..2bbd6508190c48e9045585be63793524b19c0775 100644 (file)
@@ -336,7 +336,7 @@ void ospf_if_cleanup(struct ospf_interface *oi)
        /* oi->nbrs and oi->nbr_nbma should be deleted on InterfaceDown event */
        /* delete all static neighbors attached to this interface */
        for (ALL_LIST_ELEMENTS(oi->nbr_nbma, node, nnode, nbr_nbma)) {
-               EVENT_OFF(nbr_nbma->t_poll);
+               event_cancel(&nbr_nbma->t_poll);
 
                if (nbr_nbma->nbr) {
                        nbr_nbma->nbr->nbr_nbma = NULL;
@@ -526,7 +526,7 @@ void ospf_interface_fifo_flush(struct ospf_interface *oi)
        if (oi->on_write_q) {
                listnode_delete(ospf->oi_write_q, oi);
                if (list_isempty(ospf->oi_write_q))
-                       EVENT_OFF(ospf->t_write);
+                       event_cancel(&ospf->t_write);
                oi->on_write_q = 0;
        }
 }
@@ -1576,7 +1576,7 @@ void ospf_reset_hello_timer(struct interface *ifp, struct in_addr addr,
                        ospf_hello_send(oi);
 
                        /* Restart hello timer for this interface */
-                       EVENT_OFF(oi->t_hello);
+                       event_cancel(&oi->t_hello);
                        OSPF_HELLO_TIMER_ON(oi);
                }
 
@@ -1600,7 +1600,7 @@ void ospf_reset_hello_timer(struct interface *ifp, struct in_addr addr,
                ospf_hello_send(oi);
 
                /* Restart the hello timer. */
-               EVENT_OFF(oi->t_hello);
+               event_cancel(&oi->t_hello);
                OSPF_HELLO_TIMER_ON(oi);
        }
 }
index 377e7a6bcc202741860847cf9e789eb0484b2e38..f1e8fe311dd5c7beef4d0d36259dfbd5f5f0dbdc 100644 (file)
@@ -283,18 +283,18 @@ static void ism_timer_set(struct ospf_interface *oi)
                   interface parameters must be set to initial values, and
                   timers are
                   reset also. */
-               EVENT_OFF(oi->t_hello);
-               EVENT_OFF(oi->t_wait);
-               EVENT_OFF(oi->t_ls_ack_delayed);
-               EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+               event_cancel(&oi->t_hello);
+               event_cancel(&oi->t_wait);
+               event_cancel(&oi->t_ls_ack_delayed);
+               event_cancel(&oi->gr.hello_delay.t_grace_send);
                break;
        case ISM_Loopback:
                /* In this state, the interface may be looped back and will be
                   unavailable for regular data traffic. */
-               EVENT_OFF(oi->t_hello);
-               EVENT_OFF(oi->t_wait);
-               EVENT_OFF(oi->t_ls_ack_delayed);
-               EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+               event_cancel(&oi->t_hello);
+               event_cancel(&oi->t_wait);
+               event_cancel(&oi->t_ls_ack_delayed);
+               event_cancel(&oi->gr.hello_delay.t_grace_send);
                break;
        case ISM_Waiting:
                /* The router is trying to determine the identity of DRouter and
@@ -304,7 +304,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                OSPF_ISM_TIMER_MSEC_ON(oi->t_hello, ospf_hello_timer, 1);
                OSPF_ISM_TIMER_ON(oi->t_wait, ospf_wait_timer,
                                  OSPF_IF_PARAM(oi, v_wait));
-               EVENT_OFF(oi->t_ls_ack_delayed);
+               event_cancel(&oi->t_ls_ack_delayed);
                break;
        case ISM_PointToPoint:
                /* The interface connects to a physical Point-to-point network
@@ -313,7 +313,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                   neighboring router. Hello packets are also sent. */
                /* send first hello immediately */
                OSPF_ISM_TIMER_MSEC_ON(oi->t_hello, ospf_hello_timer, 1);
-               EVENT_OFF(oi->t_wait);
+               event_cancel(&oi->t_wait);
                break;
        case ISM_DROther:
                /* The network type of the interface is broadcast or NBMA
@@ -321,21 +321,21 @@ static void ism_timer_set(struct ospf_interface *oi)
                   and the router itself is neither Designated Router nor
                   Backup Designated Router. */
                OSPF_HELLO_TIMER_ON(oi);
-               EVENT_OFF(oi->t_wait);
+               event_cancel(&oi->t_wait);
                break;
        case ISM_Backup:
                /* The network type of the interface is broadcast os NBMA
                   network,
                   and the router is Backup Designated Router. */
                OSPF_HELLO_TIMER_ON(oi);
-               EVENT_OFF(oi->t_wait);
+               event_cancel(&oi->t_wait);
                break;
        case ISM_DR:
                /* The network type of the interface is broadcast or NBMA
                   network,
                   and the router is Designated Router. */
                OSPF_HELLO_TIMER_ON(oi);
-               EVENT_OFF(oi->t_wait);
+               event_cancel(&oi->t_wait);
                break;
        }
 }
index 99f81f566360113ec6c60178a8de4b7ef006e68b..8a5f3f009461254793039c90b2fd55856880ff38 100644 (file)
@@ -188,7 +188,7 @@ void ospf_ldp_sync_if_complete(struct interface *ifp)
        if (ldp_sync_info && ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED) {
                if (ldp_sync_info->state == LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP)
                        ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_UP;
-               EVENT_OFF(ldp_sync_info->t_holddown);
+               event_cancel(&ldp_sync_info->t_holddown);
                ospf_if_recalculate_output_cost(ifp);
        }
 }
@@ -239,7 +239,7 @@ void ospf_ldp_sync_ldp_fail(struct interface *ifp)
        if (ldp_sync_info &&
            ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED &&
            ldp_sync_info->state != LDP_IGP_SYNC_STATE_NOT_REQUIRED) {
-               EVENT_OFF(ldp_sync_info->t_holddown);
+               event_cancel(&ldp_sync_info->t_holddown);
                ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP;
                ospf_if_recalculate_output_cost(ifp);
        }
@@ -303,7 +303,7 @@ void ospf_ldp_sync_if_remove(struct interface *ifp, bool remove)
         */
        ols_debug("%s: Removed from if %s", __func__, ifp->name);
 
-       EVENT_OFF(ldp_sync_info->t_holddown);
+       event_cancel(&ldp_sync_info->t_holddown);
 
        ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
        ospf_if_recalculate_output_cost(ifp);
@@ -902,7 +902,7 @@ DEFPY (no_mpls_ldp_sync,
        UNSET_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG);
        ldp_sync_info->enabled = LDP_IGP_SYNC_DEFAULT;
        ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
-       EVENT_OFF(ldp_sync_info->t_holddown);
+       event_cancel(&ldp_sync_info->t_holddown);
        ospf_if_recalculate_output_cost(ifp);
 
        return CMD_SUCCESS;
index 15068ec8206468e76ed59a4a8f30f09121ee72d5..94d4139a21a0c0501d4d1b9d4a4557739a69892b 100644 (file)
@@ -3791,7 +3791,7 @@ void ospf_flush_self_originated_lsas_now(struct ospf *ospf)
         * without conflicting to other threads.
         */
        if (ospf->t_maxage != NULL) {
-               EVENT_OFF(ospf->t_maxage);
+               event_cancel(&ospf->t_maxage);
                event_execute(master, ospf_maxage_lsa_remover, ospf, 0, NULL);
        }
 
index 1c48d377856b8112f8cc9cea4048af27c8b42b37..083937dc8d4949de62550174b4f9e917f7ac0e10 100644 (file)
@@ -182,7 +182,7 @@ static void ospf_config_finish(struct event *t)
 
 static void ospf_config_start(void)
 {
-       EVENT_OFF(t_ospf_cfg);
+       event_cancel(&t_ospf_cfg);
        if (IS_DEBUG_OSPF_EVENT)
                zlog_debug("ospfd config start callback received.");
        event_add_timer(master, ospf_config_finish, NULL,
@@ -194,7 +194,7 @@ static void ospf_config_end(void)
        if (IS_DEBUG_OSPF_EVENT)
                zlog_debug("ospfd config end callback received.");
 
-       EVENT_OFF(t_ospf_cfg);
+       event_cancel(&t_ospf_cfg);
 }
 
 /* OSPFd main routine. */
index 2514fc0ab3b9b40d35f5072a2d84733bfa8de53b..f2be00f72fb56135cdf0e85f9d00b52c27feb571 100644 (file)
@@ -127,17 +127,17 @@ void ospf_nbr_free(struct ospf_neighbor *nbr)
        }
 
        /* Cancel all timers. */
-       EVENT_OFF(nbr->t_inactivity);
-       EVENT_OFF(nbr->t_db_desc);
-       EVENT_OFF(nbr->t_ls_req);
-       EVENT_OFF(nbr->t_ls_rxmt);
+       event_cancel(&nbr->t_inactivity);
+       event_cancel(&nbr->t_db_desc);
+       event_cancel(&nbr->t_ls_req);
+       event_cancel(&nbr->t_ls_rxmt);
 
        /* Cancel all events. */ /* Thread lookup cost would be negligible. */
        event_cancel_event(master, nbr);
 
        bfd_sess_free(&nbr->bfd_session);
 
-       EVENT_OFF(nbr->gr_helper_info.t_grace_timer);
+       event_cancel(&nbr->gr_helper_info.t_grace_timer);
 
        nbr->oi = NULL;
        XFREE(MTYPE_OSPF_NEIGHBOR, nbr);
@@ -443,7 +443,7 @@ static struct ospf_neighbor *ospf_nbr_add(struct ospf_interface *oi,
                                nbr->nbr_nbma = nbr_nbma;
 
                                if (nbr_nbma->t_poll)
-                                       EVENT_OFF(nbr_nbma->t_poll);
+                                       event_cancel(&nbr_nbma->t_poll);
 
                                nbr->state_change = nbr_nbma->state_change + 1;
                        }
index 079a1fa55ed38c4f3bdb664576155f9966b24776..7888e25c6dab2feb20fa38467acfe34da655c126 100644 (file)
@@ -105,30 +105,30 @@ static void nsm_timer_set(struct ospf_neighbor *nbr)
        switch (nbr->state) {
        case NSM_Deleted:
        case NSM_Down:
-               EVENT_OFF(nbr->t_inactivity);
-               EVENT_OFF(nbr->t_hello_reply);
+               event_cancel(&nbr->t_inactivity);
+               event_cancel(&nbr->t_hello_reply);
                fallthrough;
        case NSM_Attempt:
        case NSM_Init:
        case NSM_TwoWay:
-               EVENT_OFF(nbr->t_db_desc);
-               EVENT_OFF(nbr->t_ls_rxmt);
-               EVENT_OFF(nbr->t_ls_req);
+               event_cancel(&nbr->t_db_desc);
+               event_cancel(&nbr->t_ls_rxmt);
+               event_cancel(&nbr->t_ls_req);
                break;
        case NSM_ExStart:
                OSPF_NSM_TIMER_ON(nbr->t_db_desc, ospf_db_desc_timer,
                                  nbr->v_db_desc);
-               EVENT_OFF(nbr->t_ls_rxmt);
-               EVENT_OFF(nbr->t_ls_req);
+               event_cancel(&nbr->t_ls_rxmt);
+               event_cancel(&nbr->t_ls_req);
                break;
        case NSM_Exchange:
                if (!IS_SET_DD_MS(nbr->dd_flags))
-                       EVENT_OFF(nbr->t_db_desc);
+                       event_cancel(&nbr->t_db_desc);
                break;
        case NSM_Loading:
        case NSM_Full:
        default:
-               EVENT_OFF(nbr->t_db_desc);
+               event_cancel(&nbr->t_db_desc);
                break;
        }
 }
@@ -159,13 +159,13 @@ int nsm_should_adj(struct ospf_neighbor *nbr)
 static int nsm_hello_received(struct ospf_neighbor *nbr)
 {
        /* Start or Restart Inactivity Timer. */
-       EVENT_OFF(nbr->t_inactivity);
+       event_cancel(&nbr->t_inactivity);
 
        OSPF_NSM_TIMER_ON(nbr->t_inactivity, ospf_inactivity_timer,
                          nbr->v_inactivity);
 
        if (OSPF_IF_NON_BROADCAST(nbr->oi) && nbr->nbr_nbma != NULL)
-               EVENT_OFF(nbr->nbr_nbma->t_poll);
+               event_cancel(&nbr->nbr_nbma->t_poll);
 
        /* Send proactive ARP requests */
        if (nbr->state < NSM_Exchange)
@@ -177,9 +177,9 @@ static int nsm_hello_received(struct ospf_neighbor *nbr)
 static int nsm_start(struct ospf_neighbor *nbr)
 {
        if (nbr->nbr_nbma)
-               EVENT_OFF(nbr->nbr_nbma->t_poll);
+               event_cancel(&nbr->nbr_nbma->t_poll);
 
-       EVENT_OFF(nbr->t_inactivity);
+       event_cancel(&nbr->t_inactivity);
 
        OSPF_NSM_TIMER_ON(nbr->t_inactivity, ospf_inactivity_timer,
                          nbr->v_inactivity);
index 0634178ca7a4ddf982eee833f4f0f1fc9a3b00c6..ea85081500d976ed9032c1d380bbafa1b5b6ab3c 100644 (file)
@@ -142,7 +142,7 @@ int ospf_opaque_type9_lsa_init(struct ospf_interface *oi)
 
 void ospf_opaque_type9_lsa_term(struct ospf_interface *oi)
 {
-       EVENT_OFF(oi->t_opaque_lsa_self);
+       event_cancel(&oi->t_opaque_lsa_self);
        if (oi->opaque_lsa_self != NULL)
                list_delete(&oi->opaque_lsa_self);
        oi->opaque_lsa_self = NULL;
@@ -171,7 +171,7 @@ void ospf_opaque_type10_lsa_term(struct ospf_area *area)
        hook_unregister(ospf_lsa_delete, ospf_opaque_lsa_delete_hook);
        ospf_opaque_lsa_hooks_registered = false;
 
-       EVENT_OFF(area->t_opaque_lsa_self);
+       event_cancel(&area->t_opaque_lsa_self);
        if (area->opaque_lsa_self != NULL)
                list_delete(&area->opaque_lsa_self);
        return;
@@ -191,7 +191,7 @@ int ospf_opaque_type11_lsa_init(struct ospf *top)
 
 void ospf_opaque_type11_lsa_term(struct ospf *top)
 {
-       EVENT_OFF(top->t_opaque_lsa_self);
+       event_cancel(&top->t_opaque_lsa_self);
        if (top->opaque_lsa_self != NULL)
                list_delete(&top->opaque_lsa_self);
        return;
@@ -631,7 +631,7 @@ static void free_opaque_info_per_type(struct opaque_info_per_type *oipt,
                ospf_opaque_lsa_flush_schedule(lsa);
        }
 
-       EVENT_OFF(oipt->t_opaque_lsa_self);
+       event_cancel(&oipt->t_opaque_lsa_self);
        list_delete(&oipt->id_list);
        if (cleanup_owner) {
                /* Remove from its owner's self-originated LSA list. */
@@ -747,7 +747,7 @@ static void free_opaque_info_per_id(void *val)
 {
        struct opaque_info_per_id *oipi = (struct opaque_info_per_id *)val;
 
-       EVENT_OFF(oipi->t_opaque_lsa_self);
+       event_cancel(&oipi->t_opaque_lsa_self);
        if (oipi->lsa != NULL)
                ospf_lsa_unlock(&oipi->lsa);
        XFREE(MTYPE_OPAQUE_INFO_PER_ID, oipi);
index 13bf947994e20054e20da7bfaa147c3f5768bdc3..355808e091701da1ff8b3870551bd38f366489d1 100644 (file)
@@ -288,7 +288,7 @@ static void ospf_ls_req_timer(struct event *thread)
 
 void ospf_ls_req_event(struct ospf_neighbor *nbr)
 {
-       EVENT_OFF(nbr->t_ls_req);
+       event_cancel(&nbr->t_ls_req);
        event_add_event(master, ospf_ls_req_timer, nbr, 0, &nbr->t_ls_req);
 }
 
@@ -3863,7 +3863,7 @@ void ospf_ls_upd_queue_send(struct ospf_interface *oi, struct list *update,
                 * is actually turned off.
                 */
                if (list_isempty(oi->ospf->oi_write_q))
-                       EVENT_OFF(oi->ospf->t_write);
+                       event_cancel(&oi->ospf->t_write);
        } else {
                /* Hook thread to write packet. */
                OSPF_ISM_WRITE_ON(oi->ospf);
index 89db97922f87b16c35c45bca0cd6360e6e8220b3..078971e963952db9fc481cda5441c01ee2d3ee36 100644 (file)
@@ -565,7 +565,7 @@ static void ospf_sr_stop(void)
        osr_debug("SR (%s): Stop Segment Routing", __func__);
 
        /* Disable any re-attempt to connect to Label Manager */
-       EVENT_OFF(OspfSR.t_start_lm);
+       event_cancel(&OspfSR.t_start_lm);
 
        /* Release SRGB if active */
        sr_global_block_delete();
index 3263d0a5f86cd38d0a80b2fd747a4035fdae4802..c1eaf94a416dc36b12757c29afa321c9b80c8c2b 100644 (file)
@@ -8838,7 +8838,7 @@ DEFPY (no_ip_ospf_gr_hdelay,
                        continue;
 
                oi->gr.hello_delay.elapsed_seconds = 0;
-               EVENT_OFF(oi->gr.hello_delay.t_grace_send);
+               event_cancel(&oi->gr.hello_delay.t_grace_send);
        }
 
        return CMD_SUCCESS;
@@ -10032,7 +10032,7 @@ DEFUN (no_ospf_max_metric_router_lsa_startup,
        for (ALL_LIST_ELEMENTS_RO(ospf->areas, ln, area)) {
                SET_FLAG(area->stub_router_state,
                         OSPF_AREA_WAS_START_STUB_ROUTED);
-               EVENT_OFF(area->t_stub_router);
+               event_cancel(&area->t_stub_router);
 
                /* Don't trample on admin stub routed */
                if (!CHECK_FLAG(area->stub_router_state,
@@ -13380,7 +13380,7 @@ DEFPY_HIDDEN(ospf_maxage_delay_timer, ospf_maxage_delay_timer_cmd,
        else
                ospf->maxage_delay = value;
 
-       EVENT_OFF(ospf->t_maxage);
+       event_cancel(&ospf->t_maxage);
        OSPF_TIMER_ON(ospf->t_maxage, ospf_maxage_lsa_remover,
                      ospf->maxage_delay);
 
index 1d2078469db9520c842e67de939e5ccf2875358c..939a423c2936abf4186124740982d2fd254a2d91 100644 (file)
@@ -731,7 +731,7 @@ static void ospf_finish_final(struct ospf *ospf)
        /* Clear static neighbors */
        for (rn = route_top(ospf->nbr_nbma); rn; rn = route_next(rn))
                if ((nbr_nbma = rn->info)) {
-                       EVENT_OFF(nbr_nbma->t_poll);
+                       event_cancel(&nbr_nbma->t_poll);
 
                        if (nbr_nbma->nbr) {
                                nbr_nbma->nbr->nbr_nbma = NULL;
@@ -854,24 +854,24 @@ static void ospf_finish_final(struct ospf *ospf)
        }
 
        /* Cancel all timers. */
-       EVENT_OFF(ospf->t_read);
-       EVENT_OFF(ospf->t_write);
-       EVENT_OFF(ospf->t_spf_calc);
-       EVENT_OFF(ospf->t_ase_calc);
-       EVENT_OFF(ospf->t_maxage);
-       EVENT_OFF(ospf->t_maxage_walker);
-       EVENT_OFF(ospf->t_deferred_shutdown);
-       EVENT_OFF(ospf->t_abr_task);
-       EVENT_OFF(ospf->t_abr_fr);
-       EVENT_OFF(ospf->t_asbr_check);
-       EVENT_OFF(ospf->t_asbr_redist_update);
-       EVENT_OFF(ospf->t_distribute_update);
-       EVENT_OFF(ospf->t_lsa_refresher);
-       EVENT_OFF(ospf->t_opaque_lsa_self);
-       EVENT_OFF(ospf->t_sr_update);
-       EVENT_OFF(ospf->t_default_routemap_timer);
-       EVENT_OFF(ospf->t_external_aggr);
-       EVENT_OFF(ospf->gr_info.t_grace_period);
+       event_cancel(&ospf->t_read);
+       event_cancel(&ospf->t_write);
+       event_cancel(&ospf->t_spf_calc);
+       event_cancel(&ospf->t_ase_calc);
+       event_cancel(&ospf->t_maxage);
+       event_cancel(&ospf->t_maxage_walker);
+       event_cancel(&ospf->t_deferred_shutdown);
+       event_cancel(&ospf->t_abr_task);
+       event_cancel(&ospf->t_abr_fr);
+       event_cancel(&ospf->t_asbr_check);
+       event_cancel(&ospf->t_asbr_redist_update);
+       event_cancel(&ospf->t_distribute_update);
+       event_cancel(&ospf->t_lsa_refresher);
+       event_cancel(&ospf->t_opaque_lsa_self);
+       event_cancel(&ospf->t_sr_update);
+       event_cancel(&ospf->t_default_routemap_timer);
+       event_cancel(&ospf->t_external_aggr);
+       event_cancel(&ospf->gr_info.t_grace_period);
 
        route_table_finish(ospf->rt_aggr_tbl);
 
@@ -996,8 +996,8 @@ static void ospf_area_free(struct ospf_area *area)
                free(IMPORT_NAME(area));
 
        /* Cancel timer. */
-       EVENT_OFF(area->t_stub_router);
-       EVENT_OFF(area->t_opaque_lsa_self);
+       event_cancel(&area->t_stub_router);
+       event_cancel(&area->t_opaque_lsa_self);
 
        if (OSPF_IS_AREA_BACKBONE(area))
                area->ospf->backbone = NULL;
@@ -1459,7 +1459,7 @@ void ospf_ls_upd_queue_empty(struct ospf_interface *oi)
                }
 
        /* remove update event */
-       EVENT_OFF(oi->t_ls_upd_event);
+       event_cancel(&oi->t_ls_upd_event);
 }
 
 void ospf_if_update(struct ospf *ospf, struct interface *ifp)
@@ -1904,7 +1904,7 @@ int ospf_timers_refresh_set(struct ospf *ospf, int interval)
                    - (monotime(NULL) - ospf->lsa_refresher_started);
 
        if (time_left > interval) {
-               EVENT_OFF(ospf->t_lsa_refresher);
+               event_cancel(&ospf->t_lsa_refresher);
                event_add_timer(master, ospf_lsa_refresh_walker, ospf, interval,
                                &ospf->t_lsa_refresher);
        }
@@ -1921,7 +1921,7 @@ int ospf_timers_refresh_unset(struct ospf *ospf)
                    - (monotime(NULL) - ospf->lsa_refresher_started);
 
        if (time_left > OSPF_LSA_REFRESH_INTERVAL_DEFAULT) {
-               EVENT_OFF(ospf->t_lsa_refresher);
+               event_cancel(&ospf->t_lsa_refresher);
                ospf->t_lsa_refresher = NULL;
                event_add_timer(master, ospf_lsa_refresh_walker, ospf,
                                OSPF_LSA_REFRESH_INTERVAL_DEFAULT,
@@ -1973,7 +1973,7 @@ static void ospf_nbr_nbma_delete(struct ospf *ospf,
 
 static void ospf_nbr_nbma_down(struct ospf_nbr_nbma *nbr_nbma)
 {
-       EVENT_OFF(nbr_nbma->t_poll);
+       event_cancel(&nbr_nbma->t_poll);
 
        if (nbr_nbma->nbr) {
                nbr_nbma->nbr->nbr_nbma = NULL;
@@ -2162,7 +2162,7 @@ int ospf_nbr_nbma_poll_interval_set(struct ospf *ospf, struct in_addr nbr_addr,
        if (nbr_nbma->v_poll != interval) {
                nbr_nbma->v_poll = interval;
                if (nbr_nbma->oi && ospf_if_is_up(nbr_nbma->oi)) {
-                       EVENT_OFF(nbr_nbma->t_poll);
+                       event_cancel(&nbr_nbma->t_poll);
                        OSPF_POLL_TIMER_ON(nbr_nbma->t_poll, ospf_poll_timer,
                                           nbr_nbma->v_poll);
                }
@@ -2357,7 +2357,7 @@ static int ospf_vrf_disable(struct vrf *vrf)
                if (IS_DEBUG_OSPF_EVENT)
                        zlog_debug("%s: ospf old_vrf_id %d unlinked", __func__,
                                   old_vrf_id);
-               EVENT_OFF(ospf->t_read);
+               event_cancel(&ospf->t_read);
                close(ospf->fd);
                ospf->fd = -1;
        }
index fed75a0a0cb2faa0096eba0f267aa13c658bdbb4..1bad97a5dac15f584defc8ef656122ed5bb27320 100644 (file)
@@ -379,7 +379,7 @@ static void gm_sg_free(struct gm_sg *sg)
                pim_embedded_rp_delete(sg->iface->pim, &sg->sgaddr.grp);
 
        /* t_sg_expiry is handled before this is reached */
-       EVENT_OFF(sg->t_sg_query);
+       event_cancel(&sg->t_sg_query);
        gm_packet_sg_subs_fini(sg->subs_negative);
        gm_packet_sg_subs_fini(sg->subs_positive);
        XFREE(MTYPE_GM_SG, sg);
@@ -460,7 +460,7 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
 
                        gm_sg_timer_start(gm_ifp, sg, timers.expire_wait);
 
-                       EVENT_OFF(sg->t_sg_query);
+                       event_cancel(&sg->t_sg_query);
                        sg->query_sbit = false;
                        /* Trigger the specific queries only for querier. */
                        if (!pim_ifp->gmp_immediate_leave &&
@@ -517,7 +517,7 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
                 * another path.
                 */
                if (has_expired)
-                       EVENT_OFF(sg->t_sg_expire);
+                       event_cancel(&sg->t_sg_expire);
 
                assertf((!sg->t_sg_expire &&
                         !gm_packet_sg_subs_count(sg->subs_positive) &&
@@ -663,7 +663,7 @@ static void gm_sg_expiry_cancel(struct gm_sg *sg)
 {
        if (sg->t_sg_expire && PIM_DEBUG_GM_TRACE)
                zlog_debug(log_sg(sg, "alive, cancelling expiry timer"));
-       EVENT_OFF(sg->t_sg_expire);
+       event_cancel(&sg->t_sg_expire);
        sg->query_sbit = true;
 }
 
@@ -1221,7 +1221,7 @@ static void gm_handle_q_general(struct gm_if *gm_ifp,
 
                gm_ifp->n_pending--;
                if (!gm_ifp->n_pending)
-                       EVENT_OFF(gm_ifp->t_expire);
+                       event_cancel(&gm_ifp->t_expire);
        }
 
        /* people might be messing with their configs or something */
@@ -1330,7 +1330,7 @@ static void gm_sg_timer_start(struct gm_if *gm_ifp, struct gm_sg *sg,
                if (timercmp(&remain, &expire_wait, <=))
                        return;
 
-               EVENT_OFF(sg->t_sg_expire);
+               event_cancel(&sg->t_sg_expire);
        }
 
        event_add_timer_tv(router->master, gm_t_sg_expire, sg, &expire_wait,
@@ -1391,7 +1391,7 @@ static void gm_t_grp_expire(struct event *t)
                 * parallel.  But if we received nothing for the *,G query,
                 * the S,G query is kinda irrelevant.
                 */
-               EVENT_OFF(sg->t_sg_expire);
+               event_cancel(&sg->t_sg_expire);
 
                frr_each_safe (gm_packet_sg_subs, sg->subs_positive, item)
                        /* this will also drop the EXCLUDE S,G lists */
@@ -1443,7 +1443,7 @@ static void gm_handle_q_group(struct gm_if *gm_ifp,
                if (timercmp(&remain, &timers->expire_wait, <=))
                        return;
 
-               EVENT_OFF(pend->t_expire);
+               event_cancel(&pend->t_expire);
        } else {
                pend = XCALLOC(MTYPE_GM_GRP_PENDING, sizeof(*pend));
                pend->grp = grp;
@@ -1464,7 +1464,7 @@ static void gm_bump_querier(struct gm_if *gm_ifp)
 {
        struct pim_interface *pim_ifp = gm_ifp->ifp->info;
 
-       EVENT_OFF(gm_ifp->t_query);
+       event_cancel(&gm_ifp->t_query);
 
        if (pim_addr_is_any(pim_ifp->ll_lowest))
                return;
@@ -1589,8 +1589,8 @@ static void gm_handle_query(struct gm_if *gm_ifp,
        if (IPV6_ADDR_CMP(&pkt_src->sin6_addr, &pim_ifp->ll_lowest) < 0) {
                unsigned int other_ms;
 
-               EVENT_OFF(gm_ifp->t_query);
-               EVENT_OFF(gm_ifp->t_other_querier);
+               event_cancel(&gm_ifp->t_query);
+               event_cancel(&gm_ifp->t_other_querier);
 
                other_ms = timers.qrv * timers.qqic_ms + timers.max_resp_ms / 2;
                event_add_timer_msec(router->master, gm_t_other_querier, gm_ifp,
@@ -2093,7 +2093,7 @@ static void gm_trigger_specific(struct gm_sg *sg)
        pend_gsq->n_src++;
 
        if (pend_gsq->n_src == array_size(pend_gsq->srcs)) {
-               EVENT_OFF(pend_gsq->t_send);
+               event_cancel(&pend_gsq->t_send);
                gm_send_specific(pend_gsq);
                pend_gsq = NULL;
        }
@@ -2199,7 +2199,7 @@ static void gm_vrf_socket_decref(struct pim_instance *pim)
        if (--pim->gm_socket_if_count)
                return;
 
-       EVENT_OFF(pim->t_gm_recv);
+       event_cancel(&pim->t_gm_recv);
        close(pim->gm_socket);
        pim->gm_socket = -1;
 }
@@ -2272,17 +2272,17 @@ void gm_group_delete(struct gm_if *gm_ifp)
                gm_packet_drop(pkt, false);
 
        while ((pend_grp = gm_grp_pends_pop(gm_ifp->grp_pends))) {
-               EVENT_OFF(pend_grp->t_expire);
+               event_cancel(&pend_grp->t_expire);
                XFREE(MTYPE_GM_GRP_PENDING, pend_grp);
        }
 
        while ((pend_gsq = gm_gsq_pends_pop(gm_ifp->gsq_pends))) {
-               EVENT_OFF(pend_gsq->t_send);
+               event_cancel(&pend_gsq->t_send);
                XFREE(MTYPE_GM_GSQ_PENDING, pend_gsq);
        }
 
        while ((sg = gm_sgs_pop(gm_ifp->sgs))) {
-               EVENT_OFF(sg->t_sg_expire);
+               event_cancel(&sg->t_sg_expire);
                assertf(!gm_packet_sg_subs_count(sg->subs_negative), "%pSG",
                        &sg->sgaddr);
                assertf(!gm_packet_sg_subs_count(sg->subs_positive), "%pSG",
@@ -2310,9 +2310,9 @@ void gm_ifp_teardown(struct interface *ifp)
        if (PIM_DEBUG_GM_EVENTS)
                zlog_debug(log_ifp("MLD stop"));
 
-       EVENT_OFF(gm_ifp->t_query);
-       EVENT_OFF(gm_ifp->t_other_querier);
-       EVENT_OFF(gm_ifp->t_expire);
+       event_cancel(&gm_ifp->t_query);
+       event_cancel(&gm_ifp->t_other_querier);
+       event_cancel(&gm_ifp->t_expire);
 
        frr_with_privs (&pimd_privs) {
                struct ipv6_mreq mreq;
@@ -2355,7 +2355,7 @@ static void gm_update_ll(struct interface *ifp)
        gm_ifp->cur_ll_lowest = pim_ifp->ll_lowest;
        if (was_querier)
                gm_ifp->querier = pim_ifp->ll_lowest;
-       EVENT_OFF(gm_ifp->t_query);
+       event_cancel(&gm_ifp->t_query);
 
        if (pim_addr_is_any(gm_ifp->cur_ll_lowest)) {
                if (was_querier)
index 86d9a745eaa0f708cf28d7cf780bd4f47779d568..729f4a3c377889a6aceb717da533387b6d1ea0c0 100644 (file)
@@ -535,7 +535,7 @@ static void assert_timer_off(struct pim_ifchannel *ch)
                                __func__, ch->sg_str, ch->interface->name);
                }
        }
-       EVENT_OFF(ch->t_ifassert_timer);
+       event_cancel(&ch->t_ifassert_timer);
 }
 
 static void pim_assert_timer_set(struct pim_ifchannel *ch, int interval)
index 845467755ab2b904dd25ad10c223c782fd9bf44b..a5882e083fe8843ca271649c04d511436eef5c2a 100644 (file)
@@ -79,7 +79,7 @@ void pim_bsm_write_config(struct vty *vty, struct interface *ifp)
 
 static void pim_bsm_rpinfo_free(struct bsm_rpinfo *bsrp_info)
 {
-       EVENT_OFF(bsrp_info->g2rp_timer);
+       event_cancel(&bsrp_info->g2rp_timer);
        XFREE(MTYPE_PIM_BSRP_INFO, bsrp_info);
 }
 
@@ -173,7 +173,7 @@ static void pim_on_bs_timer(struct event *t)
        struct bsm_scope *scope;
 
        scope = EVENT_ARG(t);
-       EVENT_OFF(scope->bs_timer);
+       event_cancel(&scope->bs_timer);
 
        if (PIM_DEBUG_BSM)
                zlog_debug("%s: Bootstrap Timer expired for scope: %d",
@@ -191,7 +191,7 @@ static void pim_bsm_accept_any(struct bsm_scope *scope)
        struct bsgrp_node *bsgrp_node;
        struct bsm_rpinfo *bsrp;
 
-       EVENT_OFF(scope->t_ebsr_regen_bsm);
+       event_cancel(&scope->t_ebsr_regen_bsm);
 
        /* Reset scope zone data */
        scope->state = ACCEPT_ANY;
@@ -231,7 +231,7 @@ static void pim_bs_timer_stop(struct bsm_scope *scope)
        if (PIM_DEBUG_BSM)
                zlog_debug("%s : BS timer being stopped of sz: %d", __func__,
                           scope->sz_id);
-       EVENT_OFF(scope->bs_timer);
+       event_cancel(&scope->bs_timer);
 }
 
 static void pim_bs_timer_start(struct bsm_scope *scope, int bs_timeout)
@@ -241,7 +241,7 @@ static void pim_bs_timer_start(struct bsm_scope *scope, int bs_timeout)
                        zlog_debug("%s : Invalid scope(NULL).", __func__);
                return;
        }
-       EVENT_OFF(scope->bs_timer);
+       event_cancel(&scope->bs_timer);
        if (PIM_DEBUG_BSM)
                zlog_debug(
                        "%s : starting bs timer for scope %d with timeout %d secs",
@@ -307,7 +307,7 @@ void pim_bsm_proc_free(struct pim_instance *pim)
        struct bsgrp_node *bsgrp;
        struct cand_rp_group *crpgrp;
 
-       EVENT_OFF(scope->unicast_read);
+       event_cancel(&scope->unicast_read);
        close(scope->unicast_sock);
 
        pim_bs_timer_stop(scope);
@@ -352,7 +352,7 @@ static void pim_on_g2rp_timer(struct event *t)
        pim_addr bsrp_addr;
 
        bsrp = EVENT_ARG(t);
-       EVENT_OFF(bsrp->g2rp_timer);
+       event_cancel(&bsrp->g2rp_timer);
        bsgrp_node = bsrp->bsgrp_node;
        pim = bsgrp_node->scope->pim;
        bsrp_addr = bsrp->rp_address;
@@ -419,7 +419,7 @@ static void pim_g2rp_timer_start(struct bsm_rpinfo *bsrp, int hold_time)
                        zlog_debug("%s : Invalid brsp(NULL).", __func__);
                return;
        }
-       EVENT_OFF(bsrp->g2rp_timer);
+       event_cancel(&bsrp->g2rp_timer);
        if (PIM_DEBUG_BSM)
                zlog_debug(
                        "%s : starting g2rp timer for grp: %pFX - rp: %pPAs with timeout  %d secs(Actual Hold time : %d secs)",
@@ -446,7 +446,7 @@ static void pim_g2rp_timer_stop(struct bsm_rpinfo *bsrp)
                           __func__, &bsrp->bsgrp_node->group,
                           &bsrp->rp_address);
 
-       EVENT_OFF(bsrp->g2rp_timer);
+       event_cancel(&bsrp->g2rp_timer);
 }
 
 static bool is_hold_time_zero(void *data)
@@ -652,7 +652,7 @@ static void pim_bsm_update(struct pim_instance *pim, pim_addr bsr,
                break;
        }
 
-       EVENT_OFF(pim->global_scope.t_ebsr_regen_bsm);
+       event_cancel(&pim->global_scope.t_ebsr_regen_bsm);
 
        if (pim->global_scope.state == BSR_ELECTED)
                pim_crp_db_clear(&pim->global_scope);
@@ -679,7 +679,7 @@ void pim_bsm_clear(struct pim_instance *pim)
        struct rp_info *rp_info;
        bool upstream_updated = false;
 
-       EVENT_OFF(pim->global_scope.t_ebsr_regen_bsm);
+       event_cancel(&pim->global_scope.t_ebsr_regen_bsm);
 
        if (pim->global_scope.state == BSR_ELECTED)
                pim_crp_db_clear(&pim->global_scope);
@@ -1638,7 +1638,7 @@ void pim_bsm_changed(struct bsm_scope *scope)
 {
        struct event t;
 
-       EVENT_OFF(scope->bs_timer);
+       event_cancel(&scope->bs_timer);
        scope->changed_bsm_trigger = 2;
 
        t.arg = scope;
@@ -1705,8 +1705,8 @@ static void pim_cand_bsr_pending(struct bsm_scope *scope)
        pim_addr best_addr;
        float prio_delay, addr_delay;
 
-       EVENT_OFF(scope->bs_timer);
-       EVENT_OFF(scope->t_ebsr_regen_bsm);
+       event_cancel(&scope->bs_timer);
+       event_cancel(&scope->t_ebsr_regen_bsm);
        scope->state = BSR_PENDING;
 
        best_prio = MAX(scope->cand_bsr_prio, scope->current_bsr_prio);
@@ -1850,8 +1850,8 @@ static void pim_cand_bsr_stop(struct bsm_scope *scope, bool verbose)
        if (PIM_DEBUG_BSM)
                zlog_debug("Candidate BSR ceasing operation");
 
-       EVENT_OFF(scope->t_ebsr_regen_bsm);
-       EVENT_OFF(scope->bs_timer);
+       event_cancel(&scope->t_ebsr_regen_bsm);
+       event_cancel(&scope->bs_timer);
        pim_crp_db_clear(scope);
        pim_bsm_accept_any(scope);
 }
@@ -2055,7 +2055,7 @@ void pim_cand_rp_trigger(struct bsm_scope *scope)
                return;
        }
 
-       EVENT_OFF(scope->cand_rp_adv_timer);
+       event_cancel(&scope->cand_rp_adv_timer);
 
        if (!scope->cand_rp_addrsel.run)
                return;
@@ -2078,7 +2078,7 @@ void pim_cand_rp_apply(struct bsm_scope *scope)
                        zlog_debug("Candidate RP ceasing operation");
 
                cand_addrsel_clear(&scope->cand_rp_addrsel);
-               EVENT_OFF(scope->cand_rp_adv_timer);
+               event_cancel(&scope->cand_rp_adv_timer);
                pim_cand_rp_adv_stop_maybe(scope);
                scope->cand_rp_adv_trigger = 0;
                return;
@@ -2143,7 +2143,7 @@ static void pim_cand_addrs_reapply(struct event *t)
 
 void pim_cand_addrs_changed(void)
 {
-       EVENT_OFF(t_cand_addrs_reapply);
+       event_cancel(&t_cand_addrs_reapply);
        event_add_timer_msec(router->master, pim_cand_addrs_reapply, NULL, 1,
                             &t_cand_addrs_reapply);
 }
index 03ceabd733d56b6f2052fbd3eb0707c13d377e4a..44bf836b810a89666c5e354e6929406c3a36a7da 100644 (file)
@@ -428,7 +428,7 @@ void pim_crp_nht_update(struct pim_instance *pim, struct pim_nexthop_cache *pnc)
 
 static void pim_crp_free(struct pim_instance *pim, struct bsr_crp_rp *rp)
 {
-       EVENT_OFF(rp->t_hold);
+       event_cancel(&rp->t_hold);
        pim_nht_candrp_del(pim, rp->addr);
        bsr_crp_rp_groups_fini(rp->groups);
 
@@ -553,7 +553,7 @@ int pim_crp_process(struct interface *ifp, pim_sgaddr *src_dst, uint8_t *buf,
        rp->seen_last = monotime(NULL);
        rp->holdtime = ntohs(crp_hdr->rp_holdtime);
 
-       EVENT_OFF(rp->t_hold);
+       event_cancel(&rp->t_hold);
        event_add_timer(router->master, pim_crp_expire, rp,
                        ntohs(crp_hdr->rp_holdtime), &rp->t_hold);
 
index d55d2a958a8582ca6ef68d364caa79c0f35ff418..6853466e5f5f520b3937de3abd53058c67090222 100644 (file)
@@ -193,9 +193,9 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
 
        ch->upstream = NULL;
 
-       EVENT_OFF(ch->t_ifjoin_expiry_timer);
-       EVENT_OFF(ch->t_ifjoin_prune_pending_timer);
-       EVENT_OFF(ch->t_ifassert_timer);
+       event_cancel(&ch->t_ifjoin_expiry_timer);
+       event_cancel(&ch->t_ifjoin_prune_pending_timer);
+       event_cancel(&ch->t_ifassert_timer);
 
        if (ch->parent) {
                listnode_delete(ch->parent->sources, ch);
@@ -430,7 +430,7 @@ const char *pim_ifchannel_ifassert_name(enum pim_ifassert_state ifassert_state)
 */
 void reset_ifassert_state(struct pim_ifchannel *ch)
 {
-       EVENT_OFF(ch->t_ifassert_timer);
+       event_cancel(&ch->t_ifassert_timer);
 
        pim_ifassert_winner_set(ch, PIM_IFASSERT_NOINFO, PIMADDR_ANY,
                                router->infinite_assert_metric);
@@ -938,13 +938,13 @@ void pim_ifchannel_join_add(struct interface *ifp, pim_addr neigh_addr,
                                return;
                        }
                }
-               EVENT_OFF(ch->t_ifjoin_expiry_timer);
+               event_cancel(&ch->t_ifjoin_expiry_timer);
                break;
        case PIM_IFJOIN_PRUNE:
                if (source_flags & PIM_ENCODE_RPT_BIT) {
                        pim_ifchannel_ifjoin_switch(__func__, ch,
                                                    PIM_IFJOIN_NOINFO);
-                       EVENT_OFF(ch->t_ifjoin_expiry_timer);
+                       event_cancel(&ch->t_ifjoin_expiry_timer);
                        delete_on_noinfo(ch);
                        return;
                } else
@@ -961,7 +961,7 @@ void pim_ifchannel_join_add(struct interface *ifp, pim_addr neigh_addr,
                 * maximum of its current value and the HoldTime from the
                 * triggering Join/Prune message.
                 */
-               EVENT_OFF(ch->t_ifjoin_prune_pending_timer);
+               event_cancel(&ch->t_ifjoin_prune_pending_timer);
 
                /* Check if SGRpt join Received */
                if ((source_flags & PIM_ENCODE_RPT_BIT) &&
@@ -973,7 +973,7 @@ void pim_ifchannel_join_add(struct interface *ifp, pim_addr neigh_addr,
                         * I transitions to the NoInfo state.The ET and PPT are
                         * cancelled.
                         */
-                       EVENT_OFF(ch->t_ifjoin_expiry_timer);
+                       event_cancel(&ch->t_ifjoin_expiry_timer);
                        pim_ifchannel_ifjoin_switch(__func__, ch,
                                                    PIM_IFJOIN_NOINFO);
                        return;
@@ -988,7 +988,7 @@ void pim_ifchannel_join_add(struct interface *ifp, pim_addr neigh_addr,
                        if (remain > holdtime)
                                return;
                }
-               EVENT_OFF(ch->t_ifjoin_expiry_timer);
+               event_cancel(&ch->t_ifjoin_expiry_timer);
 
                break;
        case PIM_IFJOIN_PRUNE_TMP:
@@ -1048,8 +1048,8 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
                           be taken not to use "ch" afterwards since it would be
                           deleted. */
 
-                       EVENT_OFF(ch->t_ifjoin_prune_pending_timer);
-                       EVENT_OFF(ch->t_ifjoin_expiry_timer);
+                       event_cancel(&ch->t_ifjoin_prune_pending_timer);
+                       event_cancel(&ch->t_ifjoin_expiry_timer);
                        event_add_timer_msec(router->master,
                                             on_ifjoin_prune_pending_timer, ch,
                                             jp_override_interval_msec,
@@ -1086,7 +1086,7 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
                /* If we called ifjoin_prune() directly instead, care should
                   be taken not to use "ch" afterwards since it would be
                   deleted. */
-               EVENT_OFF(ch->t_ifjoin_prune_pending_timer);
+               event_cancel(&ch->t_ifjoin_prune_pending_timer);
                event_add_timer_msec(router->master,
                                     on_ifjoin_prune_pending_timer, ch,
                                     jp_override_interval_msec,
@@ -1094,7 +1094,7 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
                break;
        case PIM_IFJOIN_PRUNE:
                if (source_flags & PIM_ENCODE_RPT_BIT) {
-                       EVENT_OFF(ch->t_ifjoin_prune_pending_timer);
+                       event_cancel(&ch->t_ifjoin_prune_pending_timer);
                        /*
                         * While in Prune State, Receive SGRpt Prune.
                         * RFC 7761 Sec 4.5.3:
@@ -1110,7 +1110,7 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
 
                                if (rem > holdtime)
                                        return;
-                               EVENT_OFF(ch->t_ifjoin_expiry_timer);
+                               event_cancel(&ch->t_ifjoin_expiry_timer);
                        }
 
                        event_add_timer(router->master, on_ifjoin_expiry_timer,
@@ -1121,7 +1121,7 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
        case PIM_IFJOIN_PRUNE_TMP:
                if (source_flags & PIM_ENCODE_RPT_BIT) {
                        ch->ifjoin_state = PIM_IFJOIN_PRUNE;
-                       EVENT_OFF(ch->t_ifjoin_expiry_timer);
+                       event_cancel(&ch->t_ifjoin_expiry_timer);
                        event_add_timer(router->master, on_ifjoin_expiry_timer,
                                        ch, holdtime,
                                        &ch->t_ifjoin_expiry_timer);
@@ -1130,7 +1130,7 @@ void pim_ifchannel_prune(struct interface *ifp, pim_addr upstream,
        case PIM_IFJOIN_PRUNE_PENDING_TMP:
                if (source_flags & PIM_ENCODE_RPT_BIT) {
                        ch->ifjoin_state = PIM_IFJOIN_PRUNE_PENDING;
-                       EVENT_OFF(ch->t_ifjoin_expiry_timer);
+                       event_cancel(&ch->t_ifjoin_expiry_timer);
                        event_add_timer(router->master, on_ifjoin_expiry_timer,
                                        ch, holdtime,
                                        &ch->t_ifjoin_expiry_timer);
@@ -1484,8 +1484,8 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom,
                                break;
 
                        if (child->ifjoin_state == PIM_IFJOIN_PRUNE_PENDING_TMP)
-                               EVENT_OFF(child->t_ifjoin_prune_pending_timer);
-                       EVENT_OFF(child->t_ifjoin_expiry_timer);
+                               event_cancel(&child->t_ifjoin_prune_pending_timer);
+                       event_cancel(&child->t_ifjoin_expiry_timer);
 
                        PIM_IF_FLAG_UNSET_S_G_RPT(child->flags);
                        child->ifjoin_state = PIM_IFJOIN_NOINFO;
index b1b45664992ba9e4a65ab1cf3d52df713979a1c1..6eafc5bacf1218d216dd37005d8f63b789f65f85 100644 (file)
@@ -379,7 +379,7 @@ void pim_igmp_other_querier_timer_on(struct gm_sock *igmp)
                                "Querier %s resetting TIMER event for Other-Querier-Present",
                                ifaddr_str);
                }
-               EVENT_OFF(igmp->t_other_querier_timer);
+               event_cancel(&igmp->t_other_querier_timer);
        } else {
                /*
                  We are the current querier, then stop sending general queries:
@@ -441,7 +441,7 @@ void pim_igmp_other_querier_timer_off(struct gm_sock *igmp)
                                ifaddr_str, igmp->fd, igmp->interface->name);
                }
        }
-       EVENT_OFF(igmp->t_other_querier_timer);
+       event_cancel(&igmp->t_other_querier_timer);
 }
 
 int igmp_validate_checksum(char *igmp_msg, int igmp_msg_len)
@@ -885,7 +885,7 @@ void pim_igmp_general_query_off(struct gm_sock *igmp)
                                ifaddr_str, igmp->fd, igmp->interface->name);
                }
        }
-       EVENT_OFF(igmp->t_igmp_query_timer);
+       event_cancel(&igmp->t_igmp_query_timer);
 }
 
 /* Issue IGMP general query */
@@ -955,7 +955,7 @@ static void sock_close(struct gm_sock *igmp)
                                igmp->interface->name);
                }
        }
-       EVENT_OFF(igmp->t_igmp_read);
+       event_cancel(&igmp->t_igmp_read);
 
        if (close(igmp->fd)) {
                flog_err(
@@ -1047,7 +1047,7 @@ void igmp_group_delete(struct gm_group *group)
                igmp_source_delete(src);
        }
 
-       EVENT_OFF(group->t_group_query_retransmit_timer);
+       event_cancel(&group->t_group_query_retransmit_timer);
 
        group_timer_off(group);
        igmp_group_count_decr(pim_ifp);
@@ -1350,7 +1350,7 @@ static void group_timer_off(struct gm_group *group)
                zlog_debug("Cancelling TIMER event for group %s on %s",
                           group_str, group->interface->name);
        }
-       EVENT_OFF(group->t_group_timer);
+       event_cancel(&group->t_group_timer);
 }
 
 void igmp_group_timer_on(struct gm_group *group, long interval_msec,
index 3cbab499dbfe95f3caca2a928523b95f4a346af0..5292705572521a1e6571a4643e2b9b8678596fa7 100644 (file)
@@ -189,7 +189,7 @@ static void source_timer_off(struct gm_group *group, struct gm_source *source)
                        group_str, source_str, group->interface->name);
        }
 
-       EVENT_OFF(source->t_source_timer);
+       event_cancel(&source->t_source_timer);
 }
 
 static void igmp_source_timer_on(struct gm_group *group,
index 7796e8b95169f2e49411f2dabad031eafbb62638..fb5e45bac790c32b434adcdcea9420924f1d6cab 100644 (file)
@@ -331,9 +331,9 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
                                if (PIM_IF_FLAG_TEST_S_G_RPT(child->flags)) {
                                        if (child->ifjoin_state
                                            == PIM_IFJOIN_PRUNE_PENDING_TMP)
-                                               EVENT_OFF(
+                                               event_cancel(&
                                                        child->t_ifjoin_prune_pending_timer);
-                                       EVENT_OFF(child->t_ifjoin_expiry_timer);
+                                       event_cancel(&child->t_ifjoin_expiry_timer);
                                        PIM_IF_FLAG_UNSET_S_G_RPT(child->flags);
                                        child->ifjoin_state = PIM_IFJOIN_NOINFO;
                                        delete_on_noinfo(child);
index 30daa3a929dcaabaaccd3b7c22255c70ee22946a..e7b6097b8c016d56a2c21f1038564dce7c8455b0 100644 (file)
@@ -834,7 +834,7 @@ static void mroute_read_on(struct pim_instance *pim)
 
 static void mroute_read_off(struct pim_instance *pim)
 {
-       EVENT_OFF(pim->thread);
+       event_cancel(&pim->thread);
 }
 
 int pim_mroute_socket_enable(struct pim_instance *pim)
index 2192aa9831b8a19f096150cd98171a73696be594..2e92b509777da37d69a634adcdd82177a2e88dd5 100644 (file)
@@ -80,7 +80,7 @@ static void pim_msdp_sa_adv_timer_cb(struct event *t)
 
 static void pim_msdp_sa_adv_timer_setup(struct pim_instance *pim, bool start)
 {
-       EVENT_OFF(pim->msdp.sa_adv_timer);
+       event_cancel(&pim->msdp.sa_adv_timer);
        if (start) {
                event_add_timer(pim->msdp.master, pim_msdp_sa_adv_timer_cb, pim,
                                PIM_MSDP_SA_ADVERTISMENT_TIME,
@@ -103,7 +103,7 @@ static void pim_msdp_sa_state_timer_cb(struct event *t)
 
 static void pim_msdp_sa_state_timer_setup(struct pim_msdp_sa *sa, bool start)
 {
-       EVENT_OFF(sa->sa_state_timer);
+       event_cancel(&sa->sa_state_timer);
        if (start) {
                event_add_timer(sa->pim->msdp.master,
                                pim_msdp_sa_state_timer_cb, sa,
@@ -897,7 +897,7 @@ static void pim_msdp_peer_hold_timer_cb(struct event *t)
 static void pim_msdp_peer_hold_timer_setup(struct pim_msdp_peer *mp, bool start)
 {
        struct pim_instance *pim = mp->pim;
-       EVENT_OFF(mp->hold_timer);
+       event_cancel(&mp->hold_timer);
        if (start) {
                event_add_timer(pim->msdp.master, pim_msdp_peer_hold_timer_cb,
                                mp, pim->msdp.hold_time, &mp->hold_timer);
@@ -921,7 +921,7 @@ static void pim_msdp_peer_ka_timer_cb(struct event *t)
 
 static void pim_msdp_peer_ka_timer_setup(struct pim_msdp_peer *mp, bool start)
 {
-       EVENT_OFF(mp->ka_timer);
+       event_cancel(&mp->ka_timer);
        if (start) {
                event_add_timer(mp->pim->msdp.master, pim_msdp_peer_ka_timer_cb,
                                mp, mp->pim->msdp.keep_alive, &mp->ka_timer);
@@ -983,7 +983,7 @@ static void pim_msdp_peer_cr_timer_cb(struct event *t)
 
 static void pim_msdp_peer_cr_timer_setup(struct pim_msdp_peer *mp, bool start)
 {
-       EVENT_OFF(mp->cr_timer);
+       event_cancel(&mp->cr_timer);
        if (start) {
                event_add_timer(mp->pim->msdp.master, pim_msdp_peer_cr_timer_cb,
                                mp, mp->pim->msdp.connection_retry,
@@ -1500,7 +1500,7 @@ static void pim_upstream_msdp_reg_timer(struct event *t)
 
 void pim_upstream_msdp_reg_timer_start(struct pim_upstream *up)
 {
-       EVENT_OFF(up->t_msdp_reg_timer);
+       event_cancel(&up->t_msdp_reg_timer);
        event_add_timer(router->master, pim_upstream_msdp_reg_timer, up, PIM_MSDP_REG_RXED_PERIOD,
                        &up->t_msdp_reg_timer);
 
index 1cd7cce086fb6680f3ac59d78a54ee763f55732d..e1a80908f031ee4b0e6210c83a105a2b224db93a 100644 (file)
@@ -222,7 +222,7 @@ void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime)
 {
        neigh->holdtime = holdtime;
 
-       EVENT_OFF(neigh->t_expire_timer);
+       event_cancel(&neigh->t_expire_timer);
 
        /*
          0xFFFF is request for no holdtime
@@ -261,7 +261,7 @@ static void on_neighbor_jp_timer(struct event *t)
 
 static void pim_neighbor_start_jp_timer(struct pim_neighbor *neigh)
 {
-       EVENT_OFF(neigh->jp_timer);
+       event_cancel(&neigh->jp_timer);
        event_add_timer(router->master, on_neighbor_jp_timer, neigh,
                        router->t_periodic, &neigh->jp_timer);
 }
@@ -377,7 +377,7 @@ void pim_neighbor_free(struct pim_neighbor *neigh)
        delete_prefix_list(neigh);
 
        list_delete(&neigh->upstream_jp_agg);
-       EVENT_OFF(neigh->jp_timer);
+       event_cancel(&neigh->jp_timer);
 
        bfd_sess_free(&neigh->bfd_session);
 
@@ -581,7 +581,7 @@ void pim_neighbor_delete(struct interface *ifp, struct pim_neighbor *neigh,
        zlog_notice("PIM NEIGHBOR DOWN: neighbor %pPA on interface %s: %s",
                    &neigh->source_addr, ifp->name, delete_message);
 
-       EVENT_OFF(neigh->t_expire_timer);
+       event_cancel(&neigh->t_expire_timer);
 
        pim_if_assert_on_neighbor_down(ifp, neigh->source_addr);
 
index d18406d55d96d4af17a290a2d690b7205dcdcfce..c6d9222e9fba29dab4921dceaec23beee3f7a5e6 100644 (file)
@@ -167,7 +167,7 @@ void pim_clear_nocache_state(struct pim_interface *pim_ifp)
                if (*oil_incoming_vif(c_oil) != pim_ifp->mroute_vif_index)
                        continue;
 
-               EVENT_OFF(c_oil->up->t_ka_timer);
+               event_cancel(&c_oil->up->t_ka_timer);
                PIM_UPSTREAM_FLAG_UNSET_SRC_NOCACHE(c_oil->up->flags);
                PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM(c_oil->up->flags);
                pim_upstream_del(pim_ifp->pim, c_oil->up, __func__);
index fb78e390229b451243759094b697906c31f559b8..9ffbc22fe0da380cce692d6484a8c6ed8e705d57 100644 (file)
@@ -69,7 +69,7 @@ static void sock_close(struct interface *ifp)
                                pim_ifp->pim_sock_fd, ifp->name);
                }
        }
-       EVENT_OFF(pim_ifp->t_pim_sock_read);
+       event_cancel(&pim_ifp->t_pim_sock_read);
 
        if (PIM_DEBUG_PIM_TRACE) {
                if (pim_ifp->t_pim_hello_timer) {
@@ -78,7 +78,7 @@ static void sock_close(struct interface *ifp)
                                ifp->name);
                }
        }
-       EVENT_OFF(pim_ifp->t_pim_hello_timer);
+       event_cancel(&pim_ifp->t_pim_hello_timer);
 
        if (PIM_DEBUG_PIM_TRACE) {
                zlog_debug("Deleting PIM socket fd=%d on interface %s",
@@ -881,7 +881,7 @@ static void hello_resched(struct interface *ifp)
                zlog_debug("Rescheduling %d sec hello on interface %s",
                           pim_ifp->pim_hello_period, ifp->name);
        }
-       EVENT_OFF(pim_ifp->t_pim_hello_timer);
+       event_cancel(&pim_ifp->t_pim_hello_timer);
        event_add_timer(router->master, on_pim_hello_send, ifp,
                        pim_ifp->pim_hello_period, &pim_ifp->t_pim_hello_timer);
 }
@@ -983,7 +983,7 @@ void pim_hello_restart_triggered(struct interface *ifp)
                        return;
                }
 
-               EVENT_OFF(pim_ifp->t_pim_hello_timer);
+               event_cancel(&pim_ifp->t_pim_hello_timer);
        }
 
        random_msec = triggered_hello_delay_msec;
index 29e658ef16f83a6df444728936c353be6c8911ad..9b1c27df41b51374e3c312e1b30cd9e9c9852e6c 100644 (file)
@@ -756,7 +756,7 @@ void pim_reg_del_on_couldreg_fail(struct interface *ifp)
                    && (up->reg_state != PIM_REG_NOINFO)) {
                        pim_channel_del_oif(up->channel_oil, pim->regiface,
                                            PIM_OIF_FLAG_PROTO_PIM, __func__);
-                       EVENT_OFF(up->t_rs_timer);
+                       event_cancel(&up->t_rs_timer);
                        up->reg_state = PIM_REG_NOINFO;
                        PIM_UPSTREAM_FLAG_UNSET_FHR(up->flags);
                }
index 5c04284a356a036f9516387e4ec65cdaf99f589e..6a37b118863cb25c03c3d5ca024465f0d7558cc5 100644 (file)
@@ -205,7 +205,7 @@ static void ssmpingd_delete(struct ssmpingd_sock *ss)
 {
        assert(ss);
 
-       EVENT_OFF(ss->t_sock_read);
+       event_cancel(&ss->t_sock_read);
 
        if (close(ss->sock_fd)) {
                zlog_warn(
index aed9d2be9033ef456c2144dd17094a1e8b53cb74..7b96cf2f536e93e573548f50fd0dfc51ffe75f30 100644 (file)
@@ -167,10 +167,10 @@ static void upstream_channel_oil_detach(struct pim_upstream *up)
 
 static void pim_upstream_timers_stop(struct pim_upstream *up)
 {
-       EVENT_OFF(up->t_ka_timer);
-       EVENT_OFF(up->t_rs_timer);
-       EVENT_OFF(up->t_msdp_reg_timer);
-       EVENT_OFF(up->t_join_timer);
+       event_cancel(&up->t_ka_timer);
+       event_cancel(&up->t_rs_timer);
+       event_cancel(&up->t_msdp_reg_timer);
+       event_cancel(&up->t_join_timer);
 }
 
 struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
@@ -332,7 +332,7 @@ static void join_timer_stop(struct pim_upstream *up)
 {
        struct pim_neighbor *nbr = NULL;
 
-       EVENT_OFF(up->t_join_timer);
+       event_cancel(&up->t_join_timer);
 
        if (up->rpf.source_nexthop.interface)
                nbr = pim_neighbor_find(up->rpf.source_nexthop.interface,
@@ -362,7 +362,7 @@ void join_timer_start(struct pim_upstream *up)
        if (nbr)
                pim_jp_agg_add_group(nbr->upstream_jp_agg, up, 1, nbr);
        else {
-               EVENT_OFF(up->t_join_timer);
+               event_cancel(&up->t_join_timer);
                event_add_timer(router->master, on_join_timer, up,
                                router->t_periodic, &up->t_join_timer);
        }
@@ -379,7 +379,7 @@ void join_timer_start(struct pim_upstream *up)
 void pim_upstream_join_timer_restart(struct pim_upstream *up,
                                     struct pim_rpf *old)
 {
-       // EVENT_OFF(up->t_join_timer);
+       // event_cancel(&up->t_join_timer);
        join_timer_start(up);
 }
 
@@ -391,7 +391,7 @@ static void pim_upstream_join_timer_restart_msec(struct pim_upstream *up,
                           __func__, interval_msec, up->sg_str);
        }
 
-       EVENT_OFF(up->t_join_timer);
+       event_cancel(&up->t_join_timer);
        event_add_timer_msec(router->master, on_join_timer, up, interval_msec,
                             &up->t_join_timer);
 }
@@ -1386,7 +1386,7 @@ static void pim_upstream_fhr_kat_expiry(struct pim_instance *pim,
                           up->sg_str);
 
        /* stop reg-stop timer */
-       EVENT_OFF(up->t_rs_timer);
+       event_cancel(&up->t_rs_timer);
        /* remove regiface from the OIL if it is there*/
        pim_channel_del_oif(up->channel_oil, pim->regiface,
                            PIM_OIF_FLAG_PROTO_PIM, __func__);
@@ -1509,7 +1509,7 @@ void pim_upstream_keep_alive_timer_start(struct pim_upstream *up, uint32_t time)
                        zlog_debug("kat start on %s with no stream reference",
                                   up->sg_str);
        }
-       EVENT_OFF(up->t_ka_timer);
+       event_cancel(&up->t_ka_timer);
        event_add_timer(router->master, pim_upstream_keep_alive_timer, up, time,
                        &up->t_ka_timer);
 
@@ -1760,7 +1760,7 @@ static void pim_upstream_start_register_stop_timer(struct pim_upstream *up)
 {
        uint32_t time;
 
-       EVENT_OFF(up->t_rs_timer);
+       event_cancel(&up->t_rs_timer);
 
        time = router->register_probe_time;
 
@@ -1790,7 +1790,7 @@ void pim_upstream_start_register_probe_timer(struct pim_upstream *up)
 {
        uint32_t time;
 
-       EVENT_OFF(up->t_rs_timer);
+       event_cancel(&up->t_rs_timer);
 
        uint32_t lower = (0.5 * router->register_suppress_time);
        uint32_t upper = (1.5 * router->register_suppress_time);
index 7c8d71a86c3d145ad352b4f40874d7051e24cf61..d79aff27e443ea020dae714cafa83efbd00c53b2 100644 (file)
@@ -239,7 +239,7 @@ void pim_vxlan_update_sg_reg_state(struct pim_instance *pim,
                        zlog_debug("Received Register stop for %s",
                                   vxlan_sg->sg_str);
 
-               EVENT_OFF(vxlan_sg->null_register);
+               event_cancel(&vxlan_sg->null_register);
                pim_vxlan_del_work(vxlan_sg);
        }
 }
@@ -253,7 +253,7 @@ static void pim_vxlan_work_timer_cb(struct event *t)
 /* global 1second timer used for periodic processing */
 static void pim_vxlan_work_timer_setup(bool start)
 {
-       EVENT_OFF(vxlan_info.work_timer);
+       event_cancel(&vxlan_info.work_timer);
        if (start)
                event_add_timer(router->master, pim_vxlan_work_timer_cb, NULL,
                                PIM_VXLAN_WORK_TIME, &vxlan_info.work_timer);
@@ -300,7 +300,7 @@ static void pim_vxlan_orig_mr_up_del(struct pim_vxlan_sg *vxlan_sg)
                 * if there are no other references.
                 */
                if (PIM_UPSTREAM_FLAG_TEST_SRC_STREAM(up->flags)) {
-                       EVENT_OFF(up->t_ka_timer);
+                       event_cancel(&up->t_ka_timer);
                        up = pim_upstream_keep_alive_timer_proc(up);
                } else {
                        /* this is really unexpected as we force vxlan
@@ -842,7 +842,7 @@ static void pim_vxlan_sg_del_item(struct pim_vxlan_sg *vxlan_sg)
 {
        vxlan_sg->flags |= PIM_VXLAN_SGF_DEL_IN_PROG;
 
-       EVENT_OFF(vxlan_sg->null_register);
+       event_cancel(&vxlan_sg->null_register);
        pim_vxlan_del_work(vxlan_sg);
 
        if (pim_vxlan_is_orig_mroute(vxlan_sg))
index b8f73f91837629bf66c6faa5922c0a1399faa41b..dead5bcc378ecf66a2a3bf0da581466526efb038 100644 (file)
@@ -114,7 +114,7 @@ static void zclient_lookup_failed(struct zclient *zlookup)
 
 void zclient_lookup_free(void)
 {
-       EVENT_OFF(zlookup_read);
+       event_cancel(&zlookup_read);
        zclient_stop(pim_zlookup);
        zclient_free(pim_zlookup);
        pim_zlookup = NULL;
index 486d7b05c208958853e01b63d5387e6bf311d13e..107155c79561c472c044f696559dbabdcab7e578 100644 (file)
@@ -383,7 +383,7 @@ static void rip_interface_clean(struct rip_interface *ri)
        ri->enable_interface = 0;
        ri->running = 0;
 
-       EVENT_OFF(ri->t_wakeup);
+       event_cancel(&ri->t_wakeup);
 }
 
 void rip_interfaces_clean(struct rip *rip)
@@ -443,7 +443,7 @@ int rip_if_down(struct interface *ifp)
 
        ri = ifp->info;
 
-       EVENT_OFF(ri->t_wakeup);
+       event_cancel(&ri->t_wakeup);
 
        rip = ri->rip;
        if (rip) {
index 5d3d7145b1d4d602e3a9a99f8e43307d5fd0d651..d746773204190ae654dac92924fd267373ad975a 100644 (file)
@@ -51,8 +51,8 @@ static void clear_rip_route(struct rip *rip)
                }
 
                if (rinfo) {
-                       EVENT_OFF(rinfo->t_timeout);
-                       EVENT_OFF(rinfo->t_garbage_collect);
+                       event_cancel(&rinfo->t_timeout);
+                       event_cancel(&rinfo->t_garbage_collect);
                        listnode_delete(list, rinfo);
                        rip_info_free(rinfo);
                }
index 7e848bee474520ad3889160473a54f3224bba292..46fa3ade32ef7f9dd32b5f489f2fee5a193b2c89 100644 (file)
@@ -27,7 +27,7 @@ static struct rip_peer *rip_peer_new(void)
 void rip_peer_free(struct rip_peer *peer)
 {
        bfd_sess_free(&peer->bfd_session);
-       EVENT_OFF(peer->t_timeout);
+       event_cancel(&peer->t_timeout);
        XFREE(MTYPE_RIP_PEER, peer);
 }
 
@@ -74,7 +74,7 @@ static struct rip_peer *rip_peer_get(struct rip *rip, struct rip_interface *ri,
        peer = rip_peer_lookup(rip, addr);
 
        if (peer) {
-               EVENT_OFF(peer->t_timeout);
+               event_cancel(&peer->t_timeout);
        } else {
                peer = rip_peer_new();
                peer->rip = rip;
@@ -189,8 +189,8 @@ void rip_peer_delete_routes(const struct rip_peer *peer)
                                continue;
 
                        if (listcount(list) == 1) {
-                               EVENT_OFF(route_entry->t_timeout);
-                               EVENT_OFF(route_entry->t_garbage_collect);
+                               event_cancel(&route_entry->t_timeout);
+                               event_cancel(&route_entry->t_garbage_collect);
                                listnode_delete(list, route_entry);
                                if (list_isempty(list)) {
                                        list_delete((struct list **)&route_node
index c850df52ec2f5618e266ae49e4f7a1dd7f7a991c..1ba9b589d273b0ae0ce7520f400fb1f1c9f4e1d5 100644 (file)
@@ -137,7 +137,7 @@ static void rip_garbage_collect(struct event *t)
        rinfo = EVENT_ARG(t);
 
        /* Off timeout timer. */
-       EVENT_OFF(rinfo->t_timeout);
+       event_cancel(&rinfo->t_timeout);
 
        /* Get route_node pointer. */
        rp = rinfo->rp;
@@ -249,14 +249,14 @@ struct rip_info *rip_ecmp_replace(struct rip *rip, struct rip_info *rinfo_new)
                if (tmp_rinfo == rinfo)
                        continue;
 
-               EVENT_OFF(tmp_rinfo->t_timeout);
-               EVENT_OFF(tmp_rinfo->t_garbage_collect);
+               event_cancel(&tmp_rinfo->t_timeout);
+               event_cancel(&tmp_rinfo->t_garbage_collect);
                list_delete_node(list, node);
                rip_info_free(tmp_rinfo);
        }
 
-       EVENT_OFF(rinfo->t_timeout);
-       EVENT_OFF(rinfo->t_garbage_collect);
+       event_cancel(&rinfo->t_timeout);
+       event_cancel(&rinfo->t_garbage_collect);
        memcpy(rinfo, rinfo_new, sizeof(struct rip_info));
 
        if (rip_route_rte(rinfo)) {
@@ -291,12 +291,12 @@ struct rip_info *rip_ecmp_delete(struct rip *rip, struct rip_info *rinfo)
        rp = rinfo->rp;
        list = (struct list *)rp->info;
 
-       EVENT_OFF(rinfo->t_timeout);
+       event_cancel(&rinfo->t_timeout);
 
        if (listcount(list) > 1) {
                /* Some other ECMP entries still exist. Just delete this entry.
                 */
-               EVENT_OFF(rinfo->t_garbage_collect);
+               event_cancel(&rinfo->t_garbage_collect);
                listnode_delete(list, rinfo);
                if (rip_route_rte(rinfo)
                    && CHECK_FLAG(rinfo->flags, RIP_RTF_FIB))
@@ -342,7 +342,7 @@ static void rip_timeout(struct event *t)
 static void rip_timeout_update(struct rip *rip, struct rip_info *rinfo)
 {
        if (rinfo->metric != RIP_METRIC_INFINITY) {
-               EVENT_OFF(rinfo->t_timeout);
+               event_cancel(&rinfo->t_timeout);
                event_add_timer(master, rip_timeout, rinfo, rip->timeout_time,
                                &rinfo->t_timeout);
        }
@@ -687,8 +687,8 @@ static void rip_rte_process(struct rte *rte, struct sockaddr_in *from,
                                        assert(newinfo.metric
                                               != RIP_METRIC_INFINITY);
 
-                                       EVENT_OFF(rinfo->t_timeout);
-                                       EVENT_OFF(rinfo->t_garbage_collect);
+                                       event_cancel(&rinfo->t_timeout);
+                                       event_cancel(&rinfo->t_garbage_collect);
                                        memcpy(rinfo, &newinfo,
                                               sizeof(struct rip_info));
                                        rip_timeout_update(rip, rinfo);
@@ -1651,7 +1651,7 @@ void rip_redistribute_delete(struct rip *rip, int type, int sub_type,
                                RIP_TIMER_ON(rinfo->t_garbage_collect,
                                             rip_garbage_collect,
                                             rip->garbage_time);
-                               EVENT_OFF(rinfo->t_timeout);
+                               event_cancel(&rinfo->t_timeout);
                                rinfo->flags |= RIP_RTF_CHANGED;
 
                                if (IS_RIP_DEBUG_EVENT)
@@ -2542,7 +2542,7 @@ static void rip_update(struct event *t)
 
        /* Triggered updates may be suppressed if a regular update is due by
           the time the triggered update would be sent. */
-       EVENT_OFF(rip->t_triggered_interval);
+       event_cancel(&rip->t_triggered_interval);
        rip->trigger = 0;
 
        /* Register myself. */
@@ -2589,7 +2589,7 @@ static void rip_triggered_update(struct event *t)
        int interval;
 
        /* Cancel interval timer. */
-       EVENT_OFF(rip->t_triggered_interval);
+       event_cancel(&rip->t_triggered_interval);
        rip->trigger = 0;
 
        /* Logging triggered update. */
@@ -2639,7 +2639,7 @@ void rip_redistribute_withdraw(struct rip *rip, int type)
                rinfo->metric = RIP_METRIC_INFINITY;
                RIP_TIMER_ON(rinfo->t_garbage_collect, rip_garbage_collect,
                             rip->garbage_time);
-               EVENT_OFF(rinfo->t_timeout);
+               event_cancel(&rinfo->t_timeout);
                rinfo->flags |= RIP_RTF_CHANGED;
 
                if (IS_RIP_DEBUG_EVENT) {
@@ -2850,7 +2850,7 @@ void rip_event(struct rip *rip, enum rip_event event, int sock)
                event_add_read(master, rip_read, rip, sock, &rip->t_read);
                break;
        case RIP_UPDATE_EVENT:
-               EVENT_OFF(rip->t_update);
+               event_cancel(&rip->t_update);
                jitter = rip_update_jitter(rip->update_time);
                event_add_timer(master, rip_update, rip,
                                sock ? 2 : rip->update_time + jitter,
@@ -2975,8 +2975,8 @@ void rip_ecmp_disable(struct rip *rip)
                        if (tmp_rinfo == rinfo)
                                continue;
 
-                       EVENT_OFF(tmp_rinfo->t_timeout);
-                       EVENT_OFF(tmp_rinfo->t_garbage_collect);
+                       event_cancel(&tmp_rinfo->t_timeout);
+                       event_cancel(&tmp_rinfo->t_garbage_collect);
                        list_delete_node(list, node);
                        rip_info_free(tmp_rinfo);
                }
@@ -3530,8 +3530,8 @@ static void rip_instance_disable(struct rip *rip)
                        rip_zebra_ipv4_delete(rip, rp);
 
                for (ALL_LIST_ELEMENTS_RO(list, listnode, rinfo)) {
-                       EVENT_OFF(rinfo->t_timeout);
-                       EVENT_OFF(rinfo->t_garbage_collect);
+                       event_cancel(&rinfo->t_timeout);
+                       event_cancel(&rinfo->t_garbage_collect);
                        rip_info_free(rinfo);
                }
                list_delete(&list);
@@ -3543,12 +3543,12 @@ static void rip_instance_disable(struct rip *rip)
        rip_redistribute_disable(rip);
 
        /* Cancel RIP related timers. */
-       EVENT_OFF(rip->t_update);
-       EVENT_OFF(rip->t_triggered_update);
-       EVENT_OFF(rip->t_triggered_interval);
+       event_cancel(&rip->t_update);
+       event_cancel(&rip->t_triggered_update);
+       event_cancel(&rip->t_triggered_interval);
 
        /* Cancel read thread. */
-       EVENT_OFF(rip->t_read);
+       event_cancel(&rip->t_read);
 
        /* Close RIP socket. */
        close(rip->sock);
index 2b5d745bf49e065dd0467bf0ed809c29db77480f..a1ecdd6d2eeea92f4354875bfaa8335c70594a4d 100644 (file)
@@ -146,7 +146,7 @@ static int ripng_if_down(struct interface *ifp)
 
        ri = ifp->info;
 
-       EVENT_OFF(ri->t_wakeup);
+       event_cancel(&ri->t_wakeup);
 
        ripng = ri->ripng;
 
@@ -267,7 +267,7 @@ void ripng_interface_clean(struct ripng *ripng)
                ri->enable_interface = 0;
                ri->running = 0;
 
-               EVENT_OFF(ri->t_wakeup);
+               event_cancel(&ri->t_wakeup);
        }
 }
 
index 5498bbfc8e389078b0ece6b677d7b8a4fa8bbff4..0eae5738b2b2850636b8350d4d9af39938854411 100644 (file)
@@ -53,8 +53,8 @@ static void clear_ripng_route(struct ripng *ripng)
                }
 
                if (rinfo) {
-                       EVENT_OFF(rinfo->t_timeout);
-                       EVENT_OFF(rinfo->t_garbage_collect);
+                       event_cancel(&rinfo->t_timeout);
+                       event_cancel(&rinfo->t_garbage_collect);
                        listnode_delete(list, rinfo);
                        ripng_info_free(rinfo);
                }
index 247bac46971bfcff83279b8153f4efab5edd164e..c745e363ff436649045f13872723d3ec748ae189 100644 (file)
@@ -29,7 +29,7 @@ static struct ripng_peer *ripng_peer_new(void)
 
 static void ripng_peer_free(struct ripng_peer *peer)
 {
-       EVENT_OFF(peer->t_timeout);
+       event_cancel(&peer->t_timeout);
        XFREE(MTYPE_RIPNG_PEER, peer);
 }
 
@@ -79,7 +79,7 @@ static struct ripng_peer *ripng_peer_get(struct ripng *ripng,
        peer = ripng_peer_lookup(ripng, addr);
 
        if (peer) {
-               EVENT_OFF(peer->t_timeout);
+               event_cancel(&peer->t_timeout);
        } else {
                peer = ripng_peer_new();
                peer->ripng = ripng;
index 0aa2a9e486fbf4bb86ec5d4b620e77b09cf337ce..9e14f11f2574bbcbc54b6c38cbc53131236f13f4 100644 (file)
@@ -416,7 +416,7 @@ static void ripng_garbage_collect(struct event *t)
        rinfo = EVENT_ARG(t);
 
        /* Off timeout timer. */
-       EVENT_OFF(rinfo->t_timeout);
+       event_cancel(&rinfo->t_timeout);
 
        /* Get route_node pointer. */
        rp = rinfo->rp;
@@ -563,14 +563,14 @@ struct ripng_info *ripng_ecmp_replace(struct ripng *ripng,
        /* Re-use the first entry, and delete the others. */
        for (ALL_LIST_ELEMENTS(list, node, nextnode, tmp_rinfo))
                if (tmp_rinfo != rinfo) {
-                       EVENT_OFF(tmp_rinfo->t_timeout);
-                       EVENT_OFF(tmp_rinfo->t_garbage_collect);
+                       event_cancel(&tmp_rinfo->t_timeout);
+                       event_cancel(&tmp_rinfo->t_garbage_collect);
                        list_delete_node(list, node);
                        ripng_info_free(tmp_rinfo);
                }
 
-       EVENT_OFF(rinfo->t_timeout);
-       EVENT_OFF(rinfo->t_garbage_collect);
+       event_cancel(&rinfo->t_timeout);
+       event_cancel(&rinfo->t_garbage_collect);
        memcpy(rinfo, rinfo_new, sizeof(struct ripng_info));
 
        if (ripng_route_rte(rinfo)) {
@@ -602,7 +602,7 @@ struct ripng_info *ripng_ecmp_delete(struct ripng *ripng,
        struct agg_node *rp = rinfo->rp;
        struct list *list = (struct list *)rp->info;
 
-       EVENT_OFF(rinfo->t_timeout);
+       event_cancel(&rinfo->t_timeout);
 
        if (rinfo->metric != RIPNG_METRIC_INFINITY)
                ripng_aggregate_decrement(rp, rinfo);
@@ -610,7 +610,7 @@ struct ripng_info *ripng_ecmp_delete(struct ripng *ripng,
        if (listcount(list) > 1) {
                /* Some other ECMP entries still exist. Just delete this entry.
                 */
-               EVENT_OFF(rinfo->t_garbage_collect);
+               event_cancel(&rinfo->t_garbage_collect);
                listnode_delete(list, rinfo);
                if (ripng_route_rte(rinfo) &&
                    CHECK_FLAG(rinfo->flags, RIPNG_RTF_FIB))
@@ -656,7 +656,7 @@ static void ripng_timeout(struct event *t)
 static void ripng_timeout_update(struct ripng *ripng, struct ripng_info *rinfo)
 {
        if (rinfo->metric != RIPNG_METRIC_INFINITY) {
-               EVENT_OFF(rinfo->t_timeout);
+               event_cancel(&rinfo->t_timeout);
                event_add_timer(master, ripng_timeout, rinfo,
                                ripng->timeout_time, &rinfo->t_timeout);
        }
@@ -1064,7 +1064,7 @@ void ripng_redistribute_delete(struct ripng *ripng, int type, int sub_type,
                                RIPNG_TIMER_ON(rinfo->t_garbage_collect,
                                               ripng_garbage_collect,
                                               ripng->garbage_time);
-                               EVENT_OFF(rinfo->t_timeout);
+                               event_cancel(&rinfo->t_timeout);
 
                                /* Aggregate count decrement. */
                                ripng_aggregate_decrement(rp, rinfo);
@@ -1103,7 +1103,7 @@ void ripng_redistribute_withdraw(struct ripng *ripng, int type)
                                RIPNG_TIMER_ON(rinfo->t_garbage_collect,
                                               ripng_garbage_collect,
                                               ripng->garbage_time);
-                               EVENT_OFF(rinfo->t_timeout);
+                               event_cancel(&rinfo->t_timeout);
 
                                /* Aggregate count decrement. */
                                ripng_aggregate_decrement(rp, rinfo);
@@ -1487,7 +1487,7 @@ static void ripng_update(struct event *t)
 
        /* Triggered updates may be suppressed if a regular update is due by
           the time the triggered update would be sent. */
-       EVENT_OFF(ripng->t_triggered_interval);
+       event_cancel(&ripng->t_triggered_interval);
        ripng->trigger = 0;
 
        /* Reset flush event. */
@@ -1514,7 +1514,7 @@ void ripng_triggered_update(struct event *t)
        int interval;
 
        /* Cancel interval timer. */
-       EVENT_OFF(ripng->t_triggered_interval);
+       event_cancel(&ripng->t_triggered_interval);
        ripng->trigger = 0;
 
        /* Logging triggered update. */
@@ -1958,7 +1958,7 @@ void ripng_event(struct ripng *ripng, enum ripng_event event, int sock)
                event_add_read(master, ripng_read, ripng, sock, &ripng->t_read);
                break;
        case RIPNG_UPDATE_EVENT:
-               EVENT_OFF(ripng->t_update);
+               event_cancel(&ripng->t_update);
 
                /* Update timer jitter. */
                jitter = ripng_update_jitter(ripng->update_time);
@@ -2254,8 +2254,8 @@ void ripng_ecmp_disable(struct ripng *ripng)
                        /* Drop all other entries, except the first one. */
                        for (ALL_LIST_ELEMENTS(list, node, nextnode, tmp_rinfo))
                                if (tmp_rinfo != rinfo) {
-                                       EVENT_OFF(tmp_rinfo->t_timeout);
-                                       EVENT_OFF(tmp_rinfo->t_garbage_collect);
+                                       event_cancel(&tmp_rinfo->t_timeout);
+                                       event_cancel(&tmp_rinfo->t_garbage_collect);
                                        list_delete_node(list, node);
                                        ripng_info_free(tmp_rinfo);
                                }
@@ -2532,8 +2532,8 @@ static void ripng_instance_disable(struct ripng *ripng)
                                ripng_zebra_ipv6_delete(ripng, rp);
 
                        for (ALL_LIST_ELEMENTS_RO(list, listnode, rinfo)) {
-                               EVENT_OFF(rinfo->t_timeout);
-                               EVENT_OFF(rinfo->t_garbage_collect);
+                               event_cancel(&rinfo->t_timeout);
+                               event_cancel(&rinfo->t_garbage_collect);
                                ripng_info_free(rinfo);
                        }
                        list_delete(&list);
@@ -2552,12 +2552,12 @@ static void ripng_instance_disable(struct ripng *ripng)
        ripng_redistribute_disable(ripng);
 
        /* Cancel the RIPng timers */
-       EVENT_OFF(ripng->t_update);
-       EVENT_OFF(ripng->t_triggered_update);
-       EVENT_OFF(ripng->t_triggered_interval);
+       event_cancel(&ripng->t_update);
+       event_cancel(&ripng->t_triggered_update);
+       event_cancel(&ripng->t_triggered_interval);
 
        /* Cancel the read thread */
-       EVENT_OFF(ripng->t_read);
+       event_cancel(&ripng->t_read);
 
        /* Close the RIPng socket */
        if (ripng->sock >= 0) {