Build-Depends libpcap-dev instead of libpcap0.8-dev.
[yaz-ziffy.git] / src / ziffy.1
1 .\"
2 .\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3 .\" ziffy.1 - a promiscuous Z39.50 APDU sniffer for Ethernet
4 .\"
5 .\" Copyright (c) 1998 R. Carbone - Finsiel S.p.A.
6 .\" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
7 .\"
8 .\" This program is free software; you can redistribute it and/or modify
9 .\" it under the terms of the GNU General Public License as published by
10 .\" the Free Software Foundation; either version 2 of the License, or
11 .\" (at your option) any later version.
12 .\"
13 .\" This program is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public License
19 .\" along with this program; if not, write to the Free Software
20 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 .\" 
22 .TH ZIFFY 1 "0.0.2" "28 December 1998" "The Z39.50 Network Sniffer"
23 .SH NAME
24 ziffy \- capture and display Z39.50 APDUs on a live network
25 .SH SYNOPSYS
26 .na
27 .B ziffy
28 [
29 .B \-alloptionshere
30 ]
31 .br
32 .ti +6
33 [
34 .B \-i
35 .I interface
36 ] [
37 .B \-r
38 .I file
39 ]
40 [
41 .B \-s
42 .I snaplen
43 ]
44 .br
45 .ti +8
46 [
47 .B \-T
48 .I type
49 ]
50 [
51 .B \-w
52 .I file
53 ]
54 [
55 .I expression
56 ]
57 .br
58 .ad
59 .SH DESCRIPTION
60 \fBziffy\fR is a Z39.50 protocol analyzer based on the \fBLIBPCAP\fR,
61 the current standard Unix library for packet capturing. It can be started both in interactive
62 mode to capture, decode and show all information in the Z39.50 APDUs from a live network,
63 and in batch mode to analyze the APDUs off-line from a previously created file.
64 \fBziffy\fR uses the standard BPF network packet filter for more reliable capture mechanism.
65 An additional expression can be given on the command line to capture only packets
66 for which \fIexpression\fP is `true'.
67 By default \fBziffy\fR displays Z39.50 APDUs in a single-line summary form. In this format
68 only the name of the captured APDU is displayed in the summary line while the underlaying TCP,
69 IP, and Ethernet frames information are discarded.
70 Multi-lines are also supported if either of verbose modes are enabled.
71 This allows an high degree of monitoring, from simple checks of functional processes down
72 to full APDUs hexacimal dump for interoperability and debugging testing phases.
73 .SH OPTIONS
74 .TP
75 .B \-a
76 Attempt to convert network addresses to names. By default, \fBziffy\fR will ___not___
77 resolve IP addresses to FQDN's.
78 .TP
79 .B \-c
80 Capture a maximum of \fIcount\fP number of APDUs and then exit.
81 .TP
82 .B \-e
83 Enable the display of the link-level header.
84 .TP
85 .B \-f
86 Do not traslate `foreign' internet addresses.
87 .TP
88 .B \-h
89 Display a help screen and quit.
90 .TP
91 .B \-i
92 Define the name of the interface to use for live packet capture. It should match
93 one of the names listed in \*(L"\fBnetstat \-i\fR\*(R" or \*(L"\fBifconfig \-a\fR\*(R".
94 By default \fBziffy\fR will automatically choose the first non-loopback interface it finds.
95 .TP
96 .B \-l
97 Make stdout line buffered. Useful if you want to see the data while capturing it.
98 .TP
99 .B \-n
100 Disable domain name qualification of host names.
101 .TP
102 .B \-p
103 Set the interface in non-promiscuous mode. Only packets addressed to the local host machine
104 will be captured.
105 .TP
106 .B \-r
107 Read packet data from \fIfile\fR.  Currently, \fBziffy\fR only understands
108 \fBpcap\fR / \fBtcpdump\fR formatted files.
109 .TP
110 .B \-s
111 Truncate each packet after \fIsnaplen\fP bytes when capturing live data.
112 No more than \fIsnaplen\fR bytes of each network packet will be read into memory,
113 or saved to disk.
114 .br
115 While 68 bytes is adequate for lower-level protocol such as IP, ICMP, TCP and UDP,
116 it is inadeguate for Z39.50 and the exact cut-off is not easy to determine.
117 The default value is set to 10K which should be enough for most networks.
118 You should limit \fIsnaplen\fP to the smallest number that will allow you to
119 capture all the Z39.50 protocol information.
120 .br
121 Note that taking larger snapshots both increases the amount of time it takes to
122 process packets and, effectively, decreases the amount of packet buffering.
123 This may cause packets to be lost.
124 .TP
125 .B \-t
126 Sets the format of the packet timestamp displayed.
127
128 INSERIRE QUI LA SBRODOLATA PER I VARI FORMATI DI PRESENTAZIONE
129
130 .TP
131 .B \-v
132 Print the program version and exit.
133 .TP
134 .B \-w
135 Write the raw Z39.50 APDUs to \fIfile\fR rather than printing them out.
136 They can later be printed with the \-r option.
137 Standard output is used if \fIfile\fR is ``-''.
138 .TP
139 .B \-1
140 Set verbose output at level 1.
141 .TP
142 .B \-2
143 Set verbose output at level 2.
144 .TP
145 .B \-T
146 With this option you can filter out certain APDU types from beeing 
147 shown. For example, if you only wanted to see all APDU's except 
148 "init" and "sort" you could use:
149 .B % \fBziffy\fR -T init -T sort
150 Currently known APDU types are:
151 \fBinit\fR
152 \fBseach\fR
153 \fBpresent\fR
154 \fBscan\fR
155 \fBsort\fR
156
157
158 .Sp
159 A display filter can be entered into the strip at the bottom.  It must
160 have the same format as \fBtcpdump\fR filter strings, since both programs use
161 the same underlying library.
162 .SH EXAMPLES
163 .LP
164 To print all APDUs arriving at or departing from \fIzeta.tlcpi.finsiel.it\fP:
165 .RS
166 .nf
167 \fBziffy host zeta.tlcpi.finsiel.it\fP
168 .fi
169 .RE
170 .SH OUTPUT FORMAT
171 The output of \fIziffy\fP is Z39.50 APDU dependent. The following
172 gives a brief description and examples of most of the formats.
173 .SH WARNING
174 To run
175 .I ziffy
176 you must be root or it must be installed setuid to root.
177 .SH "SEE ALSO"
178 tcpdump(1), pcap(3), xasn1(3), yaz(7), snacc(3)
179 .SH NOTES
180 The latest version of \fBziffy\fR can be found at
181 \fBhttp://zeta.tlcpi.finsiel.it/ziffy\fR
182 .SH AUTHOR
183 Rocco Carbone <rocco@ntop.org>
184 .SH BUGS
185 Please send bug reports to the author <rocco@ntop.org>
186