Commit | Line | Data |
---|---|---|
52cfc69b GH |
1 | ;;; installed-scm-file |
2 | ||
3 | ;;;; Copyright (C) 1999 Free Software Foundation, Inc. | |
4 | ;;;; | |
5 | ;;;; This program is free software; you can redistribute it and/or modify | |
6 | ;;;; it under the terms of the GNU General Public License as published by | |
7 | ;;;; the Free Software Foundation; either version 2, or (at your option) | |
8 | ;;;; any later version. | |
9 | ;;;; | |
10 | ;;;; This program is distributed in the hope that it will be useful, | |
11 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | ;;;; GNU General Public License for more details. | |
14 | ;;;; | |
15 | ;;;; You should have received a copy of the GNU General Public License | |
16 | ;;;; along with this software; see the file COPYING. If not, write to | |
17 | ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |
18 | ;;;; Boston, MA 02111-1307 USA | |
19 | ;;;; | |
20 | ||
21 | (define (gethostbyaddr addr) (gethost addr)) | |
22 | (define (gethostbyname name) (gethost name)) | |
23 | ||
24 | (define (getnetbyaddr addr) (getnet addr)) | |
25 | (define (getnetbyname name) (getnet name)) | |
26 | ||
27 | (define (getprotobyname name) (getproto name)) | |
28 | (define (getprotobynumber addr) (getproto addr)) | |
29 | ||
30 | (define (getservbyname name proto) (getserv name proto)) | |
31 | (define (getservbyport port proto) (getserv port proto)) | |
32 | ||
5c11cc9d GH |
33 | (define (sethostent . stayopen) |
34 | (if (pair? stayopen) | |
35 | (sethost (car stayopen)) | |
36 | (sethost #f))) | |
37 | (define (setnetent . stayopen) | |
38 | (if (pair? stayopen) | |
39 | (setnet (car stayopen)) | |
40 | (setnet #f))) | |
41 | (define (setprotoent . stayopen) | |
42 | (if (pair? stayopen) | |
43 | (setproto (car stayopen)) | |
44 | (setproto #f))) | |
45 | (define (setservent . stayopen) | |
46 | (if (pair? stayopen) | |
47 | (setserv (car stayopen)) | |
48 | (setserv #f))) | |
52cfc69b GH |
49 | |
50 | (define (gethostent) (gethost)) | |
51 | (define (getnetent) (getnet)) | |
52 | (define (getprotoent) (getproto)) | |
53 | (define (getservent) (getserv)) | |
54 | ||
55 | (define (endhostent) (sethost)) | |
56 | (define (endnetent) (setnet)) | |
57 | (define (endprotoent) (setproto)) | |
58 | (define (endservent) (setserv)) | |
59 | ||
60 | (define (hostent:name obj) (vector-ref obj 0)) | |
61 | (define (hostent:aliases obj) (vector-ref obj 1)) | |
62 | (define (hostent:addrtype obj) (vector-ref obj 2)) | |
63 | (define (hostent:length obj) (vector-ref obj 3)) | |
64 | (define (hostent:addr-list obj) (vector-ref obj 4)) | |
65 | ||
66 | (define (netent:name obj) (vector-ref obj 0)) | |
67 | (define (netent:aliases obj) (vector-ref obj 1)) | |
68 | (define (netent:addrtype obj) (vector-ref obj 2)) | |
69 | (define (netent:net obj) (vector-ref obj 3)) | |
70 | ||
71 | (define (protoent:name obj) (vector-ref obj 0)) | |
72 | (define (protoent:aliases obj) (vector-ref obj 1)) | |
73 | (define (protoent:proto obj) (vector-ref obj 2)) | |
74 | ||
75 | (define (servent:name obj) (vector-ref obj 0)) | |
76 | (define (servent:aliases obj) (vector-ref obj 1)) | |
77 | (define (servent:port obj) (vector-ref obj 2)) | |
78 | (define (servent:proto obj) (vector-ref obj 3)) | |
79 | ||
80 | (define (sockaddr:fam obj) (vector-ref obj 0)) | |
81 | (define (sockaddr:path obj) (vector-ref obj 1)) | |
82 | (define (sockaddr:addr obj) (vector-ref obj 1)) | |
83 | (define (sockaddr:port obj) (vector-ref obj 2)) |