+ MKQUERY_STOP(vb);
+
+ st= mkquery_footer(vb,typei->type);
+
+ return adns_s_ok;
+}
+
+adns_status adns__mkquery_frdgram(adns_state ads, vbuf *vb, int *id_r,
+ const byte *qd_dgram, int qd_dglen, int qd_begin,
+ adns_rrtype type, adns_queryflags flags) {
+ byte *rqp;
+ findlabel_state fls;
+ int lablen, labstart;
+ adns_status st;
+
+ st= mkquery_header(ads,vb,id_r,qd_dglen); if (st) return st;
+
+ MKQUERY_START(vb);
+
+ adns__findlabel_start(&fls,ads,-1,0,qd_dgram,qd_dglen,qd_dglen,qd_begin,0);
+ for (;;) {
+ st= adns__findlabel_next(&fls,&lablen,&labstart); assert(!st);
+ if (!lablen) break;
+ assert(lablen<255);
+ MKQUERY_ADDB(lablen);
+ memcpy(rqp,qd_dgram+labstart,lablen);
+ rqp+= lablen;
+ }