ObjFW  Diff

Differences From Artifact [f6b9d1d659]:

To Artifact [3f7ee0f68b]:


51
52
53
54
55
56
57
58
59
60



61
62
63
64
65
66
67
51
52
53
54
55
56
57



58
59
60
61
62
63
64
65
66
67







-
-
-
+
+
+







		    @"-c  --class= "
		    @"  The DNS class to query (defaults to IN)\n    "
		    @"-h  --help   "
		    @"  Show this help\n    "
		    @"-s  --server="
		    @"  The server to query\n    "
		    @"-t  --type=  "
		    @"  The record type to query (defaults to ALL, can be "
		    @"repeated)\n    "
		    @"    --tcp   "
		    @"  The record type to query (defaults to AAAA and A,\n"
		    @"                   can be repeated)\n    "
		    @"    --tcp    "
		    @"  Force using TCP for the query")];
	}

	[OFApplication terminateWithStatus: status];
}

@implementation OFDNS
190
191
192
193
194
195
196
197
198




199
200
201
202
203
204
205
190
191
192
193
194
195
196


197
198
199
200
201
202
203
204
205
206
207







-
-
+
+
+
+







	resolver = [OFDNSResolver resolver];
	resolver.configReloadInterval = 0;
	resolver.forcesTCP = forceTCP;

	DNSClass = (DNSClassString != nil
	    ? OFDNSClassParseName(DNSClassString) : OFDNSClassIN);

	if (recordTypes.count == 0)
		[recordTypes addObject: @"ALL"];
	if (recordTypes.count == 0) {
		[recordTypes addObject: @"AAAA"];
		[recordTypes addObject: @"A"];
	}

	if (server != nil)
		resolver.nameServers = [OFArray arrayWithObject: server];

	for (OFString *domainName in remainingArguments) {
		for (OFString *recordTypeString in recordTypes) {
			OFDNSRecordType recordType =