Kea 2.5.8
packet_queue_mgr6.cc
Go to the documentation of this file.
1// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#include <config.h>
10
11#include <boost/scoped_ptr.hpp>
12
13namespace isc {
14namespace dhcp {
15
16const std::string PacketQueueMgr6::DEFAULT_QUEUE_TYPE6 = "kea-ring6";
17
19 // Register default queue factory
22 size_t capacity;
23 try {
24 capacity = data::SimpleParser::getInteger(parameters, "capacity");
25 } catch (const std::exception& ex) {
27 " 'capacity' parameter is missing/invalid: " << ex.what());
28 }
29
31 return (queue);
32 });
33}
34
35} // end of isc::dhcp namespace
36} // end of isc namespace
static int64_t getInteger(isc::data::ConstElementPtr scope, const std::string &name)
Returns an integer parameter from a scope.
Invalid queue parameter exception.
Definition: packet_queue.h:24
static const std::string DEFAULT_QUEUE_TYPE6
Logical name of the pre-registered, default queue implementation.
bool registerPacketQueueFactory(const std::string &queue_type, Factory factory)
Registers new queue factory function for a given queue type.
DHCPv6 packet queue buffer implementation.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:29
boost::shared_ptr< PacketQueue< Pkt6Ptr > > PacketQueue6Ptr
Defines pointer to the DHCPv6 queue interface used at the application level.
Definition: packet_queue.h:136
Defines the logger used by the top-level component of kea-lfc.