class documentation

class OPTNonStandardAttributes: (source)

View In Hierarchy

Generate byte and instance representations of an dns._OPTHeader where all attributes are set to non-default values.

For testing whether attributes have really been read from the byte string during decoding.

Class Method bytes Return bytes representing an encoded OPT record.
Class Method object Return a new dns._OPTHeader instance.
@classmethod
def bytes(cls, excludeName=False, excludeOptions=False): (source)

Return bytes representing an encoded OPT record.

Parameters
excludeName:boolA flag that controls whether to exclude the name field. This allows a non-standard name to be prepended during the test.
excludeOptions:boolA flag that controls whether to exclude the RDLEN field. This allows encoded variable options to be appended during the test.
Returns
bytes representing the encoded OPT record returned by object.
@classmethod
def object(cls): (source)

Return a new dns._OPTHeader instance.

Returns
A dns._OPTHeader instance with attributes that match the encoded record returned by bytes.