dhcpkit.ipv6.server.extensions.timing_limits package

Handlers that limit the t1/t2 values in replies

class dhcpkit.ipv6.server.extensions.timing_limits.IANATimingLimitsHandler(min_t1: int = 0, max_t1: int = 4294967295, factor_t1: Union = 0.5, min_t2: int = 0, max_t2: int = 4294967295, factor_t2: Union = 0.8)[source]

Bases: dhcpkit.ipv6.server.extensions.timing_limits.TimingLimitsHandler

A handler that limits the t1/t2 values in an IANAOption

static extract_preferred_lifetime(option: dhcpkit.ipv6.options.Option) → Union[source]

Extract the preferred lifetime from the given (sub)option. Returns None if this option doesn’t contain a preferred lifetime.

Parameters:option – The option to extract the preferred lifetime from
Returns:The preferred lifetime, if any
static filter_options(options: Iterable) → List[source]

Extract the IANAOptions that we want to set the t1/t2 values of.

Parameters:options – The options in the response message
Returns:The relevant options of the response message
Return type:list[IANAOption]
class dhcpkit.ipv6.server.extensions.timing_limits.IAPDTimingLimitsHandler(min_t1: int = 0, max_t1: int = 4294967295, factor_t1: Union = 0.5, min_t2: int = 0, max_t2: int = 4294967295, factor_t2: Union = 0.8)[source]

Bases: dhcpkit.ipv6.server.extensions.timing_limits.TimingLimitsHandler

A handler that limits the t1/t2 values in an IANAOption

static extract_preferred_lifetime(option: dhcpkit.ipv6.options.Option) → Union[source]

Extract the preferred lifetime from the given (sub)option. Returns None if this option doesn’t contain a preferred lifetime.

Parameters:option – The option to extract the preferred lifetime from
Returns:The preferred lifetime, if any
static filter_options(options: Iterable) → List[source]

Extract the IAPDOptions that we want to set the t1/t2 values of.

Parameters:options – The options in the response message
Returns:The relevant options of the response message
Return type:list[IAPDOption]
class dhcpkit.ipv6.server.extensions.timing_limits.TimingLimitsHandler(min_t1: int = 0, max_t1: int = 4294967295, factor_t1: Union = 0.5, min_t2: int = 0, max_t2: int = 4294967295, factor_t2: Union = 0.8)[source]

Bases: dhcpkit.ipv6.server.handlers.Handler

A handler that limits the t1/t2 values in an option

static extract_preferred_lifetime(option: dhcpkit.ipv6.options.Option) → Union[source]

Extract the preferred lifetime from the given (sub)option. Returns None if this option doesn’t contain a preferred lifetime.

Parameters:option – The option to extract the preferred lifetime from
Returns:The preferred lifetime, if any
static filter_options(options: Iterable) → List[source]

Extract the options that we want to set the t1/t2 values of.

Parameters:options – The options in the response message
Returns:The relevant options of the response message
Return type:list[IANAOption]
handle(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle)[source]

Make sure the T1/T2 values are within the set limits.

Parameters:bundle – The transaction bundle