Package dns :: Module opcode
[show private | hide private]
[frames | no frames]

Module dns.opcode

DNS Opcodes.
Exceptions
UnknownOpcode Raised if an opcode is unknown.

Function Summary
int from_flags(flags)
Extract an opcode from DNS message flags.
int from_text(text)
Convert text into an opcode.
bool is_update(flags)
True if the opcode in flags is UPDATE.
int to_flags(value)
Convert an opcode to a value suitable for ORing into DNS message flags.
string to_text(value)
Convert an opcode to text.

Variable Summary
int IQUERY
int NOTIFY
int QUERY
int STATUS
int UPDATE
str x
int y
dict _by_text
dict _by_value

Function Details

from_flags(flags)

Extract an opcode from DNS message flags.
Parameters:
flags - int
Returns:
int

from_text(text)

Convert text into an opcode.
Parameters:
text - the textual opcode
           (type=string)
Returns:
int
Raises:
UnknownOpcode - the opcode is unknown

is_update(flags)

True if the opcode in flags is UPDATE.
Parameters:
flags - DNS flags
           (type=int)
Returns:
bool

to_flags(value)

Convert an opcode to a value suitable for ORing into DNS message flags.
Returns:
int

to_text(value)

Convert an opcode to text.
Parameters:
value - the opcdoe
           (type=int)
Returns:
string
Raises:
UnknownOpcode - the opcode is unknown

Variable Details

IQUERY

Type:
int
Value:
1                                                                      

NOTIFY

Type:
int
Value:
4                                                                      

QUERY

Type:
int
Value:
0                                                                      

STATUS

Type:
int
Value:
2                                                                      

UPDATE

Type:
int
Value:
5                                                                      

x

Type:
str
Value:
'NOTIFY'                                                               

y

Type:
int
Value:
4                                                                      

_by_text

Type:
dict
Value:
{'STATUS': 2, 'QUERY': 0, 'UPDATE': 5, 'IQUERY': 1, 'NOTIFY': 4}       

_by_value

Type:
dict
Value:
{0: 'QUERY', 1: 'IQUERY', 2: 'STATUS', 4: 'NOTIFY', 5: 'UPDATE'}       

Generated by Epydoc 1.1 on Sat Aug 2 15:09:36 2003 http://epydoc.sf.net