dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,
		struct outbound_entry* outbound)
{
	struct dns64_qstate* iq;
	(void)outbound;
	verbose(VERB_QUERY, "dns64[module %d] operate: extstate:%s event:%s",
			id, strextstate(qstate->ext_state[id]),
			strmodulevent(event));
	log_query_info(VERB_QUERY, "dns64 operate: query", &qstate->qinfo);

	switch(event) {
		case module_event_new:
			/* Tag this query as being new and fall through. */
			if (!(iq = (struct dns64_qstate*)regional_alloc(
				qstate->region, sizeof(*iq)))) {
				log_err("out of memory");
				qstate->ext_state[id] = module_error;
				return;
			}
			qstate->minfo[id] = iq;
			iq->state = DNS64_NEW_QUERY;
			iq->started_no_cache_store = qstate->no_cache_store;
			qstate->no_cache_store = 1;
  			/* fallthrough */
		case module_event_pass:
			qstate->ext_state[id] = handle_event_pass(qstate, id);
			break;
		case module_event_moddone:
			qstate->ext_state[id] = handle_event_moddone(qstate, id);
			break;
		default:
			qstate->ext_state[id] = module_finished;
			break;
	}
	if(qstate->ext_state[id] == module_finished) {
		iq = (struct dns64_qstate*)qstate->minfo[id];
		if(iq && iq->state != DNS64_INTERNAL_QUERY)
			qstate->no_cache_store = iq->started_no_cache_store;
	}
}
dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,
		struct outbound_entry* outbound)
{
	struct dns64_qstate* iq;
	(void)outbound;
	verbose(VERB_QUERY, "dns64[module %d] operate: extstate:%s event:%s",
			id, strextstate(qstate->ext_state[id]),
			strmodulevent(event));
	log_query_info(VERB_QUERY, "dns64 operate: query", &qstate->qinfo);

	switch(event) {
		case module_event_new:
			 
			if (!(iq = (struct dns64_qstate*)regional_alloc(
				qstate->region, sizeof(*iq)))) {
				log_err("out of memory");
				qstate->ext_state[id] = module_error;
				return;
			}
			qstate->minfo[id] = iq;
			iq->state = DNS64_NEW_QUERY;
			iq->started_no_cache_store = qstate->no_cache_store;
			qstate->no_cache_store = 1;
  			 
		case module_event_pass:
			qstate->ext_state[id] = handle_event_pass(qstate, id);
			break;
		case module_event_moddone:
			qstate->ext_state[id] = handle_event_moddone(qstate, id);
			break;
		default:
			qstate->ext_state[id] = module_finished;
			break;
	}
	if(qstate->ext_state[id] == module_finished) {
		iq = (struct dns64_qstate*)qstate->minfo[id];
		if(iq && iq->state != DNS64_INTERNAL_QUERY)
			qstate->no_cache_store = iq->started_no_cache_store;
	}
}