mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Merge remote-tracking branch 'remotes/origin/topic/jsiwek/prealloc-ports'
* remotes/origin/topic/jsiwek/prealloc-ports: Clean up PortManager class, mark PortVal ctors deprecated. Add BRO_DEPRECATED macro. Preallocate all possible PortVals. BIT-1881 #merged
This commit is contained in:
commit
cc738544eb
33 changed files with 201 additions and 75 deletions
|
@ -34,9 +34,9 @@ static RecordVal* get_conn_id_val(const Connection* conn)
|
|||
{
|
||||
RecordVal* v = new RecordVal(conn_id);
|
||||
v->Assign(0, new AddrVal(conn->OrigAddr()));
|
||||
v->Assign(1, new PortVal(ntohs(conn->OrigPort()), conn->ConnTransport()));
|
||||
v->Assign(1, port_mgr->Get(ntohs(conn->OrigPort()), conn->ConnTransport()));
|
||||
v->Assign(2, new AddrVal(conn->RespAddr()));
|
||||
v->Assign(3, new PortVal(ntohs(conn->RespPort()), conn->ConnTransport()));
|
||||
v->Assign(3, port_mgr->Get(ntohs(conn->RespPort()), conn->ConnTransport()));
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ refine flow Flow += {
|
|||
case 17: proto = TRANSPORT_UDP; break;
|
||||
}
|
||||
|
||||
return new PortVal(n, proto);
|
||||
return port_mgr->Get(n, proto);
|
||||
%}
|
||||
|
||||
#function proc_record(rec: Record) : bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue