xref: /freebsd/sbin/ggate/ggatec/ggatec.8 (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd April 26, 2004
28.Dt GGATEC 8
29.Os
30.Sh NAME
31.Nm ggatec
32.Nd "GEOM Gate network client and control utility"
33.Sh SYNOPSIS
34.Nm
35.Cm create
36.Op Fl n
37.Op Fl v
38.Op Fl o Cm ro | wo | rw
39.Op Fl p Ar port
40.Op Fl q Ar queue_size
41.Op Fl R Ar rcvbuf
42.Op Fl S Ar sndbuf
43.Op Fl s Ar sectorsize
44.Op Fl t Ar timeout
45.Op Fl u Ar unit
46.Ar host
47.Ar path
48.Nm
49.Cm rescue
50.Op Fl n
51.Op Fl v
52.Op Fl o Cm ro | wo | rw
53.Op Fl p Ar port
54.Op Fl R Ar rcvbuf
55.Op Fl S Ar sndbuf
56.Fl u Ar unit
57.Ar host
58.Ar path
59.Nm
60.Cm destroy
61.Op Fl f
62.Fl u Ar unit
63.Nm
64.Cm list
65.Op Fl v
66.Op Fl u Ar unit
67.Sh DESCRIPTION
68The
69.Nm
70utility is a network client for GEOM Gate class.
71It is responsible for creation of
72.Nm ggate
73devices and forwarding I/O requests between
74.Nm geom_gate.ko
75kernel module and
76.Xr ggated 8
77network daemon.
78Available commands:
79.Bl -tag -width ".Cm destroy"
80.It Cm create
81Connect to given
82.Xr ggated 8
83daemon and create a
84.Nm ggate
85provider related to the given remote file or device.
86.It Cm rescue
87If
88.Nm
89process died/has been killed, you can save situation with this
90command, which creates new connection to the
91.Xr ggated 8
92daemon and will handle pending and future requests.
93.It Cm destroy
94Destroy the given
95.Nm ggate
96provider.
97.It Cm list
98List
99.Nm ggate
100providers.
101.El
102.Pp
103Available options:
104.Bl -tag -width ".Fl s Cm ro | wo | rw"
105.It Fl f
106Forcibly destroy
107.Nm ggate
108provider (cancels all pending requests).
109.It Fl n
110Do not use
111.Dv TCP_NODELAY
112option on TCP sockets.
113.It Fl o Cm ro | wo | rw
114Specify permission to use when opening the file or device: read-only
115.Pq Cm ro ,
116write-only
117.Pq Cm wo ,
118or read-write
119.Pq Cm rw .
120Default is
121.Cm rw .
122.It Fl p Ar port
123Port to connect to on the remote host.
124Default is 3080.
125.It Fl q Ar queue_size
126Number of pending I/O requests that can be queued before they will
127start to be canceled.
128Default is 1024.
129.It Fl R Ar rcvbuf
130Size of receive buffer to use.
131Default is 131072 (128kB).
132.It Fl S Ar sndbuf
133Size of send buffer to use.
134Default is 131072 (128kB).
135.It Fl s Ar sectorsize
136Sector size for
137.Nm ggate
138provider.
139If not specified, it is taken from device, or set to 512 bytes for files.
140.It Fl t Ar timeout
141Number of seconds to wait before an I/O request will be canceled.
1420 means no timeout.
143Default is 0.
144.It Fl u Ar unit
145Unit number to use.
146.It Fl v
147Do not fork, run in foreground and print debug informations on standard
148output.
149.It Ar host
150Remote host to connect to.
151.It Ar path
152Path to a regular file or device.
153.El
154.Sh EXIT STATUS
155Exit status is 0 on success, or 1 if the command fails.
156To get details about the failure,
157.Nm
158should be called with the
159.Fl v
160option.
161.Sh EXAMPLES
162Make use of CD-ROM device from remote host.
163.Bd -literal -offset indent
164server# cat /etc/gg.exports
165client RO /dev/acd0
166server# ggated
167
168client# ggatec create -o ro server /dev/acd0
169ggate0
170client# mount_cd9660 /dev/ggate0 /cdrom
171.Ed
172.Sh SEE ALSO
173.Xr geom 4 ,
174.Xr ggated 8 ,
175.Xr ggatel 8 ,
176.Xr mount_cd9660 8
177.Sh AUTHORS
178The
179.Nm
180utility as well as this manual page was written by
181.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org .
182