Message Opcodes
DNS Opcodes describe what kind of operation a DNS message is requesting or replying to. Opcodes are embedded in the flags field in the DNS header.
- dns.opcode.QUERY = Opcode.QUERY
- dns.opcode.IQUERY = Opcode.IQUERY
- dns.opcode.STATUS = Opcode.STATUS
- dns.opcode.NOTIFY = Opcode.NOTIFY
- dns.opcode.UPDATE = Opcode.UPDATE
- dns.opcode.from_text(text: str) Opcode [source]
Convert text into an opcode.
text, a
str
, the textual opcodeRaises
dns.opcode.UnknownOpcode
if the opcode is unknown.Returns an
int
.
- dns.opcode.to_text(value: Opcode) str [source]
Convert an opcode to text.
value, an
int
the opcode value,Raises
dns.opcode.UnknownOpcode
if the opcode is unknown.Returns a
str
.
- dns.opcode.from_flags(flags: int) Opcode [source]
Extract an opcode from DNS message flags.
flags, an
int
, the DNS flags.Returns an
int
.