man(1) Manual page archive


     QNS(7)                                                     QNS(7)

     NAME
          qns - query name server

     SYNOPSIS
          qns [ -n server ] [ request ]

     DESCRIPTION
          Qns retrieves information from a database of naming informa-
          tion.  It is used by rsh and rlogin (see dcon(1)) to trans-
          late names to internet addresses and by mail(1) to route
          electronic mail.

          Entries in the database consist of one or more value,type
          pairs or simple values. A simple value declares the name of
          some entity.  An entry may contain no name or several, and
          different entries containing the same name need not refer to
          the same entity.

          These types are used:

          dk      Value is a Datakit address.
          in      Value is a numeric IP address.
          dom     Value is an internet domain name.
          tel     Value is a telephone number, possibly prefixed by a
                  uucp Dialcodes name.
          org     Value is an organization name.
          svc     Value names a service.
          origin  Value must be local, for sorting by `distance'; see
                  below.

          The following entries describe an entity research with a
          Datakit address, an IP address and domain name, belonging to
          organization att, and offering the uucp service:

               192.11.4.55,in research research.astro.nj.att.com.,dom att,org
               research nj/astro/research,dk uucp,svc att,org

          Qns prints database entries that match requests. If a
          request is supplied on the command line, qns prints the
          answer and exits; otherwise it reads and answers requests
          from the standard input until end-of-file.  The possible
          requests are:

          set key...
               Print every entry matching all keys.

          value tlist key...
               Examine entries matching the keys until a pair with
               type tlist is found; print the matching value and stop.
               Tlist may be a single type, or several separated by

     QNS(7)                                                     QNS(7)

               `|'.

          reset
               Cause the name server to reinitialize its database.

          help Print a list of requests.

          quit Exit qns.

          A key is a value,type pair; an entry matches if it contains
          that pair.  If ,type is omitted, any pair with the specified
          value will do.  A * at the end of a value stands for an
          arbitrary suffix.

          When a database search returns several entries with dk or
          dom types, and the database contains an entry with the con-
          ventional pair local,origin, the entries are sorted by
          increasing `distance' from the dk or dom pairs in the
          local,origin entry.  Datakit names in the same exchange are
          nearer than names in different exchanges in the same area,
          which are nearer than names in different areas.  Domain
          names matching to four levels of domain hierarchy are nearer
          than names matching to only three levels, and so on.

          Qns expects to reach the name server ns(8); option -n points
          it at service server instead.

     SEE ALSO
          ipc(3), ns(8)