Commit graph

6667 commits

Author SHA1 Message Date
Justin
afde8a9596
Update src/fuzzers/packet-fuzzer.cc
Use a constant timestamp for packets

Co-authored-by: Jon Siwek <jsiwek@corelight.com>
2020-05-15 16:05:21 -04:00
Justin
e78a5be17d
Update src/fuzzers/packet-fuzzer.cc
Remove unused #includes

Co-authored-by: Tim Wojtulewicz <tim@corelight.com>
2020-05-15 15:59:46 -04:00
Johanna Amann
9dec370048 Highwayhash: small build fix
Turns out that hh_neon should not be compiled on generic arm CPUs.
That one is only for aarch64.
2020-05-15 19:57:32 +00:00
Jon Siwek
c4d41dcfbb Fix building fuzz targets on macOS 2020-05-15 11:25:14 -07:00
Justin Azoff
dd458a810e add initial packet corpus
This contains converted files from the test suite:
    dns53.cap
    ipv6-fragmented-dns.trace.cap
    ipv6-hbh-routing0.trace.cap
    ipv6-http-atomic-frag.trace.cap
    ipv6_zero_len_ah.trace.cap

and a new one I made:
    syn_packet.cap
2020-05-15 11:56:07 -04:00
Justin Azoff
48ee85df0b add packet fuzzer 2020-05-15 11:56:07 -04:00
Jon Siwek
4a2221b878 Deprecate OpaqueVal/HashVal ctors that take OpaqueType*
Replaced with ones that take IntrusivePtr
2020-05-14 23:31:47 -07:00
Jon Siwek
8fc89491bf fixup! Deprecate Scope::Lookup(), replace with Scope::Find() 2020-05-14 23:04:50 -07:00
Jon Siwek
62282c0226 Switch EnumType::GetVal() to return const-ref 2020-05-14 22:15:12 -07:00
Jon Siwek
902f93671c Change protected EnumVal ctor to use IntrusivePtr 2020-05-14 20:44:38 -07:00
Jon Siwek
440b0623ac Deprecate RecordVal(RecordType*) ctor
Replaced with one that takes IntrusivePtr
2020-05-14 19:31:43 -07:00
Jon Siwek
4debad8caf Switch zeek:🆔:lookup to zeek:🆔:find
For parity with Scope since it now uses Find instead of Lookup
2020-05-14 18:00:18 -07:00
Jon Siwek
7843416e51 Use zeek::BifEvent:: for enqueue_ functions instead of BifEvent:: 2020-05-14 17:27:42 -07:00
Jon Siwek
ca1e5fe4be Replace deprecated usage of BifFunc:: with zeek::BifFunc::
Names of functions also changed slightly, like bro_fmt -> fmt_bif.

Should generally be unusual/unexpected to see somone calling these
directly from C++ in their plugin, but since technically possible in
previous versions, I also removed the "private" restriction on accessing
the BifReturnVal member.
2020-05-14 17:26:30 -07:00
Jon Siwek
0db5c920f2 Deprecate names in BifConst, replace with zeek::BifConst
Some Val* types are also replaced with IntrusivePtr at the new location
2020-05-14 17:26:00 -07:00
Jon Siwek
eedeb07550 Deprecate all BroType* in BifType:: namespace
Replaced with equivalently named IntrusivePtr in zeek::BifType::
2020-05-14 17:25:35 -07:00
Jon Siwek
dca587c604 Change EventRegistry/EventHandler methods to use std::string{_view} 2020-05-14 17:25:08 -07:00
Jon Siwek
78e3267c44 Deprecate internal_handler(), replace with EventRegistry::Register()
Added a couple explicit event declarations that were missing: "net_done"
and "dns_mapping_name_changed".
2020-05-14 17:25:02 -07:00
Jon Siwek
f1e8289caa Deprecate remaining "opt_internal" functions in Var.h 2020-05-14 17:24:21 -07:00
Jon Siwek
c509149c86 Remove signal_val declaration from Var.h 2020-05-14 17:24:21 -07:00
Jon Siwek
3bcf55ce41 Change zeek:🆔:lookup functions to use std::string_view 2020-05-14 17:24:21 -07:00
Jon Siwek
86cbab3b7f Change Scope::Find() and Scope::Remove() to use std::string_view 2020-05-14 17:24:21 -07:00
Jon Siwek
0af7f8141b Change lookup_ID() to return a const-reference 2020-05-14 17:24:21 -07:00
Jon Siwek
8f95a2a0bb Deprecate Scope::Lookup(), replace with Scope::Find() 2020-05-14 17:24:21 -07:00
Jon Siwek
a5762c12cc Move various elements into ID.h and zeek::id namespace
* A handful of generic/useful/common global type pointers that used
  to be in NetVar.h

