Class | Package: socket | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## dns-rr

The class of a `dns-rr` object. When dns-query is called with the decode argument `nil`, the response from the nameserver is returned in its raw form. The response is represented by a `dns-response` object. The answer, authority and additional fields of a dns-response object contain `dns-rr` objects.

`dns-rr` objects have the following slots and accessors:

- `name`, accessor is dns-rr-name. A string in fully qualified domain name format (e.g. "foo.bar.com"). This is the name that the rest of the dns-rr is describing.
- `type`, accessor is dns-rr-type. This is a number or keyword symbol describing the type of object.

  The type `:a` means that this dns-rr contains the host address of the name in the answer slot.

  The type `:ns` means that this dns-rr is describing the authoritative nameserver for this name in the answer slot. The answer slot is a string naming the nameserver's host name. Generally the additional slot of the dns-response will contain a dns-rr of type `:a` with the IP address of the nameserver.

  The type `:mx` means that the answer is a mail exchanger machine name for the name.

  The type `:soa` describes an authority object. When a query for an unknown host is made, the authority field of the `dns-response` usually contains a dns-rr `:soa` object describing which domain's authority has specified that that host doesn't exist.

  The type `:cname` describes the machine for which name is just an alias.

  The type `:ptr` describes the name of a machine as well and is used in determining a machine name given its IP address.

- `class`, accessor is dns-rr-class. This value is always 1, meaning "the Internet".
- `answer`, accessor is dns-rr-answer. For a `:type :a` response this contains the IP address of the name in integer format. For type `:mx`, `:ns`, `:cname` and `:ptr` the answer is a string naming a machine.
- `time-to-live`, accessor is dns-rr-time-to-live. An integer number of seconds for which the answer given is valid and can be cached.

See dns.htm.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version