/* * constructor */ TstatAnalyzer(const std::string &name, invocation_type invocation) : Block(name, invocation), m_in_gate(register_input_gate("in_pkt")), m_out_gate(register_output_gate("out_pkt")), m_msg_recv(0), m_msg_sent(0) { }
RRDemux::RRDemux(const std::string &name, invocation_type invocation) : Block(name, invocation_type::Direct), m_outgates_number(2), m_current_outgate(0) { register_input_gate("input"); if (invocation != invocation_type::Direct) { blocklog("SynCounter must be direct; ignoring configuration.", log_warning); } }
/* * constructor */ AppendTag(const std::string &name, invocation_type invocation) : Block(name, invocation), m_tag_type(undef), m_tag_name(), m_ingate_id(register_input_gate("in_pkt")), m_outgate_id(register_output_gate("out_pkt")), m_handle(TAG_INVALID), m_generator() { }
IDMEFExporter::IDMEFExporter(const std::string &name, invocation_type invocation): Block(name, invocation_type::Direct), m_ingate_id(register_input_gate("in_alert")), m_export_method(EXP_FILE), m_host(0), m_port(0), m_filename("log"), m_tcp_open(false), m_file_open(false), m_file_stream() { if (invocation != invocation_type::Direct) { blocklog("IDMEFExporter must be direct; ignoring configuration.", log_warning); } }
/* * constructor */ FlowFilter(const std::string &name, invocation_type invocation) : Block(name, invocation), m_in_gate(register_input_gate("in_flow")), m_out_gate(register_output_gate("out_flow")), m_ip_src_address(0), m_ip_src_mask(0), m_ip_src_mode(0), m_ip_dst_address(0), m_ip_dst_mask(0), m_ip_dst_mode(0), m_layer4_proto(0), m_layer4_mode(0), m_src_port(0), m_src_port_mode(0), m_dst_port(0), m_dst_port_mode(0) { }
/** * @brief Constructor * @param name The name of the packet counter block * @param invocation Invocation type of the block (Indirect, Direct, Async) */ PassthroughPacketCounter(const std::string &name, invocation_type invocation) : Block(name, invocation), m_pkt_cnt(0), m_byte_cnt(0), m_pkt_rate(0), m_byte_rate(0), m_reset(0), m_pkt_cnt_prev(0), m_byte_cnt_prev(0), m_last_t(std::chrono::system_clock::now()), m_timer(true), m_ingate_id(register_input_gate("in_pkt")), m_outgate_id(register_output_gate("out_pkt")) { register_variable("byterate",make_rd_var(no_mutex_t(), m_byte_rate)); register_variable("pktrate",make_rd_var(no_mutex_t(), m_pkt_rate)); register_variable("pktcnt",make_rd_var(no_mutex_t(), m_pkt_cnt)); register_variable("bytecnt",make_rd_var(no_mutex_t(), m_byte_cnt)); register_variable("reset",make_wr_var(no_mutex_t(), m_reset)); }
/* * constructor */ FlowPrinter(const std::string &name, invocation_type invocation) : Block(name, invocation), m_ingate_id(register_input_gate("in_flow")) { }
/* * constructor */ Null(const std::string &name, bool) : Block(name, false), m_ingate_id(register_input_gate("in_msg")) { }