Review cleanup

- Add constructors for ConnIDKey, remove BuildConnIDKey()
- Rename protocol stats classes and move to implementation file
- Rename "num" field of protocol stats to "active"
- Explicitly delete copy operations for SessionKey
- Change argument for ProtocolStats methods to const-reference
- Make key validity methods in Session not be virtual
- Rename Session::ClearKey and Session::IsKeyValid
This commit is contained in:
Tim Wojtulewicz 2021-04-23 14:27:16 -07:00
parent ca553fda27
commit c8844677f1
9 changed files with 142 additions and 140 deletions

View file

@ -116,8 +116,6 @@ public:
const detail::ConnIDKey& Key() const { return key; }
detail::SessionKey SessionKey(bool copy) const override
{ return detail::SessionKey{&key, sizeof(key), copy}; }
void ClearKey() override { key_valid = false; }
bool IsKeyValid() const override { return key_valid; }
const IPAddr& OrigAddr() const { return orig_addr; }
const IPAddr& RespAddr() const { return resp_addr; }
@ -271,7 +269,6 @@ protected:
std::shared_ptr<EncapsulationStack> encapsulation; // tunnels
detail::ConnIDKey key;
bool key_valid;
unsigned int skip:1;
unsigned int weird:1;