saved_scenario = NULL;
}
+/** helper function that logs a ldns_pkt packet to logfile. */
+static void
+log_pkt(const char* desc, ldns_pkt* pkt)
+{
+ char* str = ldns_pkt2str(pkt);
+ if(!str)
+ log_info("%s: (failed)", desc);
+ else {
+ log_info("%s%s", desc, str);
+ free(str);
+ }
+}
+
/**
* Returns a string describing the event type.
*/
ldns_get_errorstr_by_id(status));
fatal_exit("Sending unparseable DNS replies to clients!");
}
+ log_pkt("reply pkt: ", ans->pkt);
}
void
ldns_get_errorstr_by_id(status));
fatal_exit("Sending unparseable DNS packets to servers!");
}
+ log_pkt("pending udp pkt: ", pend->pkt);
/* see if it matches the current moment */
if(runtime->now && runtime->now->evt_type == repevt_back_query &&