module PacketAnalyzer::TEREDO;

%%{
#include "zeek/Conn.h"
#include "zeek/session/Manager.h"
#include "zeek/packet_analysis/Manager.h"
#include "zeek/packet_analysis/protocol/teredo/Teredo.h"
%%}

function remove_teredo_connection%(cid: conn_id%) : bool
	%{
	zeek::packet_analysis::AnalyzerPtr teredo = zeek::packet_mgr->GetAnalyzer("Teredo");
	if ( teredo )
		{
		zeek::detail::ConnKey conn_key(cid);
		static_cast<zeek::packet_analysis::teredo::TeredoAnalyzer*>(teredo.get())->RemoveConnection(conn_key);
		}

	return zeek::val_mgr->True();
	%}
