Remove BroValUnion by hoisting underlying Val subclass values into subclasses

This commit is contained in:
Vern Paxson 2020-11-10 15:18:54 -08:00 committed by Tim Wojtulewicz
parent 49ca8e2163
commit 7f92a573d2
29 changed files with 632 additions and 512 deletions

View file

@ -318,7 +318,7 @@ Connection* NetSessions::FindConnection(Val* v)
return nullptr;
RecordType* vr = vt->AsRecordType();
auto vl = v->AsRecord();
auto vl = dynamic_cast<RecordVal*>(v);
int orig_h, orig_p; // indices into record's value list
int resp_h, resp_p;
@ -346,11 +346,11 @@ Connection* NetSessions::FindConnection(Val* v)
// types, too.
}
const IPAddr& orig_addr = (*vl)[orig_h]->AsAddr();
const IPAddr& resp_addr = (*vl)[resp_h]->AsAddr();
const IPAddr& orig_addr = vl->GetAddrField(orig_h);
const IPAddr& resp_addr = vl->GetAddrField(resp_h);
PortVal* orig_portv = (*vl)[orig_p]->AsPortVal();
PortVal* resp_portv = (*vl)[resp_p]->AsPortVal();
const PortVal* orig_portv = vl->GetPortValField(orig_p);
const PortVal* resp_portv = vl->GetPortValField(resp_p);
ConnID id;