MCPcopy Create free account
hub / github.com/rthalley/dnspython / set_opcode

Method set_opcode

dns/message.py:921–927  ·  view source on GitHub ↗

Set the opcode. *opcode*, a ``dns.opcode.Opcode``, is the opcode to set.

(self, opcode: dns.opcode.Opcode)

Source from the content-addressed store, hash-verified

919 return dns.opcode.from_flags(int(self.flags))
920
921 def set_opcode(self, opcode: dns.opcode.Opcode) -> None:
922 """Set the opcode.
923
924 *opcode*, a ``dns.opcode.Opcode``, is the opcode to set.
925 """
926 self.flags &= 0x87FF
927 self.flags |= dns.opcode.to_flags(opcode)
928
929 def get_options(self, otype: dns.edns.OptionType) -> List[dns.edns.Option]:
930 """Return the list of options of the specified type."""

Callers 3

make_responseFunction · 0.80
construct_msgFunction · 0.80

Calls

no outgoing calls

Tested by 1