code: def set_rcode(self, rcode):
          
          (value, evalue) = dns.rcode.to_flags(rcode)
          self.flags &= 0xFFF0
          self.flags |= value
          self.ednsflags &= 0x00FFFFFFL
          self.ednsflags |= evalue
          if self.ednsflags != 0 and self.edns < 0:
              self.edns = 0
docs: Set the rcode.
          @param rcode: the rcode
          @type rcode: int