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

Module edns

source code

EDNS Options

Classes [hide private]
  Option
Base class for all EDNS option types.
  GenericOption
Generic Option Class
  ECSOption
EDNS Client Subnet (ECS, RFC7871)
Functions [hide private]
 
get_option_class(otype)
Return the class for the specified option type.
source code
 
option_from_wire(otype, wire, current, olen)
Build an EDNS option object from wire format.
source code
Variables [hide private]
  NSID = 3
  DAU = 5
  DHU = 6
  N3U = 7
  ECS = 8
  EXPIRE = 9
  COOKIE = 10
  KEEPALIVE = 11
  PADDING = 12
  CHAIN = 13
  _type_to_class = {8: <class 'dns.edns.ECSOption'>}
  __package__ = None
hash(x)
Function Details [hide private]

get_option_class(otype)

source code 

Return the class for the specified option type.

The GenericOption class is used if a more specific class is not known.

option_from_wire(otype, wire, current, olen)

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 an instance of a subclass of ``dns.edns.Option``.