Commit graph

11634 commits

Author SHA1 Message Date
Johanna Amann
8db83a5ed2 Make &broker_store take argument of type string.
It turns out that directly passing a Broker::Store is not really a
bright idea. Because - if we do that - we have to later try to intercept
when the master/clone is generated to figure out what the actual name of
the backing store is.

Turns out that it is much easier to just use the name directly - and
check if a store with that name exists when we want to insert something.

I might want to reconsider this in the future in any case. At the moment
this approach just stores one table into an entire store. In theory, one
store should be able to handle several tables, but... that's more
complex. So let's start with this for now.
2020-05-28 13:47:13 -07:00
Jon Siwek
82ce64ca70 Switch Broker Val converter visitor to return IntrusivePtr 2020-05-27 17:56:25 -07:00
Jon Siwek
1f45e690a0 Change BroFunc ctor to take const-ref IntrusivePtr<ID> 2020-05-27 17:40:02 -07:00
Jon Siwek
0d19e8fb4c Add version of Frame::SetElement() taking IntrusivePtr<ID>
Expect the version using raw ID* could go away eventually, but this is
convenience for the meantime.
2020-05-27 17:31:02 -07:00
Jon Siwek
2cee468eac Change Scope/Func inits from id_list* to vector<IntrusivePtr<ID>> 2020-05-27 17:27:40 -07:00
Jon Siwek
46e23b49fb Change Scope::GenerateTemporary() to return IntrusivePtr 2020-05-27 16:51:25 -07:00
Jon Siwek
a13899c95e Deprecate Scope::ReturnType(), replace with GetReturnType() 2020-05-27 16:38:31 -07:00
Jon Siwek
b0c95e30d0 Deprecate Scope::ScopeID(), replace with GetID() 2020-05-27 16:36:14 -07:00
Anthony Kasza
2bb3309dd4 change: now using alternate event prototypes 2020-05-27 09:21:53 -06:00
Jon Siwek
8b6de5852c Switch parsing to use vector<IntrusivePtr<Attr>> from attr_list
This allows improved passing/storing of Attr references to Exprs,
TypeDecl, Scope, etc.
2020-05-26 18:19:29 -07:00
Jon Siwek
ce6f69cd19 Deprecate TableVal::FindAttr(), replace with GetAttr() 2020-05-26 15:46:46 -07:00
Jon Siwek
e365105872 Deprecate TypeDecl::FindAttr(), replace with GetAttr() 2020-05-26 15:41:25 -07:00
Jon Siwek
5fc78a548c Deprecate ID::FindAttr(), replace with GetAttr() 2020-05-26 15:31:31 -07:00
Jon Siwek
bee321711f Deprecate Attributes::FindAttr(), replace with Find() 2020-05-26 15:25:08 -07:00
Jon Siwek
6daa33364b Deprecate Attributes::AddAttrs(Attributes*)
Replaced with version taking an IntrusivePtr parameter
2020-05-26 15:12:20 -07:00
Jon Siwek
ccd1cbbc54 Add Attributes ctor that takes IntrusivePtrs 2020-05-26 15:05:38 -07:00
Johanna Amann
433e1154da Merge branch 'add_bzar_dce_rpc_consts' of https://github.com/ct-square/zeek
* 'add_bzar_dce_rpc_consts' of https://github.com/ct-square/zeek:
  Remove dupplicate DCE-RPC endpoint
  Add DCE-RPC constants from BZAR project

