mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Minor review nits
This commit is contained in:
parent
43e77a3338
commit
fd67206865
7 changed files with 18 additions and 20 deletions
|
@ -46,7 +46,7 @@ public:
|
|||
src_port(0),
|
||||
dst_port(0),
|
||||
proto(TRANSPORT_UNKNOWN),
|
||||
proto_id(UNKNOWN_IP_PROTO),
|
||||
ip_proto(UNKNOWN_IP_PROTO),
|
||||
type(t),
|
||||
uid(UID(detail::bits_per_uid)) {}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
src_port(other.src_port),
|
||||
dst_port(other.dst_port),
|
||||
proto(other.proto),
|
||||
proto_id(other.proto_id),
|
||||
ip_proto(other.ip_proto),
|
||||
type(other.type),
|
||||
uid(other.uid) {}
|
||||
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
src_port = other.src_port;
|
||||
dst_port = other.dst_port;
|
||||
proto = other.proto;
|
||||
proto_id = other.proto_id;
|
||||
ip_proto = other.ip_proto;
|
||||
type = other.type;
|
||||
uid = other.uid;
|
||||
ip_hdr = other.ip_hdr;
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
|
||||
if ( ec1.type == BifEnum::Tunnel::IP || ec1.type == BifEnum::Tunnel::GRE )
|
||||
// Reversing endpoints is still same tunnel.
|
||||
return ec1.uid == ec2.uid && ec1.proto == ec2.proto && ec1.proto_id == ec2.proto_id &&
|
||||
return ec1.uid == ec2.uid && ec1.proto == ec2.proto && ec1.ip_proto == ec2.ip_proto &&
|
||||
((ec1.src_addr == ec2.src_addr && ec1.dst_addr == ec2.dst_addr) ||
|
||||
(ec1.src_addr == ec2.dst_addr && ec1.dst_addr == ec2.src_addr));
|
||||
|
||||
|
@ -117,13 +117,13 @@ public:
|
|||
// Reversing endpoints is still same tunnel, destination port is
|
||||
// always the same.
|
||||
return ec1.dst_port == ec2.dst_port && ec1.uid == ec2.uid && ec1.proto == ec2.proto &&
|
||||
ec1.proto_id == ec2.proto_id &&
|
||||
ec1.ip_proto == ec2.ip_proto &&
|
||||
((ec1.src_addr == ec2.src_addr && ec1.dst_addr == ec2.dst_addr) ||
|
||||
(ec1.src_addr == ec2.dst_addr && ec1.dst_addr == ec2.src_addr));
|
||||
|
||||
return ec1.src_addr == ec2.src_addr && ec1.dst_addr == ec2.dst_addr && ec1.src_port == ec2.src_port &&
|
||||
ec1.dst_port == ec2.dst_port && ec1.uid == ec2.uid && ec1.proto == ec2.proto &&
|
||||
ec1.proto_id == ec2.proto_id;
|
||||
ec1.ip_proto == ec2.ip_proto;
|
||||
}
|
||||
|
||||
friend bool operator!=(const EncapsulatingConn& ec1, const EncapsulatingConn& ec2) { return ! (ec1 == ec2); }
|
||||
|
@ -137,7 +137,7 @@ protected:
|
|||
uint16_t src_port;
|
||||
uint16_t dst_port;
|
||||
TransportProto proto;
|
||||
uint16_t proto_id;
|
||||
uint16_t ip_proto;
|
||||
BifEnum::Tunnel::Type type;
|
||||
UID uid;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue