shared_network.cc 1.79 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
// Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <dhcpsrv/shared_network.h>

using namespace isc::dhcp;

namespace isc {
namespace dhcp {

NetworkPtr
SharedNetwork4::sharedFromThis() {
    return (shared_from_this());
}

void
SharedNetwork4::add(const Subnet4Ptr& subnet) {
    SharedNetwork::add(subnets_, subnet);
}

void
SharedNetwork4::del(const SubnetID& subnet_id) {
    SharedNetwork::del(subnets_, subnet_id);
}

Subnet4Ptr
SharedNetwork4::getSubnet(const SubnetID& subnet_id) const {
    return (SharedNetwork::getSubnet<Subnet4Ptr>(subnets_, subnet_id));
}

Subnet4Ptr
SharedNetwork4::getNextSubnet(const Subnet4Ptr& first_subnet,
                              const Subnet4Ptr& current_subnet) const {
    return (SharedNetwork::getNextSubnet(subnets_, first_subnet,
                                         current_subnet));
}

NetworkPtr
SharedNetwork6::sharedFromThis() {
    return (shared_from_this());
}

void
SharedNetwork6::add(const Subnet6Ptr& subnet) {
    SharedNetwork::add(subnets_, subnet);
}

void
SharedNetwork6::del(const SubnetID& subnet_id) {
    SharedNetwork::del(subnets_, subnet_id);
}

Subnet6Ptr
SharedNetwork6::getSubnet(const SubnetID& subnet_id) const {
    return (SharedNetwork::getSubnet<Subnet6Ptr>(subnets_, subnet_id));
}

Subnet6Ptr
SharedNetwork6::getNextSubnet(const Subnet6Ptr& first_subnet,
                              const Subnet6Ptr& current_subnet) const {
    return (SharedNetwork::getNextSubnet(subnets_, first_subnet,
                                         current_subnet));
}

} // end of namespace isc::dhcp
} // end of namespace isc