Package dns :: Module edns :: Class GenericOption |
[hide private]
[frames] | no frames]

# Class GenericOption

source code

    object --+
             |
        Option --+
                 |
                GenericOption

Generate Rdata Class

This class is used for EDNS option types for which we have no better implementation.

Instance Methods | [hide private]
__init__(self, otype, data) Initialize an option. | source code
to_wire(self, file) Convert an option to wire format. | source code
_cmp(self, other) Compare an EDNS option with another option of the same type. | source code
Inherited from `Option`: `__eq__`, `__ge__`, `__gt__`, `__le__`, `__lt__`, `__ne__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Methods | [hide private]
dns.edns.Option instance |
from_wire(cls, otype, wire, current, olen) Build an EDNS option object from wire format | source code

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, otype, data) (Constructor) | source code
Initialize an option. Parameters: `otype` - The rdata type Overrides: object.__init__ (inherited documentation)

### to_wire(self, file) | source code
Convert an option to wire format. Overrides: Option.to_wire (inherited documentation)

### from_wire(cls, otype, wire, current, olen) Class Method | source code
Build an EDNS option object from wire format Parameters: `otype` - The option type `wire` - The wire-format message `current` - The offset in wire of the beginning of the rdata. `olen` - The length of the wire-format option data Returns: dns.edns.Option instance Overrides: Option.from_wire (inherited documentation)

### _cmp(self, other) | source code
Compare an EDNS option with another option of the same type. Return < 0 if self < other, 0 if self == other, and > 0 if self > other. Overrides: Option._cmp (inherited documentation)