Lines Matching defs:const

3 const assert = require('assert');
4 const os = require('os');
6 const types = {
19 const classes = {
27 const length = buffer[offset];
32 const chunk = buffer.toString('ascii', offset, offset + length);
34 const { nread, domain } = readDomainFromPacket(buffer, offset + length);
43 const pointeeOffset = buffer.readUInt16BE(offset) &~ 0xC000;
53 const parsed = {
58 const counts = [
66 for (const [ sectionName, count ] of counts) {
69 const { nread, domain } = readDomainFromPacket(buffer, offset);
72 const type = buffer.readUInt16BE(offset);
74 const rr = {
80 for (const name in types) {
87 const dataLength = buffer.readUInt16BE(offset);
106 const txtLength = buffer[offset];
119 const { nread, domain } = readDomainFromPacket(buffer, offset);
128 const { nread, domain } = readDomainFromPacket(buffer, offset);
135 const mname = readDomainFromPacket(buffer, offset);
136 const rname = readDomainFromPacket(buffer, offset + mname.nread);
139 const trailerOffset = offset + mname.nread + rname.nread;
166 const parts = ip.replace(/^:|:$/g, '').split(':');
167 const buf = Buffer.alloc(16);
170 for (const part of parts) {
193 const buffers = [];
194 const kStandardResponseFlags = 0x8180;
205 for (const q of parsed.questions) {
214 for (const rr of [].concat(parsed.answers,
227 const rdLengthBuf = new Uint16Array(1);
240 const total = rr.entries.map((s) => s.length).reduce((a, b) => a + b);
243 for (const txt of rr.entries) {
257 const domain = writeDomainName(rr.exchange || rr.value);
264 const mname = writeDomainName(rr.nsname);
265 const rname = writeDomainName(rr.hostmaster);
287 const buf = Buffer.from(typedArray.buffer,
298 const mockedErrorCode = 'ENOTFOUND';
299 const mockedSysCall = 'getaddrinfo';
303 const err = new Error(`${syscall} ${code} ${hostname}`);