* Lookup functions that used to be Var.h
2020-05-14 17:24:20 -07:00
Jon Siwek
9210d443d3 Trim the list of "global type pointers" from NetVar.h further
Most of them are deprecated now, with usage sites now doing the lookup
themselves.
2020-05-14 17:23:20 -07:00
Jon Siwek
d34b24e776 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.
2020-05-14 17:23:20 -07:00
Jon Siwek
c0986f0739 Deprecate global type pointers in NetVar.h
There's analogous IntrusivePtrs in zeek::vars
2020-05-14 17:23:20 -07:00
Jon Siwek
4351a26710 Add RecordVal ctor that takes IntrusivePtr 2020-05-14 17:23:20 -07:00
Jon Siwek
40ee59f0c3 Remove unused FlattenExpr 2020-05-14 17:23:20 -07:00
Jon Siwek
6147804b36 Add missing "vector_coerce" to expr_name() 2020-05-14 17:23:20 -07:00
Jon Siwek
e3f7b38890 Deprecate Expr::Type(), replace with GetType() 2020-05-14 17:23:20 -07:00
Jon Siwek
1eb723fc9d Deprecate Val::Type(), replace with GetType() 2020-05-14 17:23:20 -07:00
Jon Siwek
737420c359 Change Val to store IntrusivePtr 2020-05-14 17:23:20 -07:00
Jon Siwek
afd939ceb1 Remove VectorVal::vector_type member 2020-05-14 17:23:20 -07:00
Jon Siwek
d4dba40727 Deprecate VectorVal(VectorType*) ctora
Adds a new one taking an IntrusivePtr.
2020-05-14 17:23:20 -07:00
Jon Siwek
c5236ecaee Deprecate internal_list_val() 2020-05-14 17:23:20 -07:00
Jon Siwek
447b052d11 Deprecate opt_internal_val() 2020-05-14 17:23:20 -07:00
Jon Siwek
26f6fe01c8 Deprecate internal_func(), replace with zeek::lookup_func() 2020-05-14 17:23:20 -07:00
Jon Siwek
a83941d64d Deprecate internal_val() and internal_const_val()
Replaced with zeek::lookup_val() and zeek::lookup_const()
2020-05-14 17:23:19 -07:00
Jon Siwek
ac06259eec Deprecate internal_type(), replace with zeek::lookup_type() 2020-05-14 17:22:26 -07:00
Jon Siwek
32b895f4ba Deprecate ID::ID_Val(), replace with ID::GetVal() 2020-05-14 17:18:00 -07:00
Jon Siwek
16a8bf3318 Use std::move in some zeekygen::Manager methods 2020-05-14 17:18:00 -07:00
Jon Siwek
4af1a26b1f Add Val TypeType constructor taking an IntrusivePtr 2020-05-14 17:18:00 -07:00
Jon Siwek
3f07c57523 Deprecate ID::Type(), replace with GetType() 2020-05-14 17:18:00 -07:00
Jon Siwek
6e647416d5 Deprecate ID::AsType(), add ID::IsType() and ID::GetType() 2020-05-14 17:18:00 -07:00
Jon Siwek
f26904e031 Deprecate BroType::YieldType(), replace with Yield() 2020-05-14 17:18:00 -07:00
Jon Siwek
bb25f5d568 Change base_type() to return const-ref, deprecate base_type_no_ref() 2020-05-14 17:18:00 -07:00
Jon Siwek
2aa84eb86e Deprecate BroType::GetField() and BroType::HasField() 2020-05-14 17:18:00 -07:00
Jon Siwek
103fed9f01 Deprecate RecordType::FieldType(), replace with GetFieldType() 2020-05-14 17:18:00 -07:00