mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Deprecate global Val pointers in NetVar.h
All of these have fairly niche uses, so better maintained as lookup/static closer to the usage site.
This commit is contained in:
parent
c0986f0739
commit
d34b24e776
13 changed files with 83 additions and 49 deletions
|
@ -42,9 +42,11 @@ TCP_Reassembler::TCP_Reassembler(analyzer::Analyzer* arg_dst_analyzer,
|
|||
|
||||
if ( ::tcp_contents )
|
||||
{
|
||||
static auto tcp_content_delivery_ports_orig = zeek::lookup_val<TableVal>("tcp_content_delivery_ports_orig");
|
||||
static auto tcp_content_delivery_ports_resp = zeek::lookup_val<TableVal>("tcp_content_delivery_ports_resp");
|
||||
const auto& dst_port_val = val_mgr->Port(ntohs(tcp_analyzer->Conn()->RespPort()),
|
||||
TRANSPORT_TCP);
|
||||
TableVal* ports = IsOrig() ?
|
||||
const auto& ports = IsOrig() ?
|
||||
tcp_content_delivery_ports_orig :
|
||||
tcp_content_delivery_ports_resp;
|
||||
auto result = ports->Lookup(dst_port_val.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue