source: project/remote-launch/remote-launch-common.scm @ 2690

Last change on this file since 2690 was 2690, checked in by Kon Lovett, 13 years ago

testbase.

File size: 1.9 KB
Line 
1;;;; remote-launch-common.scm
2;;;; Kon Lovett, Jul '06
3
4;;;
5
6(define-constant DEFAULT-REMOTE-LAUNCH-PORT 4001)
7
8(define *cert-directory* (make-pathname (repository-path) "remote-launch-private"))
9(define *cert-chain-pathname* (make-pathname *cert-directory* "server-certs.pem"))
10(define *priv-key-pathname* (make-pathname *cert-directory* "server-privs.pem"))
11(define *certs-pathname* (make-pathname *cert-directory* "client-certs.pem"))
12
13;;;
14
15(define-inline (valid-port? obj)
16  (and (fixnum? obj) (< 0 obj 65536)) )
17
18(define-inline (valid-ssl-protocol? obj)
19  (memq obj '(sslv2-or-v3 sslv2 sslv3 tls)) )
20
21(define-inline (valid-ssl-protocol-argument? obj)
22  (or (valid-ssl-protocol? obj) (eq? obj 'none)) )
23
24;;;
25
26(define-inline (request-packet-operation req)
27  (first req) )
28
29(define-inline (request-packet-sender req)
30  (second req) )
31
32(define-inline (request-packet-sender-address req)
33  (first (request-packet-sender req)) )
34
35(define-inline (request-packet-sender-name req)
36  (second (request-packet-sender req)) )
37
38(define-inline (request-packet-serial req)
39  (third req) )
40
41(define-inline (request-packet-arguments req)
42  (drop req 3) )
43
44;;;
45
46(define-inline (response-packet-operation rsp)
47  (first rsp) )
48
49(define-inline (response-packet-sender rsp)
50  (second rsp) )
51
52(define-inline (response-packet-sender-address rsp)
53  (first (response-packet-sender rsp)) )
54
55(define-inline (response-packet-sender-port rsp)
56  (second (response-packet-sender rsp)) )
57
58(define-inline (response-packet-receiver rsp)
59  (third rsp) )
60
61(define-inline (response-packet-receiver-address rsp)
62  (first (response-packet-receiver rsp)) )
63
64(define-inline (response-packet-receiver-name rsp)
65  (second (response-packet-receiver rsp)) )
66
67(define-inline (response-packet-serial rsp)
68  (fourth rsp) )
69
70(define-inline (response-packet-arguments rsp)
71  (drop rsp 4) )
72
73(define-inline (error-response-packet? rsp)
74  (eq? 'error (response-packet-operation rsp)) )
Note: See TracBrowser for help on using the repository browser.