/* BGP connect retry timer. */ static int bgp_connect_timer (struct thread *thread) { struct peer *peer; peer = THREAD_ARG (thread); peer->t_connect = NULL; if (BGP_DEBUG (fsm, FSM)) zlog (peer->log, LOG_DEBUG, "%s [FSM] Timer (connect timer expire)", peer->host); THREAD_VAL (thread) = ConnectRetry_timer_expired; bgp_event (thread); /* bgp_event unlocks peer */ return 0; }
/* BGP start timer. This function set BGP_Start event to thread value and process event. */ static int bgp_start_timer (struct thread *thread) { struct peer *peer; peer = THREAD_ARG (thread); peer->t_start = NULL; if (BGP_DEBUG (fsm, FSM)) zlog (peer->log, LOG_DEBUG, "%s [FSM] Timer (start timer expire).", peer->host); THREAD_VAL (thread) = BGP_Start; bgp_event (thread); /* bgp_event unlocks peer */ return 0; }
/* BGP keepalive fire ! */ static int bgp_keepalive_timer (struct thread *thread) { struct peer *peer; peer = THREAD_ARG (thread); peer->t_keepalive = NULL; if (BGP_DEBUG (fsm, FSM)) zlog (peer->log, LOG_DEBUG, "%s [FSM] Timer (keepalive timer expire)", peer->host); THREAD_VAL (thread) = KeepAlive_timer_expired; bgp_event (thread); /* bgp_event unlocks peer */ return 0; }
/* BGP holdtime timer. */ static int bgp_holdtime_timer (struct thread *thread) { struct peer *peer; peer = THREAD_ARG (thread); peer->t_holdtime = NULL; if (BGP_DEBUG (fsm, FSM)) zlog (peer->log, LOG_DEBUG, "%s [FSM] Timer (holdtime timer expire)", peer->host); THREAD_VAL (thread) = Hold_Timer_expired; bgp_event (thread); return 0; }
/* BGP start timer. This function set BGP_Start event to thread value and process event. */ static int bgp_start_timer (struct thread *thread) { struct peer *peer; peer = THREAD_ARG (thread); peer->t_start = NULL; UNSET_FLAG (peer->sflags, PEER_STATUS_CREATE_INIT); if (BGP_DEBUG (fsm, FSM)) zlog (peer->log, LOG_DEBUG, "%s [FSM] Timer (start timer expire).", peer->host); THREAD_VAL (thread) = BGP_Start; bgp_event (thread); return 0; }