summaryrefslogtreecommitdiff
path: root/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h
diff options
context:
space:
mode:
authorGris Ge <fge@redhat.com>2018-01-22 18:26:03 +0800
committerGris Ge <fge@redhat.com>2018-01-22 18:26:03 +0800
commit5e9916b05d0b6404f414410ae080bf51a56047de (patch)
tree105373fbfd1ceba5c3fac16733b24532cfcacd24 /libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h
parentbb93d4140f8c874e15ce932e68e11268e881791a (diff)
downloadopen-iscsi-5e9916b05d0b6404f414410ae080bf51a56047de.tar.gz
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 <fge@redhat.com>
Diffstat (limited to 'libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h')
-rw-r--r--libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_common.h49
1 files changed, 49 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
+ *
+ * Author: Gris Ge <fge@redhat.com>
+ */
+
+
+#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_ */