Repository navigation
Expand file tree
/
Copy pathIDnsQueryResponse.cs
More file actions
87 lines (74 loc) · 2.59 KB
/
Copy pathIDnsQueryResponse.cs
File metadata and controls
87 lines (74 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright 2024 Michael Conrad.
// Licensed under the Apache License, Version 2.0.
// See LICENSE file for details.
using System.Collections.Generic;
using DnsClient.Protocol;
namespace DnsClient
{
/// <summary>
/// Contract defining the result of a query performed by <see cref="IDnsQuery"/>.
/// </summary>
/// <seealso cref="IDnsQuery"/>
/// <seealso cref="ILookupClient"/>
public interface IDnsQueryResponse
{
/// <summary>
/// Gets the list of questions.
/// </summary>
IReadOnlyList<DnsQuestion> Questions { get; }
/// <summary>
/// Gets a list of additional records.
/// </summary>
IReadOnlyList<DnsResourceRecord> Additionals { get; }
/// <summary>
/// Gets a list of all answers, additional and authority records.
/// </summary>
IEnumerable<DnsResourceRecord> AllRecords { get; }
/// <summary>
/// Gets a list of answer records.
/// </summary>
IReadOnlyList<DnsResourceRecord> Answers { get; }
/// <summary>
/// Gets a list of authority records.
/// </summary>
IReadOnlyList<DnsResourceRecord> Authorities { get; }
/// <summary>
/// Gets the audit trail if <see cref="DnsQueryOptions.EnableAuditTrail"/>. as set to <c>true</c>, <c>null</c> otherwise.
/// </summary>
/// <value>
/// The audit trail.
/// </value>
string AuditTrail { get; }
/// <summary>
/// Returns a string value representing the error response code in case an error occurred,
/// otherwise '<see cref="DnsResponseCode.NoError"/>'.
/// </summary>
string ErrorMessage { get; }
/// <summary>
/// A flag indicating if the header contains a response code other than <see cref="DnsResponseCode.NoError"/>.
/// </summary>
bool HasError { get; }
/// <summary>
/// Gets the header of the response.
/// </summary>
DnsResponseHeader Header { get; }
/// <summary>
/// Gets the size of the message.
/// </summary>
/// <value>
/// The size of the message.
/// </value>
int MessageSize { get; }
/// <summary>
/// Gets the name server which responded with this result.
/// </summary>
/// <value>
/// The name server.
/// </value>
NameServer NameServer { get; }
/// <summary>
/// Gets the settings used to produce this response.
/// </summary>
DnsQuerySettings Settings { get; }
}
}