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

source code 

Initialize an option.

Parameters:
  • otype (int) - The rdata type
Overrides: object.__init__

from_wire(cls, otype, wire, current, olen)
Class Method

source code 

Build an EDNS option object from wire format

Parameters:
  • otype (int) - The option type
  • wire (string) - The wire-format message
  • current (int) - The offset in wire of the beginning of the rdata.
  • olen (int) - The length of the wire-format option data
Returns: dns.edns.Option instance

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