utility.h revision a9fd9a9e12bea66c9ea9b31f4b6f0ef584933f59
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _TARGET_UTILITY_H
#define _TARGET_UTILITY_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Block comment which describes the contents of this file.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "iscsi_conn.h"
#include <sys/iscsi_protocol.h>
#include "errcode.h"
#define SNA32_CHECK 2147483648UL
/*
* Generates a lot more information on each transfer. Disabling this reduces
* one possible performance impact in the data path. Event with logging turned
* off the messages are still queued which requires malloc's and possible lock
* contention on the management queue. This is a gut feeling, rather than
* actual tests to confirm.
*/
typedef struct thick_provo {
struct thick_provo *next,
*prev;
char *targ_name;
int lun;
target_queue_t *q;
void util_init();
int *text_length, int *errcode);
char *task_to_str(int func);
void connection_parameters_default(iscsi_conn_t *c);
char *create_tpgt_list(char *tname);
void *thick_provo_start(void *v);
char *get_local_name(char *iname);
#ifdef __cplusplus
}
#endif
#endif /* _TARGET_UTILITY_H */