mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Increase UIDs to 96 bits w/ C/F prefix - BIT-1016
- The bit-length is adjustable via redef'ing bits_per_uid. - Prefix 'C' is used for connection UIDS (including IP tunnels) and 'F' for files.
This commit is contained in:
parent
df84083227
commit
22bf3e1196
103 changed files with 20911 additions and 20772 deletions
|
@ -11,7 +11,7 @@ EncapsulatingConn::EncapsulatingConn(Connection* c, BifEnum::Tunnel::Type t)
|
|||
{
|
||||
if ( ! uid )
|
||||
{
|
||||
uid = calculate_unique_id();
|
||||
uid = Bro::UID(bits_per_uid);
|
||||
c->SetUID(uid);
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,7 @@ RecordVal* EncapsulatingConn::GetRecordVal() const
|
|||
rv->Assign(0, id_val);
|
||||
rv->Assign(1, new EnumVal(type, BifType::Enum::Tunnel::Type));
|
||||
|
||||
char tmp[20];
|
||||
rv->Assign(2, new StringVal(uitoa_n(uid, tmp, sizeof(tmp), 62)));
|
||||
rv->Assign(2, new StringVal(uid.Base62("C").c_str()));
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue