response (const struct resolv_response_context *ctx,
          struct resolv_response_builder *b,
          const char *qname, uint16_t qclass, uint16_t qtype)
{
  if (force_tcp && ctx->tcp)
    {
      resolv_response_init (b, (struct resolv_response_flags) { .tc = 1 });
      resolv_response_add_question (b, qname, qclass, qtype);
      return;
    }

  resolv_response_init (b, (struct resolv_response_flags) { });
  resolv_response_add_question (b, qname, qclass, qtype);
  resolv_response_section (b, ns_s_an);
  resolv_response_open_record (b, qname, qclass, qtype, 0);
  resolv_response_add_data (b, &qtype, sizeof (qtype));
  resolv_response_close_record (b);
}
response (const struct resolv_response_context *ctx,
          struct resolv_response_builder *b,
          const char *qname, uint16_t qclass, uint16_t qtype)
{
  if (force_tcp && ctx->tcp)
    {
      resolv_response_init (b, (struct resolv_response_flags) { .tc = 1 });
      resolv_response_add_question (b, qname, qclass, qtype);
      return;
    }

  resolv_response_init (b, (struct resolv_response_flags) { });
  resolv_response_add_question (b, qname, qclass, qtype);
  resolv_response_section (b, ns_s_an);
  resolv_response_open_record (b, qname, qclass, qtype, 0);
  resolv_response_add_data (b, &qtype, sizeof (qtype));
  resolv_response_close_record (b);
}