1 .\" $NetBSD: libiscsi.3,v 1.2 2009/06/30 02:44:52 agc Exp $
3 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This manual page is derived from software contributed to The
7 .\" NetBSD Foundation by Alistair Crooks (agc@NetBSD.org)
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd iSCSI network storage protocol implementation
41 .Fo iscsi_target_set_defaults
42 .Fa "iscsi_target_t *target"
45 .Fo iscsi_target_start
46 .Fa "iscsi_target_t *target"
49 .Fo iscsi_target_listen
50 .Fa "iscsi_target_t *target"
53 .Fo iscsi_target_shutdown
54 .Fa "iscsi_target_t *target"
57 .Fo iscsi_target_write_pidfile
58 .Fa "const char *filename"
61 .Fo iscsi_target_setvar
62 .Fa "iscsi_target_t *target" "const char *name" "const char *value"
65 .Fo iscsi_target_getvar
66 .Fa "iscsi_target_t *target" "const char *name"
67 .Fa "iscsi_target_t *target"
70 .Fo iscsi_initiator_set_defaults
71 .Fa "iscsi_initiator_t *initiator"
74 .Fo iscsi_initiator_start
75 .Fa "iscsi_initiator_t *initiator"
78 .Fo iscsi_initiator_discover
79 .Fa "iscsi_initiator_t *initiator" "char *x" "uint64_t a" "int b"
82 .Fo iscsi_initiator_shutdown
83 .Fa "iscsi_initiator_t *initiator"
86 .Fo iscsi_initiator_setvar
87 .Fa "iscsi_initiator_t *initiator" "const char *name" "const char *value"
90 .Fo iscsi_initiator_getvar
91 .Fa "iscsi_initiator_t *initiator" "const char *name"
95 is a library interface to the iSCSI target and initiator.
96 This conforms to IETF RFC 3720.
97 The corresponding command line utilities for
100 .Xr iscsi-initiator 8
104 In normal operation, a process acting as
105 a target (i.e. presenting storage to the network)
107 .Fn iscsi_target_set_defaults
108 and will then set various values using the
109 .Fn iscsi_target_setvar
111 The value of a variable can be retrieved
112 at any time using the
113 .Fn iscsi_target_getvar
115 When all of the variables have been set,
117 .Fn iscsi_target_start
118 function is called, and the block storage will be
119 served up by the process.
121 A useful illustration of the use of these functions
122 can be found in the source code to the
128 library also provides an implementation of the client
129 end of the iSCSI subsystem, which is known as the
131 The process acting as an initiator will first call the
132 .Fn iscsi_initiator_set_defaults
133 function, to set default values for the initiator variables.
134 Once all the values have been set to the user preferences
136 .Fn iscsi_initiator_setvar
138 .Fn iscsi_initiator_start
143 library can be used to perform iSCSI device discovery
145 .Fn iscsi_initiator_discovery
147 This will return a list of all the iSCSI targets which
148 are serving up block storage according to the variables
149 which have already been set.
151 .Xr iscsi-initiator 8
156 library first appeared in
158 This programmatic interface to the
159 .Nm library first appeared in
162 .An Alistair Crooks Aq agc@NetBSD.org .