DnsServerApp

DNS Server Application Configuration

The N2SVCD DNS Server Application listens for inbound ENUM.

The DNS Server Application does not process any user content itself. It exists only as an agent to receive requests on behalf of another application.

Typical uses of the DnsServerApp are:

In practice, these DNS requests are typically ENUM lookups.

See the N2SVCD Configuration Overview for more information on how the DNS Server Application interacts with other components.

The following configuration is used to create a DNS Application UDP Server instance.

<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
  ...
  <applications>
    ...
    <application name="DNS-SERVER" module="DnsServerApp">
      <include><lib>../apps/dns_s/lib</lib></include>
      <parameters>
        <parameter name="local_port" value="1053"/>
      </parameters>
      <config>
        <handlers>
          <handler opcode="0" application="Logic"/>
        </handlers>
      </config>
    </application>
    ...
  </application>
  ...
</n2svcd>

Configuration Details

The application element attributes for a DNS Server Application instance may include the below.

For details of the various parameter types used, refer to Common Configuration.

Parameter Name Type XML Type Description
See: Common Application configuration
See: TCP Application configuration
Note that the TCP Application framework somewhat misnamed, as it also supports UDP.
module String Attribute [Required] DnsServerApp
include.lib String Element [Required] ../apps/dns_s/lib
parameters Array Element [Required] As per Common Configuration Application parameters.
"edr_enabled" - - This value is ignored; the DNS Server Application Application does not support writing EDRs.
"socket_mode" String Attribute The DNS Server Application supports only udp (UDP Server).
(Default = udp)
"local_port" Positive Integer Attribute As per common UDP configuration for local_port.
(Default = 53)
"ping_interval" - - This value is ignored; the DNS Server Application does not support sending of ping messages.
config Object Element Container for extended configuration for this application.
.handlers Array Element Array of handler elements, rules for selecting the owning Application for inbound DNS requests.

DNS Handlers

Handler rules define which application is used to process inbound DNS Requests. Each handler Object in the config.handlers Array is configured as follows.

Parameter Name Type XML Type Description
opcode Integer Attribute The inbound DNS Request opcode (0 = QUERY, 1 = IQUERY, 2 = STATUS).
(Default = Handle all opcodes)
application String Attribute [Required] The name of the application that should process matching messages. This will normally refer to a LogicApp instance.

The handlers will be checked in order, and the first matching handler will be used.

Message Handling

In addition to the common Application management messages, the DnsServerApp uses the following messages: