/* * Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

unsignedintignore;/* ignore tc in response */unsignedinttc;/* set tc in request */unsignedintrd;/* set rd in request */unsignedintra;/* set ra in request */unsignedintcd;/* set cd in request */unsignedintad;/* set ad in request */unsignedintaa;/* set aa in request */unsignedintz;/* set z in request */unsignedintopcode;/* use opcode for request */unsignedshorttype;/* query type code */

intseenopt;/* see a EDNS response */intseenedns;/* see a EDNS response */intseenfailure;/* see a lookup failure */intallok;/* all answers are current ok */intallrefused;/* all answers are current ok */intallservfail;/* all answers are current ok */

intreadlen;/* how much we need to read */intread;/* how much has been read so far */unsignedcharbuf[512];/* the question we sent */unsignedchartcpbuf[0x10000];/* where to accumulate the tcp response */structsummary*summary;/* where this test is summaried */

/* * Check if we have a outstanding icmp with this sequence number * to this address. */staticintcheckseq(structsockaddr_storage*storage,intid){structworkitem*item;item=HEAD(seq[id]);while(item!=NULL&&!storage_equal(storage,&item->summary->storage))item=NEXT(item,seqlink);return((item==NULL)?1:0);}