static enum bgp_fsm_state_progress
bgp_fsm_open(struct peer_connection *connection)
{
- struct peer *peer = connection->peer;
-
/* If DelayOpen is active, we may still need to send an open message */
if ((connection->status == Connect) || (connection->status == Active))
bgp_open_send(connection);
/* Send keepalive and make keepalive timer */
- bgp_keepalive_send(peer);
+ bgp_keepalive_send(connection);
return BGP_FSM_SUCCESS;
}
zlog_debug("%s [FSM] Timer (keepalive timer expire)",
pkat->peer->host);
- bgp_keepalive_send(pkat->peer);
+ bgp_keepalive_send(pkat->peer->connection);
monotime(&pkat->last);
memset(&elapsed, 0, sizeof(elapsed));
diff = ka;
/*
* Creates a BGP Keepalive packet and appends it to the peer's output queue.
*/
-void bgp_keepalive_send(struct peer *peer)
+void bgp_keepalive_send(struct peer_connection *connection)
{
struct stream *s;
/* Dump packet if debug option is set. */
/* bgp_packet_dump (s); */
- if (bgp_debug_keepalive(peer))
- zlog_debug("%s sending KEEPALIVE", peer->host);
+ if (bgp_debug_keepalive(connection->peer))
+ zlog_debug("%s sending KEEPALIVE", connection->peer->host);
/* Add packet to the peer. */
- bgp_packet_add(peer->connection, peer, s);
+ bgp_packet_add(connection, connection->peer, s);
- bgp_writes_on(peer->connection);
+ bgp_writes_on(connection);
}
struct stream *bgp_open_make(struct peer *peer, uint16_t send_holdtime, as_t local_as,
} while (0)
/* Packet send and receive function prototypes. */
-extern void bgp_keepalive_send(struct peer *peer);
+extern void bgp_keepalive_send(struct peer_connection *connection);
extern struct stream *bgp_open_make(struct peer *peer, uint16_t send_holdtime, as_t local_as,
struct in_addr *id);
extern void bgp_open_send(struct peer_connection *connection);