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

Class Option

source code

object --+
         |
        Option
Known Subclasses:

Base class for all EDNS option types.

Instance Methods [hide private]
 
__init__(self, otype)
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
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
__lt__(self, other) source code
 
__le__(self, other) source code
 
__ge__(self, other) source code
 
__gt__(self, other) source code

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)
(Constructor)

source code 

Initialize an option.

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

Overrides: object.__init__

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``.

_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*.