# $Id: contents.bro,v 1.3 2003/08/31 00:40:21 vern Exp $

redef capture_filters += { ["contents"] = "tcp" };

event new_connection_contents(c: connection)
	{
	local id = c$id;

	local orig_file =
		fmt("contents.%s.%d-%s.%d",
			id$orig_h, id$orig_p, id$resp_h, id$resp_p);
	local resp_file =
		fmt("contents.%s.%d-%s.%d",
			id$resp_h, id$resp_p, id$orig_h, id$orig_p);

	set_contents_file(id, CONTENTS_ORIG, open(orig_file));
	set_contents_file(id, CONTENTS_RESP, open(resp_file));
	}
