[go: up one dir, main page]

File: ruli.scm

package info (click to toggle)
ruli 0.36-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,144 kB
  • sloc: ansic: 12,599; sh: 416; makefile: 350; perl: 196; java: 112; php: 55; pascal: 33; lisp: 31
file content (100 lines) | stat: -rw-r--r-- 2,539 bytes parent folder | download | duplicates (5)
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
; RULI - Resolver User Layer Interface - Querying DNS SRV records
; Copyright (C) 2004 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.
;
; $Id: ruli.scm,v 1.4 2005/01/04 17:16:22 evertonm Exp $
;
; This is the Guile autoload file for the RULI extension.
;
; INSTALLATION:
;
; 1) Compile the library 'libguile-ruli.so'.
;
;    See the file README for details.
;
; 2) Put libguile-ruli.so in the dynamic loader path.
;
;    Under Linux, see the file /etc/ld.so.conf
;    or the LD_LIBRARY_PATH environment variable.
;
; 3) Put this file (ruli.scm) in the Guile autoload path.
;
;    See the GUILE_LOAD_PATH environment variable.
;
;    Run this shell command to find out the current
;    autoload path:
;
;    guile -c '(write %load-path) (newline)'
;
; 4) In the Guile interpreter, you can load the ruli module with:
;
;    (use-modules (ruli))
;
; USAGE:
;
; (ruli-sync-query service domain fallback_port [options])
;
; (ruli-sync-smtp-query domain [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:
;
; (ruli-sync-query "_http._tcp" "web-domain.tld" -1)
;
; (ruli-sync-smtp-query "mail-domain.tld")


; Module name
;
(define-module (ruli))

; Public symbols
;
(export ruli-sync-query)
(export ruli-sync-smtp-query)
(export ruli-sync-http-query)

; Initialize module from library (extension)
;
(load-extension "libguile-ruli" "ruli_guile_init")


; EOF