From 32cabfdbb1a25efe8c07a5dd3783295fbb28be4f Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 26 Sep 2021 17:01:27 +0530 Subject: [PATCH] removed methods that exists in IDnsApplication. --- .../IDnsAppRecordRequestHandler.cs | 15 +-------------- .../IDnsAuthoritativeRequestHandler.cs | 15 +-------------- .../{IDnsLogger.cs => IDnsQueryLogger.cs} | 14 +------------- .../IDnsRequestController.cs | 15 +-------------- 4 files changed, 4 insertions(+), 55 deletions(-) rename DnsServerCore.ApplicationCommon/{IDnsLogger.cs => IDnsQueryLogger.cs} (92%) diff --git a/DnsServerCore.ApplicationCommon/IDnsAppRecordRequestHandler.cs b/DnsServerCore.ApplicationCommon/IDnsAppRecordRequestHandler.cs index 039f3339..6283bcae 100644 --- a/DnsServerCore.ApplicationCommon/IDnsAppRecordRequestHandler.cs +++ b/DnsServerCore.ApplicationCommon/IDnsAppRecordRequestHandler.cs @@ -17,7 +17,6 @@ along with this program. If not, see . */ -using System; using System.Net; using System.Threading.Tasks; using TechnitiumLibrary.Net.Dns; @@ -27,15 +26,8 @@ namespace DnsServerCore.ApplicationCommon /// /// Allows a DNS App to handle incoming DNS requests for configured APP records in the DNS server zones. /// - public interface IDnsAppRecordRequestHandler : IDisposable + public interface IDnsAppRecordRequestHandler { - /// - /// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading. - /// - /// The DNS server interface object that allows access to DNS server properties. - /// The DNS application config stored in the dnsApp.config file. - Task InitializeAsync(IDnsServer dnsServer, string config); - /// /// Allows a DNS App to respond to the incoming DNS requests for an APP record in a primary or secondary zone. /// @@ -49,11 +41,6 @@ namespace DnsServerCore.ApplicationCommon /// The DNS response for the DNS request or null to send no answer response with an SOA authority. Task ProcessRequestAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, bool isRecursionAllowed, string zoneName, uint appRecordTtl, string appRecordData); - /// - /// The description about this app to be shown in the Apps section of the DNS web console. - /// - string Description { get; } - /// /// A template of the record data format that is required by this app. This template is populated in the UI to allow the user to edit in the expected values. The format could be JSON or any other custom text based format which the app is programmed to parse. This property is optional and can return null if no APP record data is required by the app. /// diff --git a/DnsServerCore.ApplicationCommon/IDnsAuthoritativeRequestHandler.cs b/DnsServerCore.ApplicationCommon/IDnsAuthoritativeRequestHandler.cs index 268a5834..6b677076 100644 --- a/DnsServerCore.ApplicationCommon/IDnsAuthoritativeRequestHandler.cs +++ b/DnsServerCore.ApplicationCommon/IDnsAuthoritativeRequestHandler.cs @@ -17,7 +17,6 @@ along with this program. If not, see . */ -using System; using System.Net; using System.Threading.Tasks; using TechnitiumLibrary.Net.Dns; @@ -27,15 +26,8 @@ namespace DnsServerCore.ApplicationCommon /// /// Lets a DNS App to handle incoming requests for the DNS server's authoritative zone allowing it to act as an authoritative zone by itself and respond to any requests. /// - public interface IDnsAuthoritativeRequestHandler : IDisposable + public interface IDnsAuthoritativeRequestHandler { - /// - /// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading. - /// - /// The DNS server interface object that allows access to DNS server properties. - /// The DNS application config stored in the dnsApp.config file. - Task InitializeAsync(IDnsServer dnsServer, string config); - /// /// Allows a DNS App to respond to an incoming DNS request for the DNS server's authoritative zone. This method is called by the DNS Server's authoritative zone before querying its built in zone database. Response returned may be further processed to resolve CNAME or ANAME records, or referral response. /// @@ -45,10 +37,5 @@ namespace DnsServerCore.ApplicationCommon /// Tells if the DNS server is configured to allow recursion for the client making this request. /// The DNS response for the DNS request or null to let the DNS server core process the request as usual. Task ProcessRequestAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, bool isRecursionAllowed); - - /// - /// The description about this app to be shown in the Apps section of the DNS web console. - /// - string Description { get; } } } diff --git a/DnsServerCore.ApplicationCommon/IDnsLogger.cs b/DnsServerCore.ApplicationCommon/IDnsQueryLogger.cs similarity index 92% rename from DnsServerCore.ApplicationCommon/IDnsLogger.cs rename to DnsServerCore.ApplicationCommon/IDnsQueryLogger.cs index 0e7c5507..14b59840 100644 --- a/DnsServerCore.ApplicationCommon/IDnsLogger.cs +++ b/DnsServerCore.ApplicationCommon/IDnsQueryLogger.cs @@ -36,15 +36,8 @@ namespace DnsServerCore.ApplicationCommon /// /// Allows a DNS App to log incoming DNS requests and their corresponding responses. /// - public interface IDnsLogger : IDisposable + public interface IDnsQueryLogger { - /// - /// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading. - /// - /// The DNS server interface object that allows access to DNS server properties. - /// The DNS application config stored in the dnsApp.config file. - Task InitializeAsync(IDnsServer dnsServer, string config); - /// /// Allows a DNS App to log incoming DNS requests and responses. This method is called by the DNS Server after an incoming request is processed and a response is sent. /// @@ -71,11 +64,6 @@ namespace DnsServerCore.ApplicationCommon /// Optional parameter to filter records by the request QCLASS. /// The DnsLogPage object that contains all the entries in the requested page number. Task QueryLogsAsync(long pageNumber, int entriesPerPage, bool descendingOrder, DateTime? start, DateTime? end, IPAddress clientIpAddress, DnsTransportProtocol? protocol, DnsServerResponseType? responseType, DnsResponseCode? rcode, string qname, DnsResourceRecordType? qtype, DnsClass? qclass); - - /// - /// The description about this app to be shown in the Apps section of the DNS web console. - /// - string Description { get; } } public class DnsLogPage diff --git a/DnsServerCore.ApplicationCommon/IDnsRequestController.cs b/DnsServerCore.ApplicationCommon/IDnsRequestController.cs index d3992588..062df0ad 100644 --- a/DnsServerCore.ApplicationCommon/IDnsRequestController.cs +++ b/DnsServerCore.ApplicationCommon/IDnsRequestController.cs @@ -17,7 +17,6 @@ along with this program. If not, see . */ -using System; using System.Net; using System.Threading.Tasks; using TechnitiumLibrary.Net.Dns; @@ -45,15 +44,8 @@ namespace DnsServerCore.ApplicationCommon /// /// Allows a DNS App to inspect and optionally block incoming DNS requests before they are processed by the DNS Server core. /// - public interface IDnsRequestController : IDisposable + public interface IDnsRequestController { - /// - /// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading. - /// - /// The DNS server interface object that allows access to DNS server properties. - /// The DNS application config stored in the dnsApp.config file. - Task InitializeAsync(IDnsServer dnsServer, string config); - /// /// Allows a DNS App to inspect an incoming DNS request and decide whether to allow or block it. This method is called by the DNS Server before an incoming request is processed. /// @@ -62,10 +54,5 @@ namespace DnsServerCore.ApplicationCommon /// The protocol using which the request was received. /// The action that must be taken by the DNS server i.e. if the request must be allowed or dropped. Task GetRequestActionAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol); - - /// - /// The description about this app to be shown in the Apps section of the DNS web console. - /// - string Description { get; } } }