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

Class GenericOption

source code

object --+    
         |    
    Option --+
             |
            GenericOption

Generic Option 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
 
to_text(self) 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]
 
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.

*otype*, an ``int``, is the option 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.

*otype*, an ``int``, is the option type.

*wire*, a ``binary``, is the wire-format message.

*current*, an ``int``, is the offset in *wire* of the beginning of the rdata.

*olen*, an ``int``, is the length of the wire-format option data

Returns a ``dns.edns.Option``.

Overrides: Option.from_wire
(inherited documentation)

_cmp(self, other)

source code 

Compare an EDNS option with another option of the same type.

Returns < 0 if < *other*, 0 if == *other*, and > 0 if > *other*.

Overrides: Option._cmp
(inherited documentation)