Closes GH-953
2020-05-26 22:04:33 +00:00
Jon Siwek
102e58b80b Change Attributes to store std:vector<IntrusivePtr<Attr>>
This also changes the return type of Attributes::Attrs() from attr_list*
2020-05-26 13:05:24 -07:00
Jon Siwek
007533295a Change Attr::SetAttrExpr() to non-template 2020-05-26 12:21:23 -07:00
Jon Siwek
97636e97a5 Deprecate Attr::AttrExpr(), replace with GetExpr() 2020-05-26 12:13:56 -07:00
Jon Siwek
2ebc20a164 Deprecate ID::Attrs(), replace with GetAttrs() 2020-05-26 11:34:44 -07:00
Anthony Kasza
3333a00eb2 add: two new RDP scriptland events for negotiation flags 2020-05-26 12:11:22 -06:00
Jon Siwek
c171af47f5 GH-979: Update libkqueue to fix use on CentOS 6 2020-05-26 11:07:40 -07:00
Jon Siwek
28b4206519 Remove weak_ref param from ID::SetVal()
It was not used anywhere.
2020-05-23 09:29:27 -07:00
Jon Siwek
198d604dde Store weak ref boolean along with Frame element Vals 2020-05-23 09:19:50 -07:00
Jon Siwek
9f4eca081f Deprecate Frame::GetElement(ID*), replace with GetElementByID() 2020-05-23 09:08:45 -07:00
Jon Siwek
1ccbe743d0 Deprecate Frame::NthElement(), replace with GetElement() 2020-05-23 08:52:34 -07:00
Jon Siwek
e9e2e388f8 Switch Frame::SetElement() to use IntrusivePtr 2020-05-23 08:52:15 -07:00
Jon Siwek
1c617c4f7a Store IntrusivePtrs in Frame 2020-05-22 23:43:03 -07:00
Jon Siwek
272db640aa Deprecate Plugin::HookCallFunction(), replace with HookFunctionCall()
This also changes the argument type of Func::operator() to zeek::Args*
to allow plugins to be able to alter function arguments in place as
was previously documented.
2020-05-22 21:01:38 -07:00
Jon Siwek
46c5dea733 Switch plugin::Manager::HookCallFunction() to return IntrusivePtr
The plugin::Plugin side of things is not (yet) changed.
2020-05-22 17:48:35 -07:00
Jon Siwek
b1042e2824 Port remaining file analysis API to use IntrusivePtr 2020-05-22 16:32:40 -07:00
Jon Siwek
57a6069cd1 Deprecate file analyzer construction methods taking raw RecordVal*
Replaced with versions that instead take IntrusivePtr
2020-05-22 16:13:15 -07:00
Jon Siwek
ecb7c7c27e Deprecate file_analysis::Analyzer::Args(), replace with GetArgs() 2020-05-22 12:34:40 -07:00
Jon Siwek
faa4738807 Deprecate file_analysis::File::GetVal(), replace with ToVal() 2020-05-22 12:27:37 -07:00
Jon Siwek
27c3c207e4 Change file_analysis::File::GetID() to return const-ref 2020-05-22 00:22:17 -07:00
Jon Siwek
8a3cd4c65b Fix build: some don't like IntrusivePtr default arg w/ incomplete type 2020-05-22 00:09:14 -07:00
Jon Siwek
052104d5d2 Change bro_broker::DataVal::ScriptDataType() to IntrusivePtr 2020-05-21 23:31:01 -07:00
Jon Siwek
0a23b8dff5 Change find_nested_record_types() to take IntrusivePtr 2020-05-21 23:21:37 -07:00
Jon Siwek
a0481c0b26 Deprecate TypeType::Type(), replace with GetType() 2020-05-21 23:12:43 -07:00
Jon Siwek
863f02744e Add is_assignable() overload taking TypeTag 2020-05-21 23:00:02 -07:00
Jon Siwek
457c08f531 Add is_atomic_type() overloads for IntrusivePtr 2020-05-21 22:53:10 -07:00
Jon Siwek
6a1c312451 Add same_type() overloads for IntrusivePtr args 2020-05-21 21:33:02 -07:00
Jon Siwek
2c4cc95e7c Change merge_types() to take IntrusivePtrs 2020-05-21 20:01:00 -07:00
Jon Siwek
4b17929b6b Deprecate IndexType::Indices(), replace with GetIndices() 2020-05-21 19:46:57 -07:00
Jon Siwek
4e77df3c28 Add is_vector() methods taking const-ref IntrusivePtr 2020-05-21 17:49:47 -07:00
Jon Siwek
ea878208ba Factor static-local nil IntrusivePtrs to global locations
Minor optimization to remove any run-time impact.
2020-05-21 17:22:39 -07:00
Jon Siwek
a384bb8b81 Deprecate VectorVal::Lookup(), replace with At() 2020-05-21 17:03:46 -07:00
Jon Siwek
69533bcbc6 Switch VectorVal BroValUnion to store std::vector<IntrusivePtr<Val>>
This changes the return type of AsVector() from std::vector<Val*>*
2020-05-21 16:24:34 -07:00
Jon Siwek
40db09ccbf Deprecate VectorVal::Insert() taking raw Val*, use IntrusivePtr 2020-05-21 15:44:06 -07:00