mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
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:
parent
ca553fda27
commit
c8844677f1
9 changed files with 142 additions and 140 deletions
17
src/IPAddr.h
17
src/IPAddr.h
|
@ -28,12 +28,9 @@ struct ConnIDKey {
|
|||
uint16_t port2;
|
||||
TransportProto transport;
|
||||
|
||||
ConnIDKey() : port1(0), port2(0), transport(TRANSPORT_UNKNOWN)
|
||||
{
|
||||
memset(&ip1, 0, sizeof(in6_addr));
|
||||
memset(&ip2, 0, sizeof(in6_addr));
|
||||
}
|
||||
|
||||
ConnIDKey(const IPAddr& src, const IPAddr& dst, uint16_t src_port,
|
||||
uint16_t dst_port, TransportProto t, bool one_way);
|
||||
ConnIDKey(const ConnID& conn);
|
||||
ConnIDKey(const ConnIDKey& rhs)
|
||||
{
|
||||
*this = rhs;
|
||||
|
@ -55,11 +52,6 @@ struct ConnIDKey {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a map key for a given ConnID.
|
||||
*/
|
||||
ConnIDKey BuildConnIDKey(const ConnID& id);
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/**
|
||||
|
@ -398,8 +390,6 @@ public:
|
|||
*/
|
||||
void ConvertToThreadingValue(threading::Value::addr_t* v) const;
|
||||
|
||||
friend detail::ConnIDKey detail::BuildConnIDKey(const ConnID& id);
|
||||
|
||||
unsigned int MemoryAllocation() const { return padded_sizeof(*this); }
|
||||
|
||||
/**
|
||||
|
@ -451,6 +441,7 @@ public:
|
|||
static const IPAddr v6_unspecified;
|
||||
|
||||
private:
|
||||
friend struct detail::ConnIDKey;
|
||||
friend class IPPrefix;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue