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

[3274] Subnets are now able to store client class information.

This commit is contained in:
Tomek Mrugalski
2014-02-03 20:33:33 +01:00
parent bc216c2cf0
commit 1d945d79ff
4 changed files with 142 additions and 1 deletions

View File

@@ -14,6 +14,9 @@
#include <config.h>
#ifndef CLASSIFY_H
#define CLASSIFY_H
#include <set>
#include <string>
@@ -38,8 +41,27 @@ namespace dhcp {
typedef std::string ClientClass;
/// Container for storing client classes
typedef std::set<ClientClass> ClientClasses;
///
/// 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.
class ClientClasses : public std::set<ClientClass> {
public:
/// @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
bool
contains(const ClientClass& x) const {
const_iterator it = find(x);
return (it != end());
}
};
};
};
#endif /* CLASSIFY_H */