dnspython  1.16.0
About: dnspython is a DNS toolkit (for Python 2.x) that supports almost all record types.
  Fossies Dox: dnspython-1.16.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

dns.flags Namespace Reference

Functions

def _order_flags (table)
 
def _from_text (text, table)
 
def _to_text (flags, table, order)
 
def from_text (text)
 
def to_text (flags)
 
def edns_from_text (text)
 
def edns_to_text (flags)
 

Variables

int QR = 0x8000
 
int AA = 0x0400
 
int TC = 0x0200
 
int RD = 0x0100
 
int RA = 0x0080
 
int AD = 0x0020
 
int CD = 0x0010
 
int DO = 0x8000
 
dictionary _by_text
 
dictionary _edns_by_text
 
dictionary _by_value = {y: x for x, y in _by_text.items()}
 
dictionary _edns_by_value = {y: x for x, y in _edns_by_text.items()}
 
def _flags_order = _order_flags(_by_value)
 
def _edns_flags_order = _order_flags(_edns_by_value)
 

Function Documentation

◆ _from_text()

def dns.flags._from_text (   text,
  table 
)
private

Definition at line 77 of file flags.py.

Referenced by dns.flags.edns_from_text(), and dns.flags.from_text().

◆ _order_flags()

def dns.flags._order_flags (   table)
private

Definition at line 66 of file flags.py.

◆ _to_text()

def dns.flags._to_text (   flags,
  table,
  order 
)
private

Definition at line 85 of file flags.py.

Referenced by dns.flags.edns_to_text(), and dns.flags.to_text().

◆ edns_from_text()

def dns.flags.edns_from_text (   text)
Convert a space-separated list of EDNS flag text values into a EDNS
flags value.

Returns an ``int``

Definition at line 113 of file flags.py.

References dns.flags._from_text().

Referenced by dns.message._TextReader._header_line().

◆ edns_to_text()

def dns.flags.edns_to_text (   flags)
Convert an EDNS flags value into a space-separated list of EDNS flag
text values.

Returns a ``text``.

Definition at line 123 of file flags.py.

References dns.flags._to_text().

Referenced by dns.message.Message.to_text().

◆ from_text()

def dns.flags.from_text (   text)
Convert a space-separated list of flag text values into a flags
value.

Returns an ``int``

Definition at line 93 of file flags.py.

References dns.flags._from_text().

Referenced by dns.message._TextReader._header_line().

◆ to_text()

def dns.flags.to_text (   flags)
Convert a flags value into a space-separated list of flag text
values.

Returns a ``text``.

Definition at line 103 of file flags.py.

References dns.flags._to_text().

Referenced by dns.message.Message.to_text().

Variable Documentation

◆ _by_text

dictionary dns.flags._by_text
private
Initial value:
1 = {
2  'QR': QR,
3  'AA': AA,
4  'TC': TC,
5  'RD': RD,
6  'RA': RA,
7  'AD': AD,
8  'CD': CD
9 }

Definition at line 42 of file flags.py.

◆ _by_value

dictionary dns.flags._by_value = {y: x for x, y in _by_text.items()}
private

Definition at line 61 of file flags.py.

◆ _edns_by_text

dictionary dns.flags._edns_by_text
private
Initial value:
1 = {
2  'DO': DO
3 }

Definition at line 52 of file flags.py.

◆ _edns_by_value

dictionary dns.flags._edns_by_value = {y: x for x, y in _edns_by_text.items()}
private

Definition at line 63 of file flags.py.

◆ _edns_flags_order

def dns.flags._edns_flags_order = _order_flags(_edns_by_value)
private

Definition at line 74 of file flags.py.

◆ _flags_order

def dns.flags._flags_order = _order_flags(_by_value)
private

Definition at line 72 of file flags.py.

◆ AA

int dns.flags.AA = 0x0400

Definition at line 25 of file flags.py.

◆ AD

int dns.flags.AD = 0x0020

Definition at line 33 of file flags.py.

◆ CD

int dns.flags.CD = 0x0010

Definition at line 35 of file flags.py.

◆ DO

int dns.flags.DO = 0x8000

Definition at line 40 of file flags.py.

◆ QR

int dns.flags.QR = 0x8000

Definition at line 23 of file flags.py.

◆ RA

int dns.flags.RA = 0x0080

Definition at line 31 of file flags.py.

◆ RD

int dns.flags.RD = 0x0100

Definition at line 29 of file flags.py.

◆ TC

int dns.flags.TC = 0x0200

Definition at line 27 of file flags.py.