OpenSDN source code
dhcpv6_proto.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 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"
9 #include "services/services_types.h"
10 #include "services/services_init.h"
11 #include "pkt/pkt_init.h"
12 
13 using namespace boost::asio;
14 using boost::asio::ip::udp;
15 
16 Dhcpv6Proto::Dhcpv6Proto(Agent *agent, boost::asio::io_context &io,
17  bool run_with_vrouter) :
18  Proto(agent, "Agent::Services", PktHandler::DHCPV6, io),
19  run_with_vrouter_(run_with_vrouter) {
20  // limit the number of entries in the workqueue
22  work_queue_.SetBounded(true);
23 
24  // server duid based on vrrp mac
28 }
29 
31 }
32 
33 ProtoHandler *Dhcpv6Proto::AllocProtoHandler(boost::shared_ptr<PktInfo> info,
34  boost::asio::io_context &io) {
35  return new Dhcpv6Handler(agent(), info, io);
36 }
37 
39 }
uint32_t services_queue_limit()
Definition: agent_param.h:416
Definition: agent.h:361
AgentParam * params() const
Definition: agent.h:1227
static const MacAddress & vrrp_mac()
Definition: agent.h:442
Duid server_duid_
Definition: dhcpv6_proto.h:82
ProtoHandler * AllocProtoHandler(boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
Definition: dhcpv6_proto.cc:33
void Shutdown()
Definition: dhcpv6_proto.cc:38
Dhcpv6Proto(Agent *agent, boost::asio::io_context &io, bool run_with_vrouter)
Definition: dhcpv6_proto.cc:16
virtual ~Dhcpv6Proto()
Definition: dhcpv6_proto.cc:30
bool ToArray(u_int8_t *p, size_t s) const
Definition: mac_address.cc:94
void SetBounded(bool bounded)
Definition: queue_task.h:201
void SetSize(size_t size)
Definition: queue_task.h:197
#define DHCPV6_DUID_TYPE_LL
Definition: dhcpv6_proto.h:22
Definition: io_utils.cc:12
uint8_t mac[ETHER_ADDR_LEN]
Definition: dhcpv6_proto.h:30