Lines Matching defs:packet

300  * Appends an OPT record to the packet.
303 add_edns(isc_buffer_t *packet, isc_boolean_t dnssec) {
306 if (isc_buffer_availablelength(packet) < EDNSLEN) {
307 perf_log_warning("failed to add OPT to query packet");
311 base = isc_buffer_base(packet);
313 isc_buffer_putuint8(packet, 0); /* root name */
314 isc_buffer_putuint16(packet, dns_rdatatype_opt);/* type */
315 isc_buffer_putuint16(packet, MAX_EDNS_PACKET); /* class */
316 isc_buffer_putuint8(packet, 0); /* xrcode */
317 isc_buffer_putuint8(packet, 0); /* version */
319 isc_buffer_putuint16(packet, 0x8000);
321 isc_buffer_putuint16(packet, 0);
322 isc_buffer_putuint16(packet, 0); /* rdlen */
413 * Appends a TSIG record to the packet.
416 add_tsig(isc_buffer_t *packet, perf_dnstsigkey_t *tsigkey)
436 if (totallen > isc_buffer_availablelength(packet)) {
441 base = isc_buffer_base(packet);
444 hmac_update(tsigkey, &hmac, isc_buffer_base(packet),
445 isc_buffer_usedlength(packet));
463 isc_buffer_copyregion(packet, &name_r); /* name */
464 isc_buffer_putuint16(packet, dns_rdatatype_tsig); /* type */
465 isc_buffer_putuint16(packet, dns_rdataclass_any); /* class */
466 isc_buffer_putuint32(packet, 0); /* ttl */
467 isc_buffer_putuint16(packet, rdlen); /* rdlen */
468 isc_buffer_copyregion(packet, alg_r); /* alg */
469 isc_buffer_putuint16(packet, 0); /* time high */
470 isc_buffer_putuint32(packet, now); /* time low */
471 isc_buffer_putuint16(packet, 300); /* fudge */
472 isc_buffer_putuint16(packet, tsigkey->digestlen); /* digest len */
473 isc_buffer_putmem(packet, digest, tsigkey->digestlen); /* digest */
474 isc_buffer_putmem(packet, base, 2); /* orig ID */
475 isc_buffer_putuint16(packet, 0); /* error */
476 isc_buffer_putuint16(packet, 0); /* other len */
819 /* Create the DNS packet header */