paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* BGP-4 Finite State Machine |
| 2 | From RFC1771 [A Border Gateway Protocol 4 (BGP-4)] |
| 3 | Copyright (C) 1998 Kunihiro Ishiguro |
| 4 | |
| 5 | This file is part of GNU Zebra. |
| 6 | |
| 7 | GNU Zebra is free software; you can redistribute it and/or modify it |
| 8 | under the terms of the GNU General Public License as published by the |
| 9 | Free Software Foundation; either version 2, or (at your option) any |
| 10 | later version. |
| 11 | |
| 12 | GNU Zebra is distributed in the hope that it will be useful, but |
| 13 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Zebra; see the file COPYING. If not, write to the Free |
| 19 | Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 20 | 02111-1307, USA. */ |
| 21 | |
| 22 | /* Macro for BGP read, write and timer thread. */ |
| 23 | #define BGP_READ_ON(T,F,V) THREAD_READ_ON(master,T,F,peer,V) |
| 24 | #define BGP_READ_OFF(X) THREAD_READ_OFF(X) |
| 25 | |
| 26 | #define BGP_WRITE_ON(T,F,V) THREAD_WRITE_ON(master,T,F,peer,V) |
| 27 | #define BGP_WRITE_OFF(X) THREAD_WRITE_OFF(X) |
| 28 | |
| 29 | #define BGP_TIMER_ON(T,F,V) THREAD_TIMER_ON(master,T,F,peer,V) |
| 30 | #define BGP_TIMER_OFF(X) THREAD_TIMER_OFF(X) |
| 31 | |
| 32 | #define BGP_EVENT_ADD(P,E) \ |
| 33 | thread_add_event (master, bgp_event, (P), (E)) |
| 34 | |
| 35 | #define BGP_EVENT_DELETE(P) \ |
| 36 | thread_cancel_event (master, (P)) |
| 37 | |
| 38 | /* Prototypes. */ |
| 39 | int bgp_event (struct thread *); |
| 40 | int bgp_stop (struct peer *peer); |
| 41 | void bgp_timer_set (struct peer *); |
| 42 | void bgp_fsm_change_status (struct peer *peer, int status); |
hasso | e0701b7 | 2004-05-20 09:19:34 +0000 | [diff] [blame^] | 43 | extern char *peer_down_str[]; |