Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : */ 4 : 5 : #include <cmn/agent_cmn.h> 6 : #include <init/agent_init.h> 7 : #include <services/icmp_error_proto.h> 8 : #include <services/icmp_error_handler.h> 9 : 10 1 : IcmpErrorProto::IcmpErrorProto(Agent *agent, boost::asio::io_context &io) : 11 1 : Proto(agent, "Agent::Services", PktHandler::ICMP_ERROR, io) { 12 : // limit the number of entries in the workqueue 13 1 : work_queue_.SetSize(agent->params()->services_queue_limit()); 14 1 : work_queue_.SetBounded(true); 15 1 : } 16 : 17 2 : IcmpErrorProto::~IcmpErrorProto() { 18 2 : } 19 : 20 0 : ProtoHandler *IcmpErrorProto::AllocProtoHandler(boost::shared_ptr<PktInfo> info, 21 : boost::asio::io_context &io) { 22 0 : return new IcmpErrorHandler(agent(), this, info, &io); 23 : } 24 : 25 0 : bool IcmpErrorProto::FlowIndexToKey(uint32_t index, FlowKey *key, bool *is_nat_flow) { 26 0 : if (flow_index_to_key_fn_.empty()) 27 0 : return false; 28 0 : return flow_index_to_key_fn_(index, key, is_nat_flow); 29 : }