1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
#
# $Id: README,v 1.5 2004/10/26 18:18:35 evertonm Exp $
#
COPYRIGHT AND LICENCE
Copyright (C) 2004 by Everton da Silva Marques
RULI is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
RULI is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with RULI; see the file COPYING. If not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
INTRODUCTION
This file provides introductory notes about the Guile/Scheme
extension for RULI, a library for easily querying DNS SRV resource
records (RFC 2782).
This module requires the RULI library, available from:
http://www.nongnu.org/ruli/
You'll need RULI 0.32 or higher.
INSTALLATION
1) Make sure you have, at least, both Guile and RULI properly
installed on your system.
2) Compile this Guile extension for RULI (libguile-ruli.so):
make
3) Put libguile-ruli.so in the dynamic loader path and ruli.scm in the
Guile autoload path.
See the comments in the file ruli.scm, if you need more detailed
instructions.
USAGE
In the Guile interpreter, you can load the ruli module (extension)
with:
(use-modules (ruli))
SCHEME FUNCTIONS
This module provides the following functions:
(ruli-sync-query service domain fallback_port [options])
(ruli-sync-smtp-query domain [options])
(ruli-sync-http-query domain [force-port [options]])
Possible results are:
1) Symbol 'timeout'
2) Symbol 'unavailable'
3) List of errors: ( (srv-code <number>) [(rcode <number>)] )
4) List of SRV records, possibly empty, as in this example:
(
(
(target "host1.domain")
(priority 0)
(weight 10)
(port 25)
(addresses "1.1.1.1" "2.2.2.2")
)
(
(target "host2.domain")
(priority 0)
(weight 0)
(port 80)
(addresses "3.3.3.3" "4.4.4.4")
)
)
EXAMPLES
These are examples of invokation for the functions provided in this
module:
(ruli-sync-query "_sip._udp" "sip-domain.tld" -1)
(ruli-sync-smtp-query "mail-domain.tld")
(ruli-sync-http-query "web-domain.tld")
-x-
|