OpenSDN source code
peer_stats.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef SRC_BGP_PEER_STATS_H_
7 #define SRC_BGP_PEER_STATS_H_
8 
9 #include "bgp/bgp_peer_types.h"
10 #include "bgp/ipeer.h"
11 
12 class PeerStats {
13 public:
14  static void FillPeerDebugStats(const IPeerDebugStats *peer_stats,
15  PeerStatsInfo *stats);
16  static void FillPeerUpdateStats(const IPeerDebugStats *peer_stats,
17  PeerStatsData *peer_stats_data);
18 
19 private:
20  static void FillProtoStats(const IPeerDebugStats::ProtoStats &stats,
21  PeerProtoStats *proto_stats);
22  static void FillRouteUpdateStats(const IPeerDebugStats::UpdateStats &stats,
23  PeerUpdateStats *rt_stats);
24  static void FillRxErrorStats(const IPeerDebugStats::RxErrorStats &src,
25  PeerRxErrorStats *dest);
26  static void FillRxRouteStats(const IPeerDebugStats::RxRouteStats &src,
27  PeerRxRouteStats *dest);
28  static void FillPeerUpdateStats(const IPeerDebugStats *peer_stats,
29  PeerUpdateStats *rt_stats_rx,
30  PeerUpdateStats *rt_stats_tx);
31 };
32 
33 #endif // SRC_BGP_PEER_STATS_H_
static void FillRouteUpdateStats(const IPeerDebugStats::UpdateStats &stats, PeerUpdateStats *rt_stats)
Definition: peer_stats.cc:19
static void FillPeerUpdateStats(const IPeerDebugStats *peer_stats, PeerStatsData *peer_stats_data)
Definition: peer_stats.cc:55
static void FillRxErrorStats(const IPeerDebugStats::RxErrorStats &src, PeerRxErrorStats *dest)
Definition: peer_stats.cc:26
static void FillProtoStats(const IPeerDebugStats::ProtoStats &stats, PeerProtoStats *proto_stats)
Definition: peer_stats.cc:8
static void FillRxRouteStats(const IPeerDebugStats::RxRouteStats &src, PeerRxRouteStats *dest)
Definition: peer_stats.cc:36
static void FillPeerDebugStats(const IPeerDebugStats *peer_stats, PeerStatsInfo *stats)
Definition: peer_stats.cc:65