![]() |
Kea
1.5.0
|
#include <cfg_option.h>
Inheritance diagram for isc::dhcp::OptionDescriptor:Public Member Functions | |
| OptionDescriptor (bool persist) | |
| Constructor. More... | |
| OptionDescriptor (const OptionDescriptor &desc) | |
| Constructor. More... | |
| OptionDescriptor (const OptionPtr &opt, bool persist, const std::string &formatted_value="", data::ConstElementPtr user_context=data::ConstElementPtr()) | |
| Constructor. More... | |
| bool | equals (const OptionDescriptor &other) const |
| Checks if the one descriptor is equal to another. More... | |
| bool | operator!= (const OptionDescriptor &other) const |
| Inequality operator. More... | |
| bool | operator== (const OptionDescriptor &other) const |
| Equality operator. More... | |
Public Member Functions inherited from isc::data::StampedElement | |
| StampedElement () | |
| Constructor. More... | |
| boost::posix_time::ptime | getModificationTime () const |
| Returns timestamp. More... | |
| void | setModificationTime (const boost::posix_time::ptime ×tamp) |
| Sets timestamp to the explicitly provided value. More... | |
| void | updateModificationTime () |
| Sets timestmp to the current time. More... | |
Public Member Functions inherited from isc::data::UserContext | |
| void | contextToElement (data::ElementPtr map) const |
| Merge unparse a user_context object. More... | |
| data::ConstElementPtr | getContext () const |
| Returns const pointer to the user context. More... | |
| void | setContext (const data::ConstElementPtr &ctx) |
| Sets user context. More... | |
Public Attributes | |
| std::string | formatted_value_ |
| Option value in textual (CSV) format. More... | |
| OptionPtr | option_ |
| Option instance. More... | |
| bool | persistent_ |
| Persistence flag. More... | |
| std::string | space_name_ |
| Option space name. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::data::UserContext | |
| static data::ElementPtr | toElement (data::ConstElementPtr map) |
| Copy extracting comments an Element map. More... | |
Protected Attributes inherited from isc::data::UserContext | |
| data::ConstElementPtr | user_context_ |
| Pointer to the user context (may be NULL) More... | |
Option descriptor.
Option descriptor holds instance of an option and additional information for this option. This information comprises whether this option is sent to DHCP client only on request (persistent = false) or always (persistent = true).
Definition at line 35 of file cfg_option.h.
|
inline |
Constructor.
| opt | option |
| persist | if true option is always sent. |
| formatted_value | option value in the textual format. Default |
| user_context | user context (optional). value is empty indicating that the value is not set. |
Definition at line 79 of file cfg_option.h.
References isc::data::UserContext::setContext().
Here is the call graph for this function:
|
inline |
Constructor.
| persist | if true option is always sent. |
Definition at line 91 of file cfg_option.h.
|
inline |
Constructor.
| desc | descriptor |
Definition at line 98 of file cfg_option.h.
References isc::data::UserContext::getContext(), and isc::data::UserContext::setContext().
Here is the call graph for this function:| bool isc::dhcp::OptionDescriptor::equals | ( | const OptionDescriptor & | other | ) | const |
Checks if the one descriptor is equal to another.
| other | Other option descriptor to compare to. |
Definition at line 24 of file cfg_option.cc.
References formatted_value_, option_, persistent_, and space_name_.
Referenced by operator!=(), and operator==().
|
inline |
Inequality operator.
| other | Other option descriptor to compare to. |
Definition at line 126 of file cfg_option.h.
References equals().
Here is the call graph for this function:
|
inline |
Equality operator.
| other | Other option descriptor to compare to. |
Definition at line 117 of file cfg_option.h.
References equals().
Here is the call graph for this function:| std::string isc::dhcp::OptionDescriptor::formatted_value_ |
Option value in textual (CSV) format.
This field is used to convey option value in human readable format, the same as used to specify option value in the server configuration. This value is optional and can be held in the host reservations database instead of the binary format.
Note that this value is carried in the option descriptor, rather than Option instance because it is a server specific value (same as persistence flag).
An example of the formatted value is: "2001:db8:1::1, 23, some text" for the option which carries IPv6 address, a number and a text.
Definition at line 59 of file cfg_option.h.
Referenced by equals(), and isc::dhcp::CqlHostExchange::prepareExchange().
| OptionPtr isc::dhcp::OptionDescriptor::option_ |
Option instance.
Definition at line 38 of file cfg_option.h.
Referenced by isc::dhcp::CfgOption::add(), isc::dhcp::Dhcpv4Srv::appendBasicOptions(), isc::dhcp::Dhcpv4Srv::appendRequestedOptions(), isc::dhcp::Dhcpv6Srv::appendRequestedOptions(), isc::dhcp::Dhcpv4Srv::appendRequestedVendorOptions(), isc::dhcp::Dhcpv6Srv::appendRequestedVendorOptions(), equals(), and isc::dhcp::CqlHostExchange::prepareExchange().
| bool isc::dhcp::OptionDescriptor::persistent_ |
Persistence flag.
If true, option is always sent to the client. If false, option is sent to the client when requested using ORO or PRL option.
Definition at line 44 of file cfg_option.h.
Referenced by equals(), and isc::dhcp::CqlHostExchange::prepareExchange().
| std::string isc::dhcp::OptionDescriptor::space_name_ |
Option space name.
Options are associated with option spaces. Typically, such association is made when the option is stored in the OptionContainer. However, in some cases it is also required to associate option with the particular option space outside of the container. In particular, when the option is fetched from a database. The database configuration backend will set option space upon return of the option. In other cases this value won't be set.
Definition at line 70 of file cfg_option.h.
Referenced by equals().