[dns-operations] wrapsrv -- DNS SRV record command line wrapper
Robert Edmonds
edmonds at isc.org
Thu Jul 2 19:01:30 UTC 2009
Stephane Bortzmeyer wrote:
> % echo _jabber._tcp.google.com | srvsearch
> _jabber._tcp.google.com target=xmpp-server.l.google.com. priority=5 weight=0 port=5269 addresses=IPv4/209.85.163.125
> _jabber._tcp.google.com target=xmpp-server3.l.google.com. priority=20 weight=0 port=5269 addresses=IPv4/209.85.163.125
> ...
how is that any better than:
$ host -t srv _jabber._tcp.google.com
_jabber._tcp.google.com has SRV record 5 0 5269 xmpp-server.l.google.com.
_jabber._tcp.google.com has SRV record 20 0 5269 xmpp-server1.l.google.com.
[...]
?
wrapsrv constructs a command line for each target (selecting and
removing targets from the list per RFC 2782) and invokes the command
line until it succeeds or runs out of targets.
edmonds at chase{0}:~$ wrapsrv _jabber._tcp.google.com "echo %h %p && true"
xmpp-server.l.google.com 5269
edmonds at chase{0}:~$ wrapsrv _jabber._tcp.google.com "echo %h %p && false"
xmpp-server.l.google.com 5269
xmpp-server4.l.google.com 5269
xmpp-server1.l.google.com 5269
xmpp-server2.l.google.com 5269
xmpp-server3.l.google.com 5269
edmonds at chase{1}:~$
--
Robert Edmonds
edmonds at isc.org
More information about the dns-operations
mailing list