diff options
Diffstat (limited to 'bgpd/bgp_io.h')
| -rw-r--r-- | bgpd/bgp_io.h | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/bgpd/bgp_io.h b/bgpd/bgp_io.h index 4c92373c2d..8d481129e5 100644 --- a/bgpd/bgp_io.h +++ b/bgpd/bgp_io.h @@ -14,6 +14,8 @@ #include "bgpd/bgpd.h" #include "frr_pthread.h" +struct peer_connection; + /** * Start function for write thread. * @@ -33,57 +35,57 @@ extern int bgp_io_stop(void **result, struct frr_pthread *fpt); /** * Turns on packet writing for a peer. * - * After this function is called, any packets placed on peer->obuf will be - * written to peer->fd until no more packets remain. + * After this function is called, any packets placed on connection->obuf will be + * written to connection->fd until no more packets remain. * - * Additionally, it becomes unsafe to perform socket actions on peer->fd. + * Additionally, it becomes unsafe to perform socket actions on connection->fd. * * @param peer - peer to register */ -extern void bgp_writes_on(struct peer *peer); +extern void bgp_writes_on(struct peer_connection *peer); /** * Turns off packet writing for a peer. * - * After this function returns, packets placed on peer->obuf will not be - * written to peer->fd by the I/O thread. + * After this function returns, packets placed on connection->obuf will not be + * written to connection->fd by the I/O thread. * * After this function returns it becomes safe to perform socket actions on - * peer->fd. + * connection->fd. * - * @param peer - peer to deregister + * @param connection - connection to deregister * @param flush - as described */ -extern void bgp_writes_off(struct peer *peer); +extern void bgp_writes_off(struct peer_connection *connection); /** * Turns on packet reading for a peer. * - * After this function is called, any packets received on peer->fd will be read - * and copied into the FIFO queue peer->ibuf. + * After this function is called, any packets received on connection->fd + * will be read and copied into the FIFO queue connection->ibuf. * - * Additionally, it becomes unsafe to perform socket actions on peer->fd. + * Additionally, it becomes unsafe to perform socket actions on connection->fd. * - * Whenever one or more packets are placed onto peer->ibuf, a task of type + * Whenever one or more packets are placed onto connection->ibuf, a task of type * THREAD_EVENT will be placed on the main thread whose handler is * * bgp_packet.c:bgp_process_packet() * - * @param peer - peer to register + * @param connection - The connection to register */ -extern void bgp_reads_on(struct peer *peer); +extern void bgp_reads_on(struct peer_connection *connection); /** * Turns off packet reading for a peer. * - * After this function is called, any packets received on peer->fd will not be - * read by the I/O thread. + * After this function is called, any packets received on connection->fd + * will not be read by the I/O thread. * * After this function returns it becomes safe to perform socket actions on - * peer->fd. + * connection->fd. * - * @param peer - peer to deregister + * @param connection - The connection to register for */ -extern void bgp_reads_off(struct peer *peer); +extern void bgp_reads_off(struct peer_connection *connection); #endif /* _FRR_BGP_IO_H */ |
