From: Marcin Siodelski Date: Thu, 7 Dec 2017 17:10:21 +0000 (+0100) Subject: [5425] Applied a couple of little fixes in the documentation. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfd37629c15a7b8aeb29d656af0f5423868c410c;p=thirdparty%2Fkea.git [5425] Applied a couple of little fixes in the documentation. As a result of review. --- diff --git a/doc/guide/classify.xml b/doc/guide/classify.xml index bd5ab03907..d3ecce7dcb 100644 --- a/doc/guide/classify.xml +++ b/doc/guide/classify.xml @@ -804,18 +804,18 @@ concatenation of the strings
Configuring Pools With Class Information - Similar to subnets in certain cases access to certain address or - prefix pools must be restricted to only clients that belong to a - given class, using the "client-class" when defining the pool. + Similar to the subnets, it is possible to restrict access to the certain address + or prefix pools to the clients belonging to a specific class, using + the "client-class" parameter when defining the pool. - Let's assume that the server is connected to a network segment that uses + Let's assume that the server is connected to a network segment using the 192.0.2.0/24 prefix. The Administrator of that network has decided - that addresses from range 192.0.2.10 to 192.0.2.20 are going to be - managed by the DHCP4 server. Only clients belonging to client class - Client_foo are allowed to use this pool. Such a - configuration can be achieved in the following way: + that addresses from the range of 192.0.2.10 to 192.0.2.20 are going to be + managed by the DHCP4 server. Only the clients belonging to the client class + Client_foo are allowed to use this pool. Such a configuration can be + achieved in the following way: "Dhcp4": { "client-classes": [ @@ -833,19 +833,20 @@ concatenation of the strings ] }, ... - ], + ], "subnet4": [ { "subnet": "192.0.2.0/24", + "pools": [ { "pool": "192.0.2.10 - 192.0.2.20", "client-class": "Client_foo" } - ] + ] }, ... - ],, + ], ... } diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml index 34f2fd9e81..9ac803ba20 100644 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@ -2057,16 +2057,13 @@ It is merely echoed by the server discussion of the classification process see . - - In certain cases it is useful to differentiate between different types of - clients and treat them accordingly. It is envisaged that client - classification will be used for changing the behavior of almost any part of - the DHCP message processing, including the assignment of leases from different - pools, the assignment of different options (or different values of the same - options) etc. In the current release of the software however, there are - only three mechanisms that take advantage of client classification: - subnet selection, assignment of different options, and, for cable modems, there - are specific options for use with the TFTP server address and the boot file field. + In certain cases it is useful to configure the server to differentiate between + DHCP clients types and treat them accordingly. It is envisaged that client + classification will be used for modifying the behavior of almost any part of + the DHCP message processing. In the current release of Kea, there are four + mechanisms that take advantage of the client classification in DHCPv4: subnet + selection, address pool selection, DHCP options assignment, and, for cable modems, + there are specific options for use with the TFTP server address and boot file field. diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index 1ac0cf5aac..0875c728a4 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -1917,6 +1917,14 @@ should include options from the isc option space: discussion of the classification process see . + In certain cases it is useful to configure the server to differentiate between + DHCP clients types and treat them accordingly. It is envisaged that client + classification will be used for modifying the behavior of almost any part of + the DHCP message processing. In the current release of Kea, there are three + mechanisms that take advantage of the client classification in DHCPv6: subnet + selection, address pool selection and DHCP options assignment. + + In certain cases it is useful to differentiate between different types of clients and treat them accordingly. It is envisaged that client diff --git a/src/lib/dhcpsrv/pool.h b/src/lib/dhcpsrv/pool.h index d4fb980364..cf7aed3e80 100644 --- a/src/lib/dhcpsrv/pool.h +++ b/src/lib/dhcpsrv/pool.h @@ -114,11 +114,11 @@ public: user_context_ = ctx; } - /// @Checks whether this pool supports client that belongs to + /// @brief Checks whether this pool supports client that belongs to /// specified classes. /// - /// @todo: currently doing the same than network which - /// is known to be improved. + /// @todo: Implements similar logic as @ref Network::clientSupported. It + /// is going to be improved. /// /// @param client_classes list of all classes the client belongs to /// @param known_client true if the client is known, i.e. has a diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h index 5aa3640b7b..572319d23a 100644 --- a/src/lib/dhcpsrv/subnet.h +++ b/src/lib/dhcpsrv/subnet.h @@ -56,7 +56,8 @@ public: /// @brief checks if the specified address is in allowed pools /// - /// This takes also into account client classes and known client + /// This takes also into account client classes and whether the client is + /// known, i.e. has a host reservation. /// /// @param type type of pools to iterate over /// @param addr this address will be checked if it belongs to any pools in @@ -334,12 +335,15 @@ protected: /// @throw BadValue if invalid value is used virtual void checkType(Lease::Type type) const = 0; - /// @brief returns a sum of possible leases in all pools + /// @brief Returns a sum of possible leases in all pools + /// /// @param pools list of pools /// @return sum of possible leases uint64_t sumPoolCapacity(const PoolCollection& pools) const; - /// @brief returns a sum of possible leases in all pools allowing classes + /// @brief Returns a sum of possible leases in all pools allowing specified + /// classes. + /// /// @param pools list of pools /// @param client_classes list of classes /// @param known_client true if the client is known, i.e. has a reservation