Synch to No Gnus 200405202205.
[elisp/gnus.git-] / lisp / dns.el
index 5dc49b7..4855b24 100644 (file)
@@ -56,6 +56,7 @@ If nil, /etc/resolv.conf will be consulted.")
     (MX 15)
     (TXT 16)
     (AAAA 28) ; RFC3596
+    (SRV 33) ; RFC2782
     (AXFR 252)
     (MAILB 253)
     (MAILA 254)
@@ -284,6 +285,11 @@ If TCP-P, the first two bytes of the package with be the length field."
                  (list 'retry (dns-read-int32))
                  (list 'expire (dns-read-int32))
                  (list 'minimum (dns-read-int32))))
+          ((eq type 'SRV)
+           (list (list 'priority (dns-read-bytes 2))
+                 (list 'weight (dns-read-bytes 2))
+                 (list 'port (dns-read-bytes 2))
+                 (list 'target (dns-read-name buffer))))
           ((eq type 'MX)
            (cons (dns-read-bytes 2) (dns-read-name buffer)))
           ((or (eq type 'CNAME) (eq type 'NS) (eq type 'PTR))
@@ -301,16 +307,12 @@ If TCP-P, the first two bytes of the package with be the length field."
       (setq dns-servers (nreverse dns-servers)))))
 
 ;;; Interface functions.
-(eval-when-compile
-  (when (featurep 'xemacs)
-    (require 'gnus-xmas)))
-
 (defmacro dns-make-network-process (server)
   (if (featurep 'xemacs)
       `(let ((coding-system-for-read 'binary)
             (coding-system-for-write 'binary))
-        (gnus-xmas-open-network-stream "dns" (current-buffer)
-                                       ,server "domain" 'udp))
+        (open-network-stream "dns" (current-buffer)
+                             ,server "domain" 'udp))
     `(let ((server ,server)
           (coding-system-for-read 'binary)
           (coding-system-for-write 'binary)