2002-06-08 11:08:31 -04:00
|
|
|
;; Scheme 48 package definitions for the
|
2002-08-26 11:12:06 -04:00
|
|
|
;; Scheme Untergrund Networking Suite
|
|
|
|
|
|
|
|
;;; This file is part of the Scheme Untergrund Networking package.
|
|
|
|
|
|
|
|
;;; Copyright (c) 1994 by Brian D. Carlstrom and Olin Shivers.
|
|
|
|
;;; Copyright (c) 1996-2002 by Mike Sperber.
|
|
|
|
;;; Copyright (c) 2000-2002 by Martin Gasbichler.
|
|
|
|
;;; Copyright (c) 2002 by Andreas Bernauer.
|
|
|
|
;;; For copyright information, see the file COPYING which comes with
|
|
|
|
;;; the distribution.
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
;; Interfaces
|
|
|
|
|
|
|
|
;; Net protocols and formats
|
|
|
|
|
|
|
|
(define-interface parse-html-forms-interface
|
|
|
|
(export parse-html-form-query unescape-uri+))
|
|
|
|
|
|
|
|
(define-interface htmlout-interface
|
|
|
|
(export emit-tag
|
|
|
|
emit-close-tag
|
|
|
|
|
|
|
|
emit-p
|
|
|
|
emit-title
|
|
|
|
emit-header ; And so forth...
|
|
|
|
|
|
|
|
with-tag
|
|
|
|
with-tag*
|
|
|
|
|
|
|
|
escape-html
|
|
|
|
emit-text))
|
|
|
|
|
|
|
|
(define-interface smtp-interface
|
|
|
|
(export sendmail %sendmail
|
|
|
|
expn vrfy mail-help
|
|
|
|
smtp-transactions
|
|
|
|
smtp-transactions/no-close
|
|
|
|
smtp/open smtp/helo smtp/mail smtp/rcpt smtp/data
|
|
|
|
smtp/send smtp/soml smtp/saml smtp/rset smtp/expn
|
|
|
|
smtp/help smtp/noop smtp/quit smtp/turn
|
|
|
|
handle-smtp-reply
|
|
|
|
read-smtp-reply
|
|
|
|
parse-smtp-reply
|
|
|
|
smtp-stuff))
|
|
|
|
|
|
|
|
(define-interface smtp-internals-interface
|
|
|
|
(export read-crlf-line ; These two should be in an
|
|
|
|
write-crlf ; auxiliary module.
|
|
|
|
|
|
|
|
smtp-query
|
|
|
|
nullary-smtp-command
|
|
|
|
unary-smtp-command))
|
|
|
|
|
|
|
|
(define-interface rfc822-interface
|
|
|
|
(export read-rfc822-headers
|
|
|
|
read-rfc822-field
|
|
|
|
%read-rfc822-headers
|
|
|
|
%read-rfc822-field
|
|
|
|
rejoin-header-lines
|
|
|
|
get-header-all
|
|
|
|
get-header-lines
|
|
|
|
get-header
|
|
|
|
))
|
|
|
|
|
|
|
|
(define-interface uri-interface
|
|
|
|
(export parse-uri
|
|
|
|
uri-escaped-chars
|
|
|
|
unescape-uri
|
|
|
|
escape-uri
|
|
|
|
resolve-uri
|
|
|
|
split-uri-path
|
|
|
|
uri-path-list->path
|
|
|
|
simplify-uri-path))
|
|
|
|
|
|
|
|
(define-interface url-interface
|
|
|
|
(export userhost? ; USERHOST
|
|
|
|
make-userhost ; record struct
|
|
|
|
|
|
|
|
userhost:user
|
|
|
|
userhost:password
|
|
|
|
userhost:host
|
|
|
|
userhost:port
|
|
|
|
|
|
|
|
set-userhost:user
|
|
|
|
set-userhost:password
|
|
|
|
set-userhost:host
|
|
|
|
set-userhost:port
|
|
|
|
|
|
|
|
parse-userhost ; parse &
|
|
|
|
userhost->string ; unparse.
|
|
|
|
|
|
|
|
http-url? ; HTTP-URL
|
|
|
|
make-http-url ; record struct
|
|
|
|
|
|
|
|
http-url:userhost
|
|
|
|
http-url:path
|
|
|
|
http-url:search
|
|
|
|
http-url:frag-id
|
|
|
|
|
|
|
|
set-http-url:userhost
|
|
|
|
set-http-url:path
|
|
|
|
set-http-url:search
|
|
|
|
set-http-url:frag-id
|
|
|
|
|
|
|
|
parse-http-url ; parse &
|
|
|
|
http-url->string))
|
|
|
|
|
|
|
|
(define-interface ftp-interface
|
|
|
|
(export ftp-connect
|
|
|
|
ftp-login
|
|
|
|
ftp-type
|
|
|
|
ftp-rename
|
|
|
|
ftp-delete
|
|
|
|
ftp-cd
|
|
|
|
ftp-cdup
|
|
|
|
ftp-pwd
|
|
|
|
ftp-rmdir
|
|
|
|
ftp-mkdir
|
|
|
|
ftp-modification-time
|
|
|
|
ftp-size
|
|
|
|
ftp-abort
|
|
|
|
ftp-quit
|
|
|
|
ftp-ls
|
|
|
|
ftp-dir
|
|
|
|
ftp-get
|
|
|
|
ftp-put
|
|
|
|
ftp-append
|
|
|
|
ftp-quot
|
|
|
|
ftp-error?))
|
|
|
|
|
|
|
|
(define-interface ftp-obsolete-interface
|
|
|
|
(export ftp:connect
|
|
|
|
ftp:login
|
|
|
|
ftp:type
|
|
|
|
ftp:rename
|
|
|
|
ftp:delete
|
|
|
|
ftp:cd
|
|
|
|
ftp:cdup
|
|
|
|
ftp:pwd
|
|
|
|
ftp:rmdir
|
|
|
|
ftp:mkdir
|
|
|
|
ftp:modification-time
|
|
|
|
ftp:size
|
|
|
|
ftp:abort
|
|
|
|
ftp:quit
|
|
|
|
ftp:ls
|
|
|
|
ftp:dir
|
|
|
|
ftp:get
|
|
|
|
ftp:put
|
|
|
|
ftp:append
|
|
|
|
ftp:quot))
|
|
|
|
|
|
|
|
(define-interface netrc-interface
|
|
|
|
(export user-mail-address
|
|
|
|
netrc:lookup
|
|
|
|
netrc:lookup-password
|
|
|
|
netrc:lookup-login
|
|
|
|
netrc:parse
|
|
|
|
netrc:try-parse
|
|
|
|
netrc-refuse?))
|
|
|
|
|
|
|
|
(define-interface pop3-interface
|
|
|
|
(export pop3-connect
|
|
|
|
pop3-login
|
|
|
|
pop3-stat
|
|
|
|
pop3-get
|
|
|
|
pop3-headers
|
|
|
|
pop3-last
|
|
|
|
pop3-delete
|
|
|
|
pop3-reset
|
|
|
|
pop3-quit))
|
|
|
|
|
|
|
|
(define-interface pop3-obsolete-interface
|
|
|
|
(export pop3:connect
|
|
|
|
pop3:login
|
|
|
|
pop3:stat
|
|
|
|
pop3:get
|
|
|
|
pop3:headers
|
|
|
|
pop3:last
|
|
|
|
pop3:delete
|
|
|
|
pop3:reset
|
|
|
|
pop3:quit))
|
|
|
|
|
|
|
|
(define-interface nettime-interface
|
|
|
|
(export net-time
|
|
|
|
net-daytime))
|
|
|
|
|
|
|
|
(define-interface nettime-obsolete-interface
|
|
|
|
(export net:time
|
|
|
|
net:daytime))
|
|
|
|
|
|
|
|
(define-interface dns-interface
|
2002-07-07 13:43:32 -04:00
|
|
|
(export dns-clear-cache ; clears the cache
|
|
|
|
dns-lookup ; complex lookup function
|
|
|
|
dns-lookup-name ; simple lookup function
|
|
|
|
dns-inverse-lookup ; obsolete, use dns-lookup-ip
|
|
|
|
dns-lookup-ip ; simple lookup function
|
|
|
|
dns-lookup-nameserver ; simple lookup function
|
|
|
|
dns-lookup-mail-exchanger ; simple lookpu function
|
|
|
|
show-dns-message ; prints a human readable dns-msg
|
|
|
|
force-ip ; reruns a lookup until a ip is resolved
|
|
|
|
force-ip-list ; reruns a lookup until a list of ips is resolved
|
|
|
|
address32->ip-string ; converts a address32 in an ip-string
|
|
|
|
ip-string->address32 ; converts a ip-string in an address32
|
|
|
|
dns-find-nameserver ; returns a nameserver
|
|
|
|
dns-find-nameserver-list)) ; returns a list of nameservers
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface cgi-script-interface
|
|
|
|
(export cgi-form-query))
|
|
|
|
|
|
|
|
;; Utility libraries
|
|
|
|
|
|
|
|
(define-interface rate-limit-interface
|
|
|
|
(export make-rate-limiter
|
|
|
|
rate-limit-block
|
|
|
|
rate-limit-open
|
|
|
|
rate-limit-close
|
|
|
|
rate-limiter-current-requests))
|
|
|
|
|
|
|
|
(define-interface crlf-io-interface
|
|
|
|
(export read-crlf-line
|
|
|
|
read-crlf-line-timeout
|
|
|
|
write-crlf))
|
|
|
|
|
|
|
|
(define-interface ls-interface
|
|
|
|
(export ls-crlf?
|
|
|
|
ls
|
|
|
|
arguments->ls-flags))
|
|
|
|
|
|
|
|
(define-interface format-net-interface
|
|
|
|
(export format-internet-host-address
|
|
|
|
format-port))
|
|
|
|
|
|
|
|
(define-interface sunet-utilities-interface
|
|
|
|
(export host-name-or-ip
|
2002-08-24 12:43:26 -04:00
|
|
|
on-interrupt
|
2002-08-26 10:49:17 -04:00
|
|
|
socket-address->string
|
|
|
|
dump
|
2002-08-26 12:36:25 -04:00
|
|
|
system-fqdn
|
|
|
|
copy-inport->outport
|
|
|
|
dotdot-check))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface handle-fatal-error-interface
|
|
|
|
(export with-fatal-error-handler*
|
|
|
|
(with-fatal-error-handler :syntax)))
|
|
|
|
|
|
|
|
;; FTP server
|
|
|
|
|
|
|
|
(define-interface ftpd-interface
|
|
|
|
(export ftpd
|
|
|
|
ftpd-inetd))
|
|
|
|
|
|
|
|
;; Web server
|
|
|
|
|
|
|
|
(define-interface httpd-core-interface
|
2002-08-27 05:39:05 -04:00
|
|
|
(export httpd))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface httpd-make-options-interface
|
2002-08-26 09:10:57 -04:00
|
|
|
(export make-httpd-options
|
|
|
|
with-port
|
2002-06-08 11:08:31 -04:00
|
|
|
with-root-directory
|
2002-08-26 05:46:11 -04:00
|
|
|
with-icon-name
|
2002-06-08 11:08:31 -04:00
|
|
|
with-fqdn
|
|
|
|
with-reported-port
|
|
|
|
with-path-handler
|
|
|
|
with-server-admin
|
|
|
|
with-simultaneous-requests
|
|
|
|
with-logfile
|
2002-08-22 12:40:10 -04:00
|
|
|
with-syslog?
|
|
|
|
with-resolve-ips?))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface httpd-read-options-interface
|
|
|
|
(export httpd-options-port
|
|
|
|
httpd-options-root-directory
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-options-icon-name
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-options-fqdn
|
|
|
|
httpd-options-reported-port
|
|
|
|
httpd-options-path-handler
|
|
|
|
httpd-options-server-admin
|
|
|
|
httpd-options-simultaneous-requests
|
|
|
|
httpd-options-logfile
|
2002-08-22 12:40:10 -04:00
|
|
|
httpd-options-syslog?
|
|
|
|
httpd-options-resolve-ips?))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface httpd-access-control-interface
|
|
|
|
(export access-denier
|
|
|
|
access-allower
|
|
|
|
access-controller
|
|
|
|
access-controlled-handler))
|
|
|
|
|
|
|
|
(define-interface httpd-error-interface
|
|
|
|
(export http-error?
|
|
|
|
http-error
|
|
|
|
fatal-syntax-error?
|
|
|
|
fatal-syntax-error))
|
|
|
|
|
|
|
|
(define-interface httpd-logging-interface
|
|
|
|
(export init-http-log!
|
|
|
|
*http-syslog?*
|
|
|
|
http-syslog
|
|
|
|
http-log))
|
|
|
|
|
|
|
|
(define-interface httpd-request-interface
|
|
|
|
(export make-request ; HTTP request
|
|
|
|
request? ; record type.
|
|
|
|
request:method
|
|
|
|
request:uri
|
|
|
|
request:url
|
|
|
|
request:version
|
|
|
|
request:headers
|
|
|
|
request:socket
|
|
|
|
set-request:method
|
|
|
|
set-request:uri
|
|
|
|
set-request:url
|
|
|
|
set-request:version
|
|
|
|
set-request:headers
|
|
|
|
set-request:socket
|
|
|
|
|
|
|
|
version< version<=
|
|
|
|
v0.9-request?
|
|
|
|
version->string))
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
(define-interface httpd-responses-interface
|
|
|
|
(export make-response response?
|
|
|
|
response-code
|
|
|
|
response-message
|
|
|
|
response-seconds
|
|
|
|
response-mime
|
|
|
|
response-extras
|
|
|
|
response-body
|
|
|
|
|
|
|
|
make-writer-body writer-body?
|
2002-08-26 05:59:14 -04:00
|
|
|
display-http-body
|
|
|
|
|
|
|
|
;; Integer reply codes
|
|
|
|
status-code->text
|
|
|
|
http-status/ok
|
|
|
|
http-status/created
|
|
|
|
http-status/accepted
|
|
|
|
http-status/prov-info
|
|
|
|
http-status/no-content
|
|
|
|
http-status/mult-choice
|
|
|
|
http-status/moved-perm
|
|
|
|
http-status/moved-temp
|
|
|
|
http-status/method
|
|
|
|
http-status/not-mod
|
|
|
|
http-status/bad-request
|
|
|
|
http-status/unauthorized
|
|
|
|
http-status/payment-req
|
|
|
|
http-status/forbidden
|
|
|
|
http-status/not-found
|
|
|
|
http-status/method-not-allowed
|
|
|
|
http-status/none-acceptable
|
|
|
|
http-status/proxy-auth-required
|
|
|
|
http-status/timeout
|
|
|
|
http-status/conflict
|
|
|
|
http-status/gone
|
|
|
|
http-status/internal-error
|
|
|
|
http-status/not-implemented
|
|
|
|
http-status/bad-gateway
|
|
|
|
http-status/service-unavailable
|
2002-08-27 05:39:05 -04:00
|
|
|
http-status/gateway-timeout
|
|
|
|
|
|
|
|
make-http-error-response
|
|
|
|
time->http-date-string))
|
2002-08-26 05:46:11 -04:00
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-interface httpd-basic-handlers-interface
|
2002-08-22 11:32:03 -04:00
|
|
|
(export make-request-handler
|
|
|
|
make-path-handler
|
2002-08-27 05:05:16 -04:00
|
|
|
make-host-name-handler
|
2002-08-22 11:32:03 -04:00
|
|
|
make-path-prefix-handler
|
2002-08-27 05:42:02 -04:00
|
|
|
alist-path-dispatcher
|
|
|
|
null-path-handler))
|
2002-08-26 05:46:11 -04:00
|
|
|
|
|
|
|
(define-interface httpd-file-directory-handlers-interface
|
|
|
|
(export home-dir-handler
|
2002-06-08 11:08:31 -04:00
|
|
|
tilde-home-dir-handler
|
|
|
|
rooted-file-handler
|
2002-08-27 05:42:02 -04:00
|
|
|
rooted-file-or-directory-handler))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-interface seval-handler-interface
|
|
|
|
(export seval-handler))
|
|
|
|
|
|
|
|
(define-interface info-gateway-interface
|
|
|
|
(export info-handler
|
|
|
|
find-info-file
|
|
|
|
info-gateway-error))
|
|
|
|
|
|
|
|
(define-interface rman-gateway-interface
|
|
|
|
(export rman-handler
|
|
|
|
man
|
|
|
|
parse-man-entry
|
|
|
|
cat-man-page
|
|
|
|
find-man-file
|
|
|
|
file->man-directory
|
|
|
|
cat-n-decode
|
|
|
|
nroff-n-decode))
|
|
|
|
|
|
|
|
(define-interface cgi-server-interface
|
|
|
|
(export cgi-default-bin-path
|
|
|
|
cgi-handler))
|
|
|
|
|
|
|
|
(define-interface loser-interface (export loser))
|
|
|
|
|
|
|
|
(define-interface toothless-interface (interface-of scheme))
|
|
|
|
|
|
|
|
(define-interface toothless-eval-interface (export eval-safely))
|
|
|
|
|
|
|
|
;; Structures
|
|
|
|
|
2002-08-26 07:44:02 -04:00
|
|
|
(define-structure sunet-version (export sunet-version-identifier)
|
|
|
|
(open scheme)
|
|
|
|
(begin
|
2002-08-26 12:36:53 -04:00
|
|
|
(define sunet-version-identifier "2.0")))
|
2002-08-26 07:44:02 -04:00
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
;; Net protocols and formats
|
|
|
|
|
|
|
|
(define-structure parse-html-forms parse-html-forms-interface
|
|
|
|
(open scsh
|
|
|
|
scsh-utilities
|
|
|
|
let-opt
|
2002-08-26 06:54:03 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
receiving
|
|
|
|
uri
|
|
|
|
scheme)
|
|
|
|
(files (lib parse-forms)))
|
|
|
|
|
|
|
|
(define-structure htmlout htmlout-interface
|
2002-08-26 07:45:08 -04:00
|
|
|
(open scsh scsh-utilities srfi-13 formats ascii receiving scheme)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (lib htmlout)))
|
|
|
|
|
|
|
|
(define-structures
|
|
|
|
((smtp smtp-interface)
|
|
|
|
(smtp-internals smtp-internals-interface))
|
|
|
|
|
|
|
|
(open scsh ; write-string read-string/partial force-output
|
|
|
|
; system-name user-login-name and sockets
|
|
|
|
crlf-io ; read-crlf-line write-crlf
|
|
|
|
receiving ; values receive
|
|
|
|
let-opt ; let-optionals
|
|
|
|
error-package ; error
|
|
|
|
scheme)
|
|
|
|
(files (lib smtp)))
|
|
|
|
|
|
|
|
(define-structure rfc822 rfc822-interface
|
|
|
|
(open receiving ; MV return (RECEIVE and VALUES)
|
|
|
|
scsh-utilities ; index
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt ; let-optionals
|
|
|
|
crlf-io ; read-crlf-line
|
|
|
|
ascii ; ascii->char
|
|
|
|
error-package ; error
|
|
|
|
scsh ; string-join
|
|
|
|
scheme)
|
|
|
|
(files (lib rfc822)))
|
|
|
|
|
|
|
|
(define-structure uri uri-interface
|
|
|
|
(open scsh-utilities
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
|
|
|
receiving
|
|
|
|
ascii
|
2002-08-26 06:54:03 -04:00
|
|
|
srfi-14
|
2002-06-08 11:08:31 -04:00
|
|
|
bitwise
|
|
|
|
field-reader-package
|
|
|
|
scheme)
|
|
|
|
(files (lib uri)))
|
|
|
|
|
|
|
|
(define-structure url url-interface
|
|
|
|
(open defrec-package
|
|
|
|
receiving
|
2002-08-26 06:54:03 -04:00
|
|
|
srfi-13
|
|
|
|
srfi-14
|
2002-06-08 11:08:31 -04:00
|
|
|
uri
|
|
|
|
scsh-utilities
|
|
|
|
httpd-error
|
|
|
|
scheme)
|
|
|
|
(files (lib url)))
|
|
|
|
|
|
|
|
(define-structure ftp ftp-interface
|
|
|
|
(open netrc
|
|
|
|
scsh
|
|
|
|
defrec-package
|
|
|
|
receiving
|
|
|
|
handle
|
|
|
|
conditions
|
|
|
|
signals
|
|
|
|
error-package
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
2002-08-26 10:49:17 -04:00
|
|
|
sunet-utilities
|
|
|
|
crlf-io
|
2002-06-08 11:08:31 -04:00
|
|
|
scheme)
|
|
|
|
(files (lib ftp)))
|
|
|
|
|
|
|
|
(define-structure ftp-obsolete ftp-obsolete-interface
|
|
|
|
(open scsh
|
|
|
|
scheme
|
|
|
|
ftp)
|
2002-08-26 07:39:25 -04:00
|
|
|
(begin
|
|
|
|
(define ftp:connect ftp-connect)
|
|
|
|
(define ftp:login ftp-login)
|
|
|
|
(define ftp:type ftp-type)
|
|
|
|
(define ftp:rename ftp-rename)
|
|
|
|
(define ftp:delete ftp-delete)
|
|
|
|
(define ftp:cd ftp-cd)
|
|
|
|
(define ftp:cdup ftp-cdup)
|
|
|
|
(define ftp:pwd ftp-pwd)
|
|
|
|
(define ftp:rmdir ftp-rmdir)
|
|
|
|
(define ftp:mkdir ftp-mkdir)
|
|
|
|
(define ftp:modification-time ftp-modification-time)
|
|
|
|
(define ftp:size ftp-size)
|
|
|
|
(define ftp:abort ftp-abort)
|
|
|
|
(define ftp:quit ftp-quit)
|
|
|
|
(define ftp:ls ftp-ls)
|
|
|
|
(define ftp:dir ftp-dir)
|
|
|
|
(define ftp:get ftp-get)
|
|
|
|
(define ftp:put ftp-put)
|
|
|
|
(define ftp:append ftp-append)
|
|
|
|
(define ftp:quot ftp-quot)))
|
|
|
|
|
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-structure netrc netrc-interface
|
|
|
|
(open defrec-package
|
|
|
|
records
|
|
|
|
scsh
|
|
|
|
error-package
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
conditions signals handle
|
2002-08-26 10:49:17 -04:00
|
|
|
sunet-utilities
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
|
|
|
scheme)
|
|
|
|
(files (lib netrc)))
|
|
|
|
|
|
|
|
(define-structure pop3 pop3-interface
|
|
|
|
(open netrc
|
|
|
|
scsh
|
|
|
|
defrec-package
|
|
|
|
handle
|
|
|
|
conditions
|
|
|
|
signals
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-08-26 10:49:17 -04:00
|
|
|
let-opt
|
|
|
|
crlf-io
|
2002-06-08 11:08:31 -04:00
|
|
|
scheme)
|
|
|
|
(files (lib pop3)))
|
|
|
|
|
|
|
|
(define-structure pop3-obsolete pop3-obsolete-interface
|
|
|
|
(open scsh
|
|
|
|
scheme
|
|
|
|
pop3)
|
2002-08-26 07:39:25 -04:00
|
|
|
(begin
|
|
|
|
(define pop3:connect pop3-connect)
|
|
|
|
(define pop3:login pop3-login)
|
|
|
|
(define pop3:stat pop3-stat)
|
|
|
|
(define pop3:get pop3-get)
|
|
|
|
(define pop3:headers pop3-headers)
|
|
|
|
(define pop3:last pop3-last)
|
|
|
|
(define pop3:delete pop3-delete)
|
|
|
|
(define pop3:reset pop3-reset)
|
|
|
|
(define pop3:quit pop3-quit)))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-structure nettime nettime-interface
|
|
|
|
(open scsh
|
|
|
|
scheme)
|
|
|
|
(files (lib nettime)))
|
|
|
|
|
|
|
|
(define-structure nettime-obsolete nettime-obsolete-interface
|
|
|
|
(open scsh
|
|
|
|
scheme
|
|
|
|
nettime)
|
2002-08-26 07:39:25 -04:00
|
|
|
(begin
|
|
|
|
(define net:time net-time)
|
|
|
|
(define net:daytime net-daytime)))
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
(define-structure dns dns-interface
|
|
|
|
(open scheme
|
|
|
|
scsh
|
|
|
|
big-util
|
|
|
|
tables
|
|
|
|
ascii
|
|
|
|
formats
|
|
|
|
signals
|
|
|
|
defrec-package
|
|
|
|
random
|
|
|
|
queues
|
|
|
|
conditions
|
|
|
|
handle
|
|
|
|
sort
|
|
|
|
threads
|
|
|
|
locks)
|
|
|
|
(files (lib dns)))
|
|
|
|
|
|
|
|
(define-structure cgi-script cgi-script-interface
|
|
|
|
(open scsh
|
|
|
|
error-package
|
|
|
|
parse-html-forms
|
|
|
|
scheme)
|
|
|
|
(files (lib cgi-script)))
|
|
|
|
|
|
|
|
;; Utility libraries
|
|
|
|
|
|
|
|
(define-structure rate-limit rate-limit-interface
|
|
|
|
(open scheme
|
|
|
|
define-record-types
|
|
|
|
locks
|
|
|
|
signals)
|
|
|
|
(files (lib rate-limit)))
|
|
|
|
|
|
|
|
(define-structure crlf-io crlf-io-interface
|
|
|
|
(open ascii ; ascii->char
|
|
|
|
scsh ; read-line write-string force-output
|
|
|
|
receiving ; MV return (RECEIVE and VALUES)
|
|
|
|
let-opt ; let-optionals
|
|
|
|
threads ; sleep
|
|
|
|
scheme)
|
|
|
|
(files (lib crlf-io)))
|
|
|
|
|
|
|
|
(define-structure ls ls-interface
|
|
|
|
(open scheme handle
|
|
|
|
big-scheme bitwise
|
|
|
|
fluids
|
|
|
|
crlf-io
|
|
|
|
scsh)
|
|
|
|
(files (lib ls)))
|
|
|
|
|
|
|
|
(define-structure format-net format-net-interface
|
|
|
|
(open scsh
|
|
|
|
scheme
|
|
|
|
let-opt) ; :optional
|
|
|
|
(files (lib format-net)))
|
|
|
|
|
|
|
|
(define-structure sunet-utilities sunet-utilities-interface
|
|
|
|
(open scsh
|
|
|
|
scheme
|
|
|
|
format-net
|
|
|
|
sigevents
|
2002-08-24 12:43:26 -04:00
|
|
|
let-opt
|
2002-08-26 10:49:17 -04:00
|
|
|
srfi-13
|
2002-08-26 11:33:22 -04:00
|
|
|
dns
|
2002-08-26 12:36:25 -04:00
|
|
|
let-opt ; :optional
|
2002-06-08 11:08:31 -04:00
|
|
|
handle-fatal-error)
|
|
|
|
(files (lib sunet-utilities)))
|
|
|
|
|
|
|
|
(define-structure handle-fatal-error handle-fatal-error-interface
|
|
|
|
(open scheme conditions handle)
|
|
|
|
(files (httpd handle-fatal-error)))
|
|
|
|
|
|
|
|
;; FTP server
|
|
|
|
|
|
|
|
(define-structure ftpd ftpd-interface
|
2002-08-26 10:13:23 -04:00
|
|
|
(open scheme (modify scsh (hide char-set:whitespace))
|
2002-06-08 11:08:31 -04:00
|
|
|
conditions handle signals
|
|
|
|
structure-refs
|
|
|
|
handle-fatal-error
|
|
|
|
threads threads-internal ; last one to get CURRENT-THREAD
|
|
|
|
locks
|
|
|
|
thread-fluids ; fork-thread
|
|
|
|
fluids
|
2002-08-26 10:13:23 -04:00
|
|
|
srfi-14
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
big-util
|
|
|
|
defrec-package
|
|
|
|
crlf-io
|
|
|
|
ls
|
2002-08-22 13:12:08 -04:00
|
|
|
dns
|
2002-08-26 10:13:23 -04:00
|
|
|
sunet-utilities
|
2002-06-08 11:08:31 -04:00
|
|
|
let-opt
|
|
|
|
receiving ; RECEIVE
|
|
|
|
format-net) ; pretty print of internet-addresses
|
|
|
|
(access big-scheme)
|
|
|
|
(files (ftpd ftpd)))
|
|
|
|
|
|
|
|
;; Web server
|
|
|
|
|
|
|
|
(define-structure httpd-core httpd-core-interface
|
|
|
|
(open thread-fluids ; fork-thread
|
|
|
|
scsh
|
|
|
|
receiving ; receive
|
|
|
|
crlf-io ; write-crlf, read-crlf-line
|
|
|
|
rfc822 ; read-rfc822-headers
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-14 ; char-set-complement, char-set:whitespace
|
2002-06-08 11:08:31 -04:00
|
|
|
handle ; ignore-errors
|
|
|
|
conditions ; condition-stuff
|
|
|
|
uri
|
|
|
|
url
|
|
|
|
formats ; format
|
|
|
|
format-net ; format-internet-host-address
|
|
|
|
rate-limit ; rate-limiting stuff
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13 ; STRING-INDEX
|
2002-08-23 11:41:06 -04:00
|
|
|
dns ; dns-lookup-ip
|
2002-08-24 13:07:35 -04:00
|
|
|
sunet-utilities ; socket-address->string
|
2002-08-24 13:26:56 -04:00
|
|
|
locks ; make-lock et al.
|
2002-06-08 11:08:31 -04:00
|
|
|
|
|
|
|
handle-fatal-error
|
|
|
|
httpd-read-options
|
|
|
|
httpd-error
|
|
|
|
httpd-logging
|
|
|
|
httpd-request
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-responses
|
2002-08-26 07:44:02 -04:00
|
|
|
|
|
|
|
sunet-version
|
2002-06-08 11:08:31 -04:00
|
|
|
scheme)
|
|
|
|
(files (httpd core)))
|
|
|
|
|
|
|
|
(define-structures ((httpd-make-options httpd-make-options-interface)
|
|
|
|
(httpd-read-options httpd-read-options-interface))
|
|
|
|
(open scheme
|
|
|
|
define-record-types)
|
|
|
|
(files (httpd options)))
|
|
|
|
|
|
|
|
(define-structure httpd-access-control httpd-access-control-interface
|
|
|
|
(open big-scheme
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-request
|
|
|
|
httpd-error
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13 ; STRING-MAP
|
2002-06-08 11:08:31 -04:00
|
|
|
scsh
|
|
|
|
scheme)
|
|
|
|
(files (httpd access-control)))
|
|
|
|
|
|
|
|
(define-structure httpd-error httpd-error-interface
|
|
|
|
(open conditions signals handle scheme)
|
|
|
|
(files (httpd error)))
|
|
|
|
|
|
|
|
(define-structure httpd-logging httpd-logging-interface
|
|
|
|
(open httpd-read-options
|
|
|
|
i/o ; make-null-output-port
|
|
|
|
locks ; make-lock obtain-lock release-lock
|
|
|
|
receiving ; receive
|
|
|
|
uri ; uri-path-list->path
|
|
|
|
url ; http-url:path
|
|
|
|
httpd-request ; request record
|
|
|
|
formats ; format
|
|
|
|
format-net ; format-internet-host-address
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13 ; string-join, string-trim
|
2002-06-08 11:08:31 -04:00
|
|
|
rfc822 ; get-header
|
|
|
|
sunet-utilities ; on-interrupt
|
|
|
|
threads ; spawn
|
2002-08-22 12:40:10 -04:00
|
|
|
dns ; dns-lookup-ip
|
2002-06-08 11:08:31 -04:00
|
|
|
scsh
|
|
|
|
scheme)
|
|
|
|
(files (httpd logging)))
|
|
|
|
|
|
|
|
(define-structure httpd-request httpd-request-interface
|
|
|
|
(open define-record-types ;; define-record-discloser
|
|
|
|
defrec-package ;; define-record
|
|
|
|
scheme)
|
|
|
|
(files (httpd request)))
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
(define-structure httpd-responses httpd-responses-interface
|
|
|
|
(open scheme
|
2002-08-27 05:39:05 -04:00
|
|
|
(subset scsh (format-date write-string time date))
|
|
|
|
syslog
|
2002-08-26 05:59:14 -04:00
|
|
|
srfi-9
|
2002-08-27 05:39:05 -04:00
|
|
|
defenum-package
|
|
|
|
formats
|
|
|
|
httpd-request
|
|
|
|
httpd-logging
|
|
|
|
httpd-read-options)
|
2002-08-26 05:46:11 -04:00
|
|
|
(files (httpd response)))
|
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-structure httpd-basic-handlers httpd-basic-handlers-interface
|
2002-08-26 05:46:11 -04:00
|
|
|
(open scheme scsh
|
2002-08-26 12:36:25 -04:00
|
|
|
rfc822
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-request ; REQUEST record type, v0.9-request
|
2002-08-26 05:46:11 -04:00
|
|
|
srfi-1 ; FOLD-RIGHT
|
|
|
|
srfi-13 ; STRING-TRIM
|
2002-08-27 05:42:02 -04:00
|
|
|
httpd-responses
|
2002-08-26 05:46:11 -04:00
|
|
|
)
|
2002-06-08 11:08:31 -04:00
|
|
|
(files (httpd handlers)))
|
|
|
|
|
2002-08-26 05:46:11 -04:00
|
|
|
(define-structure httpd-file-directory-handlers httpd-file-directory-handlers-interface
|
|
|
|
(open scheme scsh
|
|
|
|
httpd-core
|
|
|
|
httpd-request
|
|
|
|
httpd-responses
|
|
|
|
httpd-error
|
2002-08-27 05:32:12 -04:00
|
|
|
httpd-basic-handlers
|
2002-08-26 05:46:11 -04:00
|
|
|
httpd-read-options
|
|
|
|
url
|
|
|
|
htmlout
|
|
|
|
crlf-io
|
|
|
|
srfi-13 ; STRING-JOIN
|
2002-08-26 12:36:25 -04:00
|
|
|
sunet-utilities ; dotdot-check, copy-inport->outport
|
2002-08-26 05:46:11 -04:00
|
|
|
conditions
|
|
|
|
handle-fatal-error
|
|
|
|
)
|
|
|
|
(files (httpd file-dir-handler)))
|
|
|
|
|
2002-06-08 11:08:31 -04:00
|
|
|
(define-structure seval-handler seval-handler-interface
|
2002-08-26 07:21:53 -04:00
|
|
|
(open scsh ; syscalls & INDEX
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-error
|
|
|
|
httpd-request ; v0.9-request
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-logging ; http-log
|
2002-08-26 07:21:53 -04:00
|
|
|
uri ; UNESCAPE-URI
|
|
|
|
htmlout ; Formatted HTML output
|
|
|
|
error-package ; ERROR
|
|
|
|
pp ; Pretty-printer
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13 ; STRING-SKIP
|
2002-06-08 11:08:31 -04:00
|
|
|
rfc822
|
2002-08-26 07:21:53 -04:00
|
|
|
toothless-eval ; EVAL-SAFELY
|
|
|
|
handle ; IGNORE-ERROR
|
|
|
|
parse-html-forms ; PARSE-HTML-FORM-QUERY
|
|
|
|
threads ; SLEEP
|
2002-06-08 11:08:31 -04:00
|
|
|
scheme)
|
|
|
|
(files (httpd seval)))
|
|
|
|
|
|
|
|
(define-structure info-gateway info-gateway-interface
|
|
|
|
(open big-scheme
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
conditions signals handle
|
|
|
|
htmlout
|
|
|
|
httpd-request
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-error
|
|
|
|
url
|
|
|
|
uri
|
|
|
|
scsh
|
|
|
|
handle-fatal-error
|
|
|
|
scheme)
|
|
|
|
(files (httpd info-gateway)))
|
|
|
|
|
|
|
|
(define-structure rman-gateway rman-gateway-interface
|
2002-08-26 05:59:14 -04:00
|
|
|
(open httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-request
|
|
|
|
httpd-error
|
|
|
|
conditions
|
|
|
|
url
|
|
|
|
uri
|
|
|
|
htmlout
|
|
|
|
httpd-basic-handlers
|
|
|
|
handle-fatal-error
|
|
|
|
scsh
|
|
|
|
let-opt
|
2002-08-26 07:45:08 -04:00
|
|
|
srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
scheme)
|
|
|
|
(files (httpd rman-gateway)))
|
|
|
|
|
|
|
|
(define-structure cgi-server cgi-server-interface
|
2002-08-26 07:45:08 -04:00
|
|
|
(open srfi-13
|
2002-06-08 11:08:31 -04:00
|
|
|
rfc822
|
|
|
|
crlf-io ; WRITE-CRLF
|
|
|
|
uri
|
|
|
|
url ; HTTP-URL record type
|
|
|
|
httpd-logging
|
|
|
|
httpd-request
|
2002-08-26 05:59:14 -04:00
|
|
|
httpd-responses
|
2002-06-08 11:08:31 -04:00
|
|
|
httpd-basic-handlers ; HTTP-HOMEDIR, SERVE-ROOTED-FILE-PATH
|
|
|
|
httpd-error ; HTTP-ERROR
|
2002-08-26 12:36:25 -04:00
|
|
|
httpd-file-directory-handlers ; dot-dot-check, copy-inport->outport
|
2002-08-26 07:44:02 -04:00
|
|
|
sunet-version
|
2002-06-08 11:08:31 -04:00
|
|
|
scsh-utilities ; INDEX
|
|
|
|
scsh ; syscalls
|
|
|
|
formats ; format
|
|
|
|
format-net ; FORMAT-INTERNET-HOST-ADDRESS
|
|
|
|
sunet-utilities ; host-name-or-empty
|
|
|
|
let-opt ; let-optionals
|
|
|
|
scheme)
|
|
|
|
(files (httpd cgi-server)))
|
|
|
|
|
|
|
|
(define-structure loser (export loser)
|
|
|
|
(open scheme error-package)
|
|
|
|
(begin (define (loser name)
|
|
|
|
(lambda x (error "Illegal call" name)))))
|
|
|
|
|
|
|
|
(define-structure toothless toothless-interface
|
|
|
|
(open scheme loser)
|
|
|
|
(begin
|
|
|
|
(define call-with-input-file (loser "call-with-input-file"))
|
|
|
|
(define call-with-output-file (loser "call-with-output-file"))
|
|
|
|
(define load (loser "load"))
|
|
|
|
(define open-input-file (loser "open-input-file"))
|
|
|
|
(define open-output-file (loser "open-output-file"))
|
|
|
|
(define transcript-on (loser "transcript-on"))
|
|
|
|
(define with-input-from-file (loser "with-input-from-file"))
|
|
|
|
(define with-input-to-file (loser "with-input-to-file"))
|
|
|
|
(define eval (loser "eval"))
|
|
|
|
(define interaction-environment (loser "interaction-environment"))
|
|
|
|
(define scheme-report-environment (loser "scheme-report-environment"))))
|
|
|
|
|
|
|
|
(define-structure toothless-eval toothless-eval-interface
|
|
|
|
(open evaluation ; eval
|
|
|
|
package-commands-internal ; config-package, get-reflective-tower
|
|
|
|
packages ; structure-package, make-simple-package
|
|
|
|
environments ; environment-ref
|
|
|
|
handle ; ignore-errors
|
|
|
|
scheme)
|
|
|
|
(access toothless) ; Force it to be loaded.
|
|
|
|
(begin
|
|
|
|
|
|
|
|
(define toothless-struct (environment-ref (config-package) 'toothless))
|
|
|
|
(define toothless-package (structure-package toothless-struct))
|
|
|
|
|
|
|
|
(define (new-safe-package)
|
|
|
|
(make-simple-package (list toothless-struct) #t
|
|
|
|
(get-reflective-tower toothless-package) ; ???
|
|
|
|
'safe-env))
|
|
|
|
|
|
|
|
(define (eval-safely exp)
|
|
|
|
(ignore-errors (lambda () (eval exp (new-safe-package)))))))
|