Gnus development mailing list
 help / color / mirror / Atom feed
From: Magnus Henoch <mange@freemail.hu>
Subject: SRV support for dns.el
Date: Sat, 15 May 2004 22:25:45 +0200	[thread overview]
Message-ID: <8765axfnee.fsf@freemail.hu> (raw)

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

The included patch enables dns.el to make SRV queries and parse the
results.  Can it be included in Gnus?

(SRV records are defined in RFC 2782.  In short, querying for
_foo._tcp.example.com returns the hostname and port number of the
server(s) providing service foo at example.com over TCP.)

Regards,
Magnus

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dns.el.patch --]
[-- Type: text/x-patch, Size: 871 bytes --]

Index: lisp/dns.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/dns.el,v
retrieving revision 7.4
diff -u -r7.4 dns.el
--- lisp/dns.el	18 Mar 2004 22:56:09 -0000	7.4
+++ lisp/dns.el	15 May 2004 20:21:11 -0000
@@ -56,6 +56,7 @@
     (MX 15)
     (TXT 16)
     (AAAA 28) ; RFC3596
+    (SRV 33) ; RFC2782
     (AXFR 252)
     (MAILB 253)
     (MAILA 254)
@@ -284,6 +285,11 @@
 		  (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))

             reply	other threads:[~2004-05-15 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-15 20:25 Magnus Henoch [this message]
2004-05-20 21:51 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8765axfnee.fsf@freemail.hu \
    --to=mange@freemail.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).