 |
Kea
1.5.0
|
Go to the documentation of this file.
91 uint32_t valid_lft,
SubnetID subnet_id, time_t cltt,
92 const bool fqdn_fwd,
const bool fqdn_rev,
93 const std::string& hostname,
225 virtual void decline(uint32_t probation_period) = 0;
279 const uint8_t* clientid,
size_t clientid_len, uint32_t valid_lft,
280 uint32_t t1, uint32_t t2, time_t cltt, uint32_t subnet_id,
281 const bool fqdn_fwd =
false,
const bool fqdn_rev =
false,
282 const std::string& hostname =
"")
283 :
Lease(addr, t1, t2, valid_lft, subnet_id, cltt, fqdn_fwd, fqdn_rev,
306 const uint32_t valid_lifetime,
311 const bool fqdn_fwd =
false,
312 const bool fqdn_rev =
false,
313 const std::string& hostname =
"");
426 return (!
operator==(other));
432 virtual std::string
toText()
const;
439 void decline(uint32_t probation_period);
514 uint32_t iaid, uint32_t preferred, uint32_t valid, uint32_t t1,
516 uint8_t prefixlen = 128);
535 uint32_t iaid, uint32_t preferred, uint32_t valid, uint32_t t1,
536 uint32_t t2,
SubnetID subnet_id,
const bool fqdn_fwd,
537 const bool fqdn_rev,
const std::string& hostname,
570 void decline(uint32_t probation_period);
581 return (!
operator==(other));
587 virtual std::string
toText()
const;
uint8_t prefixlen_
IPv6 prefix length.
virtual isc::data::ElementPtr toElement() const =0
Unparse a configuration object.
boost::shared_ptr< const Lease6 > ConstLease6Ptr
Pointer to a const Lease6 structure.
static const uint32_t STATE_EXPIRED_RECLAIMED
Expired and reclaimed lease.
static Lease6Ptr fromElement(const data::ConstElementPtr &element)
Returns pointer to the IPv6 lease created from JSON representation.
bool belongsToClient(const HWAddrPtr &hw_address, const ClientIdPtr &client_id) const
Check if the lease belongs to the client with the given identifiers.
bool fqdn_fwd_
Forward zone updated?
void decline(uint32_t probation_period)
Sets IPv6 lease to declined state.
uint32_t state_
Holds the lease state(s).
virtual ~Lease()
Destructor.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Lease4()
Default constructor.
uint32_t iaid_
Identity Association Identifier (IAID)
The IOAddress class represents an IP addresses (version agnostic)
virtual std::string toText() const
Convert lease to printable form.
boost::shared_ptr< DUID > DuidPtr
Abstract class for configuration Cfg_* classes.
bool stateDeclined() const
Indicates if the lease is in the "declined" state.
static const uint32_t STATE_DEFAULT
A lease in the default state.
Lease(const isc::asiolink::IOAddress &addr, uint32_t t1, uint32_t t2, uint32_t valid_lft, SubnetID subnet_id, time_t cltt, const bool fqdn_fwd, const bool fqdn_rev, const std::string &hostname, const HWAddrPtr &hwaddr)
Constructor.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
const std::vector< uint8_t > & getHWAddrVector() const
Returns raw (as vector) hardware address.
Base class for user context.
virtual void decline(uint32_t probation_period)=0
Sets lease to DECLINED state.
bool operator!=(const Lease6 &other) const
Compare two leases for inequality.
const std::vector< uint8_t > & getClientIdVector() const
Returns a client identifier.
static const uint32_t STATE_DECLINED
Declined lease.
Type
Type of lease or pool.
isc::asiolink::IOAddress addr_
IPv4 ot IPv6 address.
void decline(uint32_t probation_period)
Sets IPv4 lease to declined state.
virtual std::string toText() const
Convert Lease to Printable Form.
Lease::Type type_
Lease type.
bool hasIdenticalFqdn(const Lease &other) const
Returns true if the other lease has equal FQDN data.
bool operator==(const Lease4 &other) const
Compare two leases for equality.
bool stateExpiredReclaimed() const
Indicates if the lease is in the "expired-reclaimed" state.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static std::string basicStatesToText(const uint32_t state)
Returns name(s) of the basic lease state(s).
boost::shared_ptr< HWAddr > HWAddrPtr
Shared pointer to a hardware address structure.
static void fromElementCommon(const LeasePtr &lease, const data::ConstElementPtr &element)
Sets common (for v4 and v6) properties of the lease object.
uint32_t valid_lft_
Valid lifetime.
Structure that holds a lease for IPv6 address and/or prefix.
@ TYPE_PD
the lease contains IPv6 prefix (for prefix delegation)
boost::shared_ptr< Lease6Collection > Lease6CollectionPtr
A shared pointer to the collection of IPv6 leases.
Holds Client identifier or client IPv4 address.
uint32_t t1_
Renewal timer.
@ TYPE_TA
the lease contains temporary IPv6 address
Lease4 & operator=(const Lease4 &other)
Assignment operator.
int64_t getExpirationTime() const
Returns lease expiration time.
static Type textToType(const std::string &text)
Converts type name to the actual type.
boost::shared_ptr< Lease > LeasePtr
Pointer to the lease object.
boost::shared_ptr< Lease4Collection > Lease4CollectionPtr
A shared pointer to the collection of IPv4 leases.
bool operator!=(const Lease4 &other) const
Compare two leases for inequality.
virtual std::string toText() const =0
Convert Lease to Printable Form.
virtual isc::data::ElementPtr toElement() const
Return the JSON representation of a lease.
ClientIdPtr client_id_
Client identifier.
boost::shared_ptr< ClientId > ClientIdPtr
Shared pointer to a Client ID.
time_t cltt_
Client last transmission time.
bool fqdn_rev_
Reverse zone updated?
HWAddrPtr hwaddr_
Client's MAC/hardware address.
std::vector< Lease4Ptr > Lease4Collection
A collection of IPv4 leases.
bool expired() const
returns true if the lease is expired
boost::shared_ptr< Element > ElementPtr
bool operator==(const Lease6 &other) const
Compare two leases for equality.
uint32_t preferred_lft_
preferred lifetime
static std::string statesToText(const uint32_t state)
Returns name of the lease states specific to DHCPv6.
boost::shared_ptr< const Element > ConstElementPtr
std::ostream & operator<<(std::ostream &os, const OpaqueDataTuple &tuple)
Inserts the OpaqueDataTuple as a string into stream.
static std::string typeToText(Type type)
returns text representation of a lease type
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
std::vector< Lease6Ptr > Lease6Collection
A collection of IPv6 leases.
a common structure for IPv4 and IPv6 leases
virtual isc::data::ElementPtr toElement() const
Return the JSON representation of a lease.
static std::string statesToText(const uint32_t state)
Returns name of the lease states specific to DHCPv4.
std::string hostname_
Client hostname.
@ TYPE_NA
the lease contains non-temporary IPv6 address
uint32_t t2_
Rebinding timer.
static Lease4Ptr fromElement(const data::ConstElementPtr &element)
Returns pointer to the IPv4 lease created from JSON representation.
SubnetID subnet_id_
Subnet identifier.
Lease4(const isc::asiolink::IOAddress &addr, const HWAddrPtr &hwaddr, const uint8_t *clientid, size_t clientid_len, uint32_t valid_lft, uint32_t t1, uint32_t t2, time_t cltt, uint32_t subnet_id, const bool fqdn_fwd=false, const bool fqdn_rev=false, const std::string &hostname="")
Constructor.
const std::vector< uint8_t > & getDuidVector() const
Returns a reference to a vector representing a DUID.
DuidPtr duid_
Client identifier.
Structure that holds a lease for IPv4 address.