mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
convenience functions for comparing IP addresses
This commit is contained in:
parent
9fc8f491ff
commit
17affdb858
1 changed files with 4 additions and 0 deletions
|
@ -39,7 +39,11 @@ struct ConnIDKey {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator<(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) < 0; }
|
bool operator<(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) < 0; }
|
||||||
|
bool operator<=(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) <= 0; }
|
||||||
bool operator==(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) == 0; }
|
bool operator==(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) == 0; }
|
||||||
|
bool operator!=(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) != 0; }
|
||||||
|
bool operator>=(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) >= 0; }
|
||||||
|
bool operator>(const ConnIDKey& rhs) const { return memcmp(this, &rhs, sizeof(ConnIDKey)) > 0; }
|
||||||
|
|
||||||
ConnIDKey& operator=(const ConnIDKey& rhs)
|
ConnIDKey& operator=(const ConnIDKey& rhs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue