OpenSDN source code
icmp_proto.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #include <cmn/agent_cmn.h>
7 #include <init/agent_init.h>
8 #include <services/icmp_proto.h>
9 
10 IcmpProto::IcmpProto(Agent *agent, boost::asio::io_context &io) :
11  Proto(agent, "Agent::Services", PktHandler::ICMP, io) {
12  // limit the number of entries in the workqueue
14  work_queue_.SetBounded(true);
15 }
16 
18 }
19 
20 ProtoHandler *IcmpProto::AllocProtoHandler(boost::shared_ptr<PktInfo> info,
21  boost::asio::io_context &io) {
22  return new IcmpHandler(agent(), info, io);
23 }
uint32_t services_queue_limit()
Definition: agent_param.h:416
Definition: agent.h:361
AgentParam * params() const
Definition: agent.h:1227
virtual ~IcmpProto()
Definition: icmp_proto.cc:17
ProtoHandler * AllocProtoHandler(boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
Definition: icmp_proto.cc:20
IcmpProto(Agent *agent, boost::asio::io_context &io)
Definition: icmp_proto.cc:10
void SetBounded(bool bounded)
Definition: queue_task.h:201
void SetSize(size_t size)
Definition: queue_task.h:197
Definition: io_utils.cc:12