2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 08:25:16 +00:00

[3274] Changes after review:

- Copyright years updated
 - Minor corrections in BINDX Guide
 - dhcp4.spec relay structure description updated.
 - new unit-test for DHCPv4 client classification added
 - new unit-test for DHCPv6 client classification added
 - fixed Doxygen errors
 - comments for CfgMgr::getSubnet{4,6} updated
This commit is contained in:
Tomek Mrugalski
2014-02-06 20:40:02 +01:00
parent 98b660fab4
commit f2c1e775f7
20 changed files with 192 additions and 38 deletions

View File

@@ -29,9 +29,10 @@
/// classification is expected to grow significantly.
///
/// @todo This file should be moved to dhcpsrv eventually as the classification
/// is server side concept. That is not possible yet, as the Pkt4 and Pkt6
/// classes have server-side implementation, even though they reside in the
/// dhcp directory.
/// is server side concept. Client has no notion of classifying incoming server
/// messages as it usually talks to only one server. That move is not possible
/// yet, as the Pkt4 and Pkt6 classes have server-side implementation, even
/// though they reside in the dhcp directory.
namespace isc {
@@ -40,23 +41,25 @@ namespace dhcp {
/// Definition of a single class.
typedef std::string ClientClass;
/// Container for storing client classes
/// @brief Container for storing client classes
///
/// Depending on how you look at it, this is either a little more than just
/// a set of strings or a client classifier that performs access control.
/// For now, it is a simple access list that may contain zero or more
/// class names. It is expected to grow in complexity once support for
/// client classes becomes more feature rich.
///
/// Note: This class is derived from std::set which may not have Doxygen
/// documentation. See http://www.cplusplus.com/reference/set/set/.
class ClientClasses : public std::set<ClientClass> {
public:
/// @brief returns if class X belongs to the defined classes
/// @brief returns if class x belongs to the defined classes
///
/// @param x client class to be checked
/// @return true if X belongs to the classes
/// @return true if x belongs to the classes
bool
contains(const ClientClass& x) const {
const_iterator it = find(x);
return (it != end());
return (find(x) != end());
}
};