device.h revision 1.1
1/*
2 * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By downloading, copying, installing or
3 * using the software you agree to this license. If you do not agree to this license, do not download, install,
4 * copy or use the software.
5 *
6 * Intel License Agreement
7 *
8 * Copyright (c) 2000, Intel Corporation
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that
12 * the following conditions are met:
13 *
14 * -Redistributions of source code must retain the above copyright notice, this list of conditions and the
15 *  following disclaimer.
16 *
17 * -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
18 *  following disclaimer in the documentation and/or other materials provided with the distribution.
19 *
20 * -The name of Intel Corporation may not be used to endorse or promote products derived from this software
21 *  without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef _DEVICE_H
34#define _DEVICE_H
35
36#include "iscsi.h"
37#include "target.h"
38
39/*
40 * Interface from target to device:
41 *
42 * device_init() initializes the device
43 * device_command() sends a SCSI command to one of the logical units in the device.
44 * device_shutdown() shuts down the device.
45 */
46
47int	device_init(globals_t *, targv_t *, disc_target_t *);
48int	device_command(target_session_t *, target_cmd_t *);
49int	device_shutdown(target_session_t *);
50void	device_set_var(const char *, char *);
51
52#endif /* _DEVICE_H */
53