cfg_shared_networks.cc 701 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2017 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. #include <config.h>
  7. #include <dhcpsrv/cfg_shared_networks.h>
  8. using namespace isc::asiolink;
  9. namespace isc {
  10. namespace dhcp {
  11. bool
  12. CfgSharedNetworks4::hasSubnetWithServerId(const IOAddress& server_id) const {
  13. const auto& index = networks_.get<SharedNetworkServerIdIndexTag>();
  14. auto network_it = index.find(server_id);
  15. return (network_it != index.cend());
  16. }
  17. } // end of namespace isc::dhcp
  18. } // end of namespace isc