dhcpkit.tests.ipv6.options.test_option_length module¶
Test the implementation of option length checking
-
class
dhcpkit.tests.ipv6.options.test_option_length.
LengthTestingOption
(data: bytes = b'')[source]¶ Bases:
dhcpkit.ipv6.options.Option
Fake DHCPv6 option for testing length checks
-
load_from
(buffer: bytes, offset: int = 0, length: int = None) → int[source]¶ Load the internal state of this object from the given buffer. The buffer may contain more data after the structured element is parsed. This data is ignored.
Parameters: - buffer – The buffer to read data from
- offset – The offset in the buffer where to start reading
- length – The amount of data we are allowed to read from the buffer
Returns: The number of bytes used from the buffer
-
option_type
= 65535¶
-
-
class
dhcpkit.tests.ipv6.options.test_option_length.
RelayMessageOptionTestCase
(methodName='runTest')[source]¶ Bases:
dhcpkit.tests.ipv6.options.test_option.OptionTestCase