OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
icmp_proto.cc
Go to the documentation of this file.
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_proto.h>
8 
9 IcmpProto::IcmpProto(Agent *agent, boost::asio::io_context &io) :
10  Proto(agent, "Agent::Services", PktHandler::ICMP, io) {
11  // limit the number of entries in the workqueue
13  work_queue_.SetBounded(true);
14 }
15 
17 }
18 
19 ProtoHandler *IcmpProto::AllocProtoHandler(boost::shared_ptr<PktInfo> info,
20  boost::asio::io_context &io) {
21  return new IcmpHandler(agent(), info, io);
22 }
ProtoHandler * AllocProtoHandler(boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
Definition: icmp_proto.cc:19
void SetBounded(bool bounded)
Definition: queue_task.h:200
virtual ~IcmpProto()
Definition: icmp_proto.cc:16
void SetSize(size_t size)
Definition: queue_task.h:196
Definition: agent.h:358
AgentParam * params() const
Definition: agent.h:1218
uint32_t services_queue_limit()
Definition: agent_param.h:417
IcmpProto(Agent *agent, boost::asio::io_context &io)
Definition: icmp_proto.cc:9