[dns-operations] wrapsrv -- DNS SRV record command line wrapper

Robert Edmonds edmonds at isc.org
Thu Jul 2 01:02:31 UTC 2009


i couldn't find any utility that wraps the SRV record lookup and
selection algorithm for commands that don't natively support the SRV
record, so i wrote my own.

it's available here:

    ftp://ftp.isc.org/isc/toolmakers/wrapsrv/

and requires libbind, available here:

    ftp://ftp.isc.org/isc/libbind/

though you may be able to modify it to compile without libbind if your
resolver library exports the required functions.

i'll upload a debian package shortly.

here's the man page:

NAME
       wrapsrv - DNS SRV record command line wrapper

SYNOPSIS
       wrapsrv [SRVNAME] [COMMAND] [OPTION]...

DESCRIPTION
       wrapsrv  adds  support for connecting to a network service based on
       DNS SRV record lookups to commands that do not support the DNS  SRV
       record.  wrapsrv implements the weighted priority client connection
       algorithm in RFC 2782. The specified command line will  be  invoked
       one or more times with %h and %p sequences in the command line sub-
       stituted for the hostname and port elements  of  the  selected  SRV
       record.  The  command  line  invoked must exit and return 0 after a
       successful connection or exit and return non-zero if the connection
       fails.  wrapsrv  will  itself exit with the return code of the last
       command line invocation, or it may exit with a non-zero return code
       if the DNS SRV record lookup fails for any reason.

-- 
Robert Edmonds
edmonds at isc.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.dns-oarc.net/pipermail/dns-operations/attachments/20090701/7255722a/attachment.sig>


More information about the dns-operations mailing list