summaryrefslogtreecommitdiff
path: root/bgpd/bgpd.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-06-03 17:13:52 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-08-18 09:29:04 -0400
commite20c23fa5b06f1dcef4e99df5099e55251d9d9bd (patch)
tree778b6c5e4e80c6970f0a1973ae7c597c20631552 /bgpd/bgpd.h
parent71d72c4998d6984e43411535eaa2a5b8c0e33d06 (diff)
bgpd: Move status and ostatus to `struct peer_connection`
The status and ostatus are a function of the `struct peer_connection` move it into that data structure. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r--bgpd/bgpd.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index dcee9caec8..5215c6a08d 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -1123,6 +1123,10 @@ struct llgr_info {
struct peer_connection {
struct peer *peer;
+ /* Status of the peer connection. */
+ enum bgp_fsm_status status;
+ enum bgp_fsm_status ostatus;
+
int fd;
/* Packet receive and send buffer. */
@@ -1187,10 +1191,6 @@ struct peer {
/* the doppelganger peer structure, due to dual TCP conn setup */
struct peer *doppelganger;
- /* Status of the peer. */
- enum bgp_fsm_status status;
- enum bgp_fsm_status ostatus;
-
/* FSM events, stored for debug purposes.
* Note: uchar used for reduced memory usage.
*/
@@ -2594,7 +2594,7 @@ static inline char *timestamp_string(time_t ts)
static inline bool peer_established(struct peer *peer)
{
- return peer->status == Established;
+ return peer->connection.status == Established;
}
static inline bool peer_dynamic_neighbor(struct peer *peer)