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

Method set_rcode

dns/message.py:903–912  ·  view source on GitHub ↗

Set the rcode. *rcode*, a ``dns.rcode.Rcode``, is the rcode to set.

(self, rcode: dns.rcode.Rcode)

Source from the content-addressed store, hash-verified

901 return dns.rcode.from_flags(int(self.flags), int(self.ednsflags))
902
903 def set_rcode(self, rcode: dns.rcode.Rcode) -> None:
904 """Set the rcode.
905
906 *rcode*, a ``dns.rcode.Rcode``, is the rcode to set.
907 """
908 (value, evalue) = dns.rcode.to_flags(rcode)
909 self.flags &= 0xFFF0
910 self.flags |= value
911 self.ednsflags &= 0x00FFFFFF
912 self.ednsflags |= evalue
913
914 def opcode(self) -> dns.opcode.Opcode:
915 """Return the opcode.

Callers 15

_make_messageMethod · 0.80
handleMethod · 0.80
handle_wireMethod · 0.80
handleMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80

Calls

no outgoing calls

Tested by 15

handleMethod · 0.64
setUpMethod · 0.64
setUpMethod · 0.64
handleMethod · 0.64
handleMethod · 0.64
handleMethod · 0.64
handleMethod · 0.64
handleMethod · 0.64
handleMethod · 0.64