]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_fsm.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / bgpd / bgp_fsm.h
index 12cbad3eb83b0e164a70888fa92268ff5b0fb606..bd1a6adfe8740a57a4f225e97480b2d169710e2a 100644 (file)
@@ -1,22 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* BGP-4 Finite State Machine
  * From RFC1771 [A Border Gateway Protocol 4 (BGP-4)]
  * Copyright (C) 1998 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef _QUAGGA_BGP_FSM_H
                        thread_add_timer(bm->master, (F), peer, (V), &(T));    \
        } while (0)
 
-#define BGP_TIMER_OFF(T)                                                       \
-       do {                                                                   \
-               THREAD_OFF((T));                                               \
-       } while (0)
-
 #define BGP_EVENT_ADD(P, E)                                                    \
        do {                                                                   \
                if ((P)->status != Deleted)                                    \
         && CHECK_FLAG(peer->cap, PEER_CAP_RESTART_RCV))
 
 #define BGP_PEER_RESTARTING_MODE(peer)                                         \
-       (CHECK_FLAG(peer->flags, PEER_FLAG_GRACEFUL_RESTART)                   \
-        && CHECK_FLAG(peer->cap, PEER_CAP_RESTART_BIT_ADV)                    \
-        && !CHECK_FLAG(peer->cap, PEER_CAP_RESTART_BIT_RCV))
+       (CHECK_FLAG(peer->flags, PEER_FLAG_GRACEFUL_RESTART) &&                \
+        CHECK_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_ADV) &&         \
+        !CHECK_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_RCV))
 
 #define BGP_PEER_HELPER_MODE(peer)                                             \
-       (CHECK_FLAG(peer->flags, PEER_FLAG_GRACEFUL_RESTART_HELPER)            \
-        && CHECK_FLAG(peer->cap, PEER_CAP_RESTART_BIT_RCV)                    \
-        && !CHECK_FLAG(peer->cap, PEER_CAP_RESTART_BIT_ADV))
+       (CHECK_FLAG(peer->flags, PEER_FLAG_GRACEFUL_RESTART_HELPER) &&         \
+        CHECK_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_RCV) &&         \
+        !CHECK_FLAG(peer->cap, PEER_CAP_GRACEFUL_RESTART_R_BIT_ADV))
 
 /* Prototypes. */
 
  * Update FSM for peer based on whether we have valid nexthops or not.
  */
 extern void bgp_fsm_nht_update(struct peer *peer, bool has_valid_nexthops);
-extern int bgp_event(struct thread *);
+extern void bgp_event(struct thread *);
 extern int bgp_event_update(struct peer *, enum bgp_fsm_events event);
 extern int bgp_stop(struct peer *peer);
 extern void bgp_timer_set(struct peer *);
-extern int bgp_routeadv_timer(struct thread *);
-extern void bgp_fsm_change_status(struct peer *peer, int status);
+extern void bgp_routeadv_timer(struct thread *);
+extern void bgp_fsm_change_status(struct peer *peer,
+                                 enum bgp_fsm_status status);
 extern const char *const peer_down_str[];
 extern void bgp_update_delay_end(struct bgp *);
 extern void bgp_maxmed_update(struct bgp *);