Blame libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h

Packit Service 646995
/*
Packit Service 646995
 * Copyright (C) 2017 Red Hat, Inc.
Packit Service 646995
 *
Packit Service 646995
 * This program is free software: you can redistribute it and/or modify
Packit Service 646995
 * it under the terms of the GNU General Public License as published by
Packit Service 646995
 * the Free Software Foundation, either version 3 of the License, or
Packit Service 646995
 * (at your option) any later version.
Packit Service 646995
 *
Packit Service 646995
 * This program is distributed in the hope that it will be useful,
Packit Service 646995
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 646995
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 646995
 * GNU General Public License for more details.
Packit Service 646995
 *
Packit Service 646995
 * You should have received a copy of the GNU General Public License
Packit Service 646995
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit Service 646995
 *
Packit Service 646995
 * Author: Gris Ge <fge@redhat.com>
Packit Service 646995
 */
Packit Service 646995
Packit Service 646995
Packit Service 646995
#ifndef _LIB_OPEN_ISCSI_USR_COMMON_H_
Packit Service 646995
#define _LIB_OPEN_ISCSI_USR_COMMON_H_
Packit Service 646995
Packit Service 646995
#include <errno.h>
Packit Service 646995
Packit Service 646995
/* Below error numbers should align with 'open-iscsi/include/iscsi_err.h' */
Packit Service 646995
#define LIBISCSI_OK			0
Packit Service 646995
/* ^ No error */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_BUG		1
Packit Service 646995
/* ^ Bug of library */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_SESS_NOT_FOUND	2
Packit Service 646995
/* ^ session could not be found */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_NOMEM		3
Packit Service 646995
/* ^ Could not allocate resource for operation */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_IDBM		6
Packit Service 646995
/* ^ Error accessing/managing iSCSI DB */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_INVAL		7
Packit Service 646995
/* ^ Invalid argument */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_TRANS_NOT_FOUND	12
Packit Service 646995
/* ^ iSCSI transport module not loaded in kernel or iscsid */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_ACCESS		13
Packit Service 646995
/* ^ Permission denied */
Packit Service 646995
Packit Service 646995
#define LIBISCSI_ERR_SYSFS_LOOKUP	22
Packit Service 646995
/* ^ Could not lookup object in sysfs */
Packit Service 646995
Packit Service 646995
/*
Packit Service 646995
 * Use the syslog severity level as log priority
Packit Service 646995
 */
Packit Service 646995
#define LIBISCSI_LOG_PRIORITY_ERROR	3
Packit Service 646995
#define LIBISCSI_LOG_PRIORITY_WARNING	4
Packit Service 646995
#define LIBISCSI_LOG_PRIORITY_INFO	6
Packit Service 646995
#define LIBISCSI_LOG_PRIORITY_DEBUG	7
Packit Service 646995
Packit Service 646995
#define LIBISCSI_LOG_PRIORITY_DEFAULT	LIBISCSI_LOG_PRIORITY_WARNING
Packit Service 646995
Packit Service 646995
#define __DLL_EXPORT	__attribute__ ((visibility ("default")))
Packit Service 646995
/* ^ Mark function or struct as external use.
Packit Service 646995
 *   Check https://gcc.gnu.org/wiki/Visibility for detail
Packit Service 646995
 */
Packit Service 646995
#define __DLL_LOCAL	__attribute__ ((visibility ("hidden")))
Packit Service 646995
/* ^ Mark function or struct as internal use only.
Packit Service 646995
 *   Check https://gcc.gnu.org/wiki/Visibility for detail
Packit Service 646995
 */
Packit Service 646995
Packit Service 646995
struct __DLL_EXPORT iscsi_context;
Packit Service 646995
Packit Service 646995
struct __DLL_EXPORT iscsi_session;
Packit Service 646995
Packit Service 646995
struct __DLL_EXPORT iscsi_iface;
Packit Service 646995
Packit Service 646995
struct __DLL_EXPORT iscsi_node;
Packit Service 646995
Packit Service 646995
#endif /* End of _LIB_OPEN_ISCSI_USR_COMMON_H_ */