Rework stats to store handles to the counters

This commit is contained in:
Tim Wojtulewicz 2021-04-19 10:38:43 -07:00
parent 63fd1611ca
commit ca553fda27
4 changed files with 94 additions and 53 deletions

View file

@ -132,6 +132,17 @@ public:
analyzer::Analyzer* FindAnalyzer(const char* name); // find first in tree.
TransportProto ConnTransport() const { return proto; }
std::string TransportIdentifier() const override
{
if ( proto == TRANSPORT_TCP )
return "tcp";
else if ( proto == TRANSPORT_UDP )
return "udp";
else if ( proto == TRANSPORT_ICMP )
return "icmp";
else
return "unknown";
}
// FIXME: Now this is in Analyzer and should eventually be removed here.
//