1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;; Copyright (C) 2006, 2007 Stelian Ionescu
5 ;; This code is free software; you can redistribute it and/or
6 ;; modify it under the terms of the version 2.1 of
7 ;; the GNU Lesser General Public License as published by
8 ;; the Free Software Foundation, as clarified by the
9 ;; preamble found here:
10 ;; http://opensource.franz.com/preamble.html
12 ;; This program is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU Lesser General
18 ;; Public License along with this library; if not, write to the
19 ;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 ;; Boston, MA 02110-1301, USA
22 (in-package :net.sockets
)
24 (define-constant +opcode-standard
+ 0)
26 (define-constant +query-type-map
39 (defun query-type-number (id)
40 (cdr (assoc id
+query-type-map
)))
42 (defun query-type-id (number)
43 (car (rassoc number
+query-type-map
)))
45 (defun valid-type-p (id)
46 (query-type-number id
))
48 (define-constant +query-class-map
52 (defun query-class-number (id)
53 (cdr (assoc id
+query-class-map
)))
55 (defun query-class-id (number)
56 (car (rassoc number
+query-class-map
)))
58 (define-constant +rcode-map
63 (:not-implemented .
4)
66 (defun rcode-number (id)
67 (cdr (assoc id
+rcode-map
)))
69 (defun rcode-id (number)
70 (car (rassoc number
+rcode-map
)))
72 (define-constant +dns-datagram-size
+ 512)