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