Fixed possible buf in proto.c
[yaz-moved-to-github.git] / README
1 Compilation and installation
2
3 The primary output of the source here is the libyaz.a library, which
4 contain support functions for implementing the server or client role
5 of Z39.50/SR. Currently, the library is placed in a directory 'lib'
6 which is one level *above* the distribution directory (yaz). This was
7 initially done because the library is often used along with several
8 other packages, and it was useful to gather the different libraries in
9 a common place. If you don't like it, changing the 'LIBDIR' macro in
10 the toplevel makefile should be sufficient. Obscurely, the header
11 files are located in the include-directory *under* the yaz/ directory.
12
13 The toplevel makefile also contains directions on how to enable Peter
14 Furniss' XTIMOSI package. The package can be downloaded from
15 ftp://pluto.ulcc.ac.uk/ulcc/thinosi/... (or something close to that).
16 If you place the xtimosi directory on the same level as the yaz
17 directory, and simply follow the directions in the toplevel YAZ
18 makefile, the libmosi.a library from xtimosi should link in with no
19 problems. The xtimosi library is needed to support a full OSI stack,
20 but is *not* required to talk to American-style Z39.50 implementations
21 over TCP/IP. Don't worry about compiling the test applications in the
22 xtimosi package. Just do a "make libmosi.a", and do whatever is
23 required to make the compilation complete on your local ystem.
24
25 Two test-programs of interest are generated when you type 'make' at
26 the top level. server/ztest and yazlib/cli. Ztest is a dummy database
27 server which returns canned responses to all queries. It's good for
28 verifying that the protocol works ok, and ztest.c shows a minimalistic
29 implementation of the 'backend' interface.
30
31 Cli is a linemode Z39.50 client. It supports a fair amount of the
32 functionality of Z39.50v2/SR, but some things you need to enable by
33 recompilation. Its primary purpose is to excersise the package, and
34 verify that the protocol works OK. It can be started by typing
35
36 cli tcp:<hostname>:<port>
37
38 at the UNIX prompt, to connect to a Z39.50 server, or
39
40 cli osi:[<tsel>'/']<hostname>:<port>
41
42 to connect to an OSI SR target (this requires XTIMOSI). To connect to
43 the DANBIB test target, you might use:
44
45 cli osi:0103/find2.denet.dk:4500
46
47 CLI supports CCL-queries, with the mapping between qualifiers and
48 attribute values specified in the file default.bib in the working
49 directory.
50
51 The directories:
52
53 util    - Various little utility functions. Logging, memory debugging,
54         primitive ISO2709 presentation for the client, etc.
55
56 odr     - Open Data Representation. This module implements the BER
57         encoding rules. Documentation is found in the files odr.man
58         and odr.txt.
59
60 asn     - This module implements the Z39.50/SR protocol. The best way
61         to find out how it works is to look in the sample
62         client/server code in server/seshigh.c or yazlib/tst.c.
63
64 yazlib  - This module primarily implements the transport transparency
65         stack (COMSTACK). The comstack implements a generic interface
66         for exchanging BER-encoded records over a network. It supports
67         the American mode of exchanging the records straight over
68         TCP/IP, and Peter Furniss' XTIMOSI package over RFC1006. Look
69         for documentation in the file comstack.man.
70
71 server  - This is the implementation of the server frontend. It
72         It provides event-handling and server managament functions,
73         and calls the backend primitives (best documentation of these
74         is in the file include/backend.h).
75
76 rfc1006 - Xtimosi requires an implementation of the OSI transport
77         with an XTI-based API. Some systems (HP and DEC, notably)
78         provide this. For others, we provide an implementation of the
79         RFC1006 protocol (which is what ISODE-based implementations
80         typically use). This module is not neeeded if you don't use
81         xtimosi.
82
83 makelib - This is a simple utility that gathers the libraries from the
84         previous modules into libyaz.a.
85
86 include - The various header files.
87
88 ../lib  - The libraries. Primarily libyaz.a.