27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
@end
OF_APPLICATION_DELEGATE(OFDNS)
@implementation OFDNS
- (void)resolver: (OFDNSResolver *)resolver
didResolveDomainName: (OFString *)domainName
answerRecords: (of_dns_resolver_records_t)answerRecords
authorityRecords: (of_dns_resolver_records_t)authorityRecords
additionalRecords: (of_dns_resolver_records_t)additionalRecords
exception: (id)exception
{
if (exception != nil) {
[of_stderr writeFormat: @"Failed to resolve: %@\n", exception];
[OFApplication terminateWithStatus: 1];
}
[of_stdout writeFormat: @"FQDN: %@\n"
@"Answer records: %@\n"
@"Authority records: %@\n"
@"Additional records: %@\n",
domainName, answerRecords, authorityRecords,
additionalRecords];
[OFApplication terminate];
}
- (void)applicationDidFinishLaunching
{
OFArray OF_GENERIC(OFString *) *arguments = [OFApplication arguments];
|
|
<
<
|
<
<
|
<
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
@end
OF_APPLICATION_DELEGATE(OFDNS)
@implementation OFDNS
- (void)resolver: (OFDNSResolver *)resolver
didResolveDomainName: (OFString *)domainName
response: (OFDNSResponse *)response
exception: (id)exception
{
if (exception != nil) {
[of_stderr writeFormat: @"Failed to resolve: %@\n", exception];
[OFApplication terminateWithStatus: 1];
}
[of_stdout writeFormat: @"FQDN: %@\n"
@"Response: %@\n",
domainName, response];
[OFApplication terminate];
}
- (void)applicationDidFinishLaunching
{
OFArray OF_GENERIC(OFString *) *arguments = [OFApplication arguments];
|