Commit graph

13262 commits

Author SHA1 Message Date
Bernhard Amann
6a60f484f9 make heart beat interval for threading configureable from scripting layer 2012-03-29 09:03:33 -07:00
Robin Sommer
97652bc144 Updating submodule(s).
[nomail]
2012-03-28 16:15:52 -07:00
Robin Sommer
76af3cf825 Updating submodule(s).
[nomail]
2012-03-28 15:52:13 -07:00
Robin Sommer
c382439079 Switching log buffer size back to normal 2012-03-28 15:43:41 -07:00
Robin Sommer
42066cc1fd Teaching cmake to always link in tcmalloc if it finds it.
Also renaming --enable-perftools to --enable-perftool-debug to
indicate that the switch is only relevant for debugging the heap. It's
not needed to pick up tcmalloc for better performance.

--with-perftools can still (and always) be used to give a hint where
to find the libraries.

With the threading, using tcmalloc improves memory usage on FreeBSD
significantly when running on a trace. If it fixes the live problems,
remains to be seen ...
2012-03-28 15:42:09 -07:00
Robin Sommer
de7300f999 Merge remote-tracking branch 'origin/topic/jsiwek/skip-rh0-segleft'
* origin/topic/jsiwek/skip-rh0-segleft:
  Improve handling of IPv6 Routing Type 0 headers.

Closes #804.
2012-03-28 15:12:01 -07:00
Robin Sommer
1896df3799 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Remove dead tcp_checksum function from net_util
  Change routing0_data_to_addrs BIF to return vector of addresses.
2012-03-28 15:02:33 -07:00
Seth Hall
77694cc884 The app metrics break interval is now configurable. 2012-03-28 16:06:09 -04:00
Seth Hall
df6a180023 Some scripts for collecting connection stats and "app" stats.
- App stats are considered stats for applications on the internet.
  Services like facebook, youtube, etc.
2012-03-28 15:52:20 -04:00
Jon Siwek
8a1d71dc08 Remove dead tcp_checksum function from net_util 2012-03-28 14:14:20 -05:00
Jon Siwek
256cd592a7 Improve handling of IPv6 Routing Type 0 headers.
- For RH0 headers with non-zero segments left, a "routing0_segleft"
  flow_weird event is raised (with a destination indicating the last
  address in the routing header), and an "rh0_segleft" event can also
  be handled if the other contents of the packet header are of interest.
  No further analysis is done as the complexity required to correctly
  identify destination endpoints of connections doesn't seem worth it
  as RH0 has been deprecated by RFC 5095.

- For RH0 headers without any segments left, a "routing0_header"
  flow_weird event is raised, but further analysis still occurs
  as normal.
2012-03-28 13:49:28 -05:00
Seth Hall
47f58e6340 Cluster support for the metrics framework returns and all tests work again. 2012-03-28 14:00:59 -04:00
Seth Hall
6600e62ea3 Ported scripts using metrics framework and added a new smtp script.
- New script measures a couple of aspects of SMTP traffic.

- Existing metrics scripts had a small amount of work done
  to make them work with changes to metrics framework.
2012-03-28 11:39:27 -04:00
Daniel Thayer
169b3c833f Add more data to icmp events 2012-03-27 17:55:39 -05:00
Jon Siwek
f4101b5265 Improve handling of IPv6 routing type 0 extension headers.
- flow_weird event with name argument value of "routing0_hdr" is raised
  for packets containing an IPv6 routing type 0 header because this
  type of header is now deprecated according to RFC 5095.

- packets with a routing type 0 header and non-zero segments left
  now use the last address in that header in order to associate
  with a connection/flow and for calculating TCP/UDP checksums.

- added a set of IPv4/IPv6 TCP/UDP checksum unit tests
2012-03-27 16:05:45 -05:00
Daniel Thayer
bae6a4178e Merge remote-tracking branch 'origin/master' into topic/icmp6
Conflicts:
	scripts/base/init-bare.bro
	src/Sessions.cc
2012-03-26 17:07:32 -05:00
Bernhard Amann
28f3fa0144 make time types always return current time for benchmark reader 2012-03-26 13:52:58 -07:00
Bernhard Amann
016a2540a5 ...and spread out streaming reads over time. 2012-03-26 12:41:59 -07:00
Jon Siwek
0ceca706f6 Change routing0_data_to_addrs BIF to return vector of addresses.
Because the order of addresses in type 0 routing headers is
interesting/important.
2012-03-26 14:35:01 -05:00
Bernhard Amann
9732859d44 add first simple benchmark reader (it simply spews random data, amount of lines specified in source). 2012-03-26 12:29:21 -07:00
Robin Sommer
d889f14638 Updating submodule(s).
[nomail]
2012-03-23 17:46:57 -07:00
Robin Sommer
72f098cb59 Adding btest state file to gitignore. 2012-03-23 17:39:27 -07:00
Robin Sommer
02d8c52e6f Merge branch 'topic/jsiwek/ipv6-ext-headers'
* topic/jsiwek/ipv6-ext-headers:
  Cosmetics in preparation for merge.
  Removing remaining comments. Looks fine.
  Refactor script-layer IPv6 ext. header chain (addresses #795)
  Changes to IPv6 ext. header parsing (addresses #795).
  Fix ipv6_ext_headers event and add routing0_data_to_addrs BIF.
  Remove the default "tcp or udp or icmp" filter.
  Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-ext-headers'
  Add unit test for IPv6 fragment reassembly.
  Update PacketFilter/Discarder code for IP version independence.
  Add a few comments to IP.h
  Fix some IPv6 header related bugs.
  Add IPv6 fragment reassembly.
  Add handling for IPv6 extension header chains (addresses #531)

Closes #795.
2012-03-23 17:38:27 -07:00
Robin Sommer
30014ac920 Cosmetics in preparation for merge. 2012-03-23 17:00:51 -07:00
Robin Sommer
4321f635ac Removing remaining comments. Looks fine. 2012-03-23 17:00:51 -07:00
Robin Sommer
80e856bbe9 Merge remote-tracking branch 'origin/topic/jsiwek/bro_inet_ntop'
* origin/topic/jsiwek/bro_inet_ntop:
  Adapt FreeBSD's inet_ntop implementation for internal use.

Closes #799.
2012-03-23 16:10:01 -07:00
Robin Sommer
1d65f2da42 Updating submodule(s).
[nomail]
2012-03-23 16:08:22 -07:00
Robin Sommer
7e7e8c8516 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Update documentation for new syntax of IPv6 literals.
2012-03-23 16:06:27 -07:00
Robin Sommer
d7c9471818 Extending queue statistics. 2012-03-23 15:57:25 -07:00
Bernhard Amann
872ad195f7 prevent several remove operations for the same thread to be queued and output errors in that case. 2012-03-23 12:30:54 -07:00
Bernhard Amann
315948dbc8 add test for update functionality of tables where a predicate modifies values / indexes.
Seems to work fine for all cases...
2012-03-23 11:40:59 -07:00
Bernhard Amann
03116d779e one unref to many ... apparently 2012-03-22 18:08:59 -07:00
Bernhard Amann
94d439b0cb enable predicate modification of index of value which is currently being added/removed
Todo: test if this works for removal ( I think it should ).
2012-03-22 17:17:41 -07:00
Bernhard Amann
f73de0bc8c fix small memory leak (field description given to readers was never freed). 2012-03-22 15:11:42 -07:00
Seth Hall
5904043e85 Modifications to the metrics framework API and new features.
- Metrics:ID enum has been replaced with strings.

- Uniqueness can now be measured with the Metrics::add_unique function.

- Filters can change the index value with the $normalize_func field.
2012-03-22 16:46:37 -04:00
Bernhard Amann
6c4a40f176 missing include on linux 2012-03-22 13:09:53 -07:00
Bernhard Amann
da13fe895e Merge remote-tracking branch 'origin/topic/bernhard/input-threads' into topic/bernhard/input-threads 2012-03-22 12:45:30 -07:00
Bernhard Amann
7e4cbbc073 remove forgotten debug statements 2012-03-22 12:45:11 -07:00
Bernhard Amann
db4f088156 Merge remote-tracking branch 'origin/topic/bernhard/input-threads' into topic/bernhard/input-threads 2012-03-22 12:43:56 -07:00
Bernhard Amann
e7f1200f9f Merge remote-tracking branch 'origin' into topic/bernhard/input-threads 2012-03-22 12:41:44 -07:00
Bernhard Amann
5f5209fcfb ...forgotten file. 2012-03-22 11:00:51 -07:00
Bernhard Amann
14c6c40042 fix crash when all value fields of imported table are uninitialized. 2012-03-22 10:59:36 -07:00
Bernhard Amann
0db89bed3b fix crash when deleting data from source where there are no events or predicates...
(that happens when all testcases are too complicated and use all features..)
2012-03-22 10:33:49 -07:00
Bernhard Amann
51ddc9f572 fix bug that crashed input framework when creating already existing stream (tried to free not yet alloccated data) + write twotables test 2012-03-21 15:51:21 -07:00
Jon Siwek
c765f43fe3 Refactor script-layer IPv6 ext. header chain (addresses #795)
This replaces the "ip6_hdr_chain" in the "ip6_hdr" record with a vector of
"ip6_ext_hdr" to make it easier to traverse the chain.
2012-03-21 10:34:38 -05:00
Bernhard Amann
d39a389201 make optional fields possible for input framework.
This do not have to be present in the input file and are marked as &optional in the record description.

Those can e.g. be used to create field values on the file in a predicate while reading a file - example:

	Input::add_table([$source="input.log", $name="input", $idx=Idx, $val=Val, $destination=servers,
				$pred(typ: Input::Event, left: Idx, right: Val) = { right$notb = !right$b; return T; }
2012-03-20 14:11:59 -07:00
Jon Siwek
1c1d657039 Changes to IPv6 ext. header parsing (addresses #795).
In response to feedback from Robin:

  - rename "ip_hdr" to "ip4_hdr"

  - pkt_hdr$ip6 is now of type "ip6_hdr" instead of "ip6_hdr_chain"

  - "ip6_hdr_chain" no longer contains an "ip6_hdr" field, instead
    it's the other way around, "ip6_hdr" contains an "ip6_hdr_chain"

  - other internal refactoring
2012-03-20 15:50:17 -05:00
Bernhard Amann
08e1771682 update to execute raw.
support reading from commands by adppending | to the filename.

support streaming reads from command.

Fix something to make rearead work better. (magically happened)
2012-03-20 12:07:37 -07:00
Jon Siwek
f11fca588e Merge branch 'master' into topic/jsiwek/ipv6-ext-headers 2012-03-19 14:26:59 -05:00
Jon Siwek
667487cec9 Adapt FreeBSD's inet_ntop implementation for internal use.
So we get consistent text representations of IPv6 addresses across
platforms.
2012-03-19 11:26:31 -05:00