From 5e9916b05d0b6404f414410ae080bf51a56047de Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Mon, 22 Jan 2018 18:26:03 +0800 Subject: Introducing iSCSI userspace library. * This is the initial patch of the library libopenscsiusr.so, so we have no actual code on iscsi functionality, just introduce a code layout. * The library is created by following the guideline of libabc. * Documentation is done by using linux kernel-doc script generating manpages out of header files. Signed-off-by: Gris Ge --- .../libopeniscsiusr/libopeniscsiusr_common.h | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h (limited to 'libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h') diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h new file mode 100644 index 0000000..7952c59 --- /dev/null +++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2017 Red Hat, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Author: Gris Ge + */ + + +#ifndef _LIB_OPEN_ISCSI_USR_COMMON_H_ +#define _LIB_OPEN_ISCSI_USR_COMMON_H_ + +#define LIBISCSI_OK 0 + +/* + * Use the syslog severity level as log priority + */ +#define LIBISCSI_LOG_PRIORITY_ERROR 3 +#define LIBISCSI_LOG_PRIORITY_WARNING 4 +#define LIBISCSI_LOG_PRIORITY_INFO 6 +#define LIBISCSI_LOG_PRIORITY_DEBUG 7 + +#define LIBISCSI_LOG_PRIORITY_DEFAULT LIBISCSI_LOG_PRIORITY_WARNING + +/* TODO(Gris Ge): Documentation */ + +#define __DLL_EXPORT __attribute__ ((visibility ("default"))) +/* ^ Mark function or struct as external use. + * Check https://gcc.gnu.org/wiki/Visibility for detail + */ +#define __DLL_LOCAL __attribute__ ((visibility ("hidden"))) +/* ^ Mark function or struct as internal use only. + * Check https://gcc.gnu.org/wiki/Visibility for detail + */ + +struct __DLL_EXPORT iscsi_context; + +#endif /* End of _LIB_OPEN_ISCSI_USR_COMMON_H_ */ -- cgit v1.2.1