 |
Kea
1.5.0
|
Go to the documentation of this file.
27 if ((found_user =
findUser(user->getUserId()))) {
29 << user->getUserId());
32 users_[user->getUserId()] = user;
38 UserMap::const_iterator it = users_.find(
id);
39 if (it != users_.end()) {
40 const UserPtr tmp = (*it).second;
41 return ((*it).second);
50 UserMap::iterator it = users_.find(
id);
51 if (it != users_.end()) {
71 "UserRegistry: cannot refresh, no data source");
75 if (!source_->isOpen()) {
86 while ((user = source_->readNextUser())) {
89 }
catch (
const std::exception& ex) {
109 "UserRegistry: data source cannot be set to null");
Thrown UserRegistry encounters an error.
Encapsulates a unique identifier for a DHCP client.
@ HW_ADDRESS
Hardware addresses (MAC) are used for IPv4 clients.
~UserRegistry()
Destructor.
Hardware type that represents information from DHCPv4 packet.
UserRegistry()
Constructor.
std::vector< uint8_t > hwaddr_
const UserDataSourcePtr & getSource()
Returns a reference to the data source.
boost::shared_ptr< UserDataSource > UserDataSourcePtr
Defines a smart pointer to a UserDataSource.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
@ DUID
DUIDs are used for IPv6 clients.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
void removeUser(const UserId &id)
Removes a user from the registry by user id.
void addUser(UserPtr &user)
Adds a given user to the registry.
const std::vector< uint8_t > & getDuid() const
Returns a const reference to the actual DUID value.
Defines the logger used by the user check hooks library.
const UserPtr & findUser(const UserId &id) const
Finds a user in the registry by user id.
void setSource(UserDataSourcePtr &source)
Sets the data source to the given value.
These classes are used to describe and recognize DHCP lease clients.
void refresh()
Updates the registry from its data source.
Holds DUID (DHCPv6 Unique Identifier)
void clearall()
Removes all entries from the registry.
std::map< UserId, UserPtr > UserMap
Defines a map of unique Users keyed by UserId.
boost::shared_ptr< User > UserPtr
Defines a smart pointer to a User.