summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/ctld.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-11-09 18:33:36 +0000
committermav <mav@FreeBSD.org>2015-11-09 18:33:36 +0000
commit63ed08e59535d82a4b0ef54872808e95245ea491 (patch)
treee1c602069591e1eba0795684698b53d497e03183 /usr.sbin/ctld/ctld.h
parent200e80141f6254314818e969ed424fbe74842aa0 (diff)
downloadFreeBSD-src-63ed08e59535d82a4b0ef54872808e95245ea491.zip
FreeBSD-src-63ed08e59535d82a4b0ef54872808e95245ea491.tar.gz
Introduce portal group options in ctl.conf.
While CTL has concept of port options, used at least for iSCSI ports now, before this change it was impossible to set them manually. There still no user-configurable port options now, but I am planning to change that.
Diffstat (limited to 'usr.sbin/ctld/ctld.h')
-rw-r--r--usr.sbin/ctld/ctld.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h
index 51775d7..808b722 100644
--- a/usr.sbin/ctld/ctld.h
+++ b/usr.sbin/ctld/ctld.h
@@ -105,6 +105,8 @@ struct portal {
int p_socket;
};
+TAILQ_HEAD(options, option);
+
#define PG_FILTER_UNKNOWN 0
#define PG_FILTER_NONE 1
#define PG_FILTER_PORTAL 2
@@ -114,6 +116,7 @@ struct portal {
struct portal_group {
TAILQ_ENTRY(portal_group) pg_next;
struct conf *pg_conf;
+ struct options pg_options;
char *pg_name;
struct auth_group *pg_discovery_auth_group;
int pg_discovery_filter;
@@ -152,17 +155,16 @@ struct port {
uint32_t p_ctl_port;
};
-struct lun_option {
- TAILQ_ENTRY(lun_option) lo_next;
- struct lun *lo_lun;
- char *lo_name;
- char *lo_value;
+struct option {
+ TAILQ_ENTRY(option) o_next;
+ char *o_name;
+ char *o_value;
};
struct lun {
TAILQ_ENTRY(lun) l_next;
struct conf *l_conf;
- TAILQ_HEAD(, lun_option) l_options;
+ struct options l_options;
char *l_name;
char *l_backend;
uint8_t l_device_type;
@@ -386,13 +388,11 @@ void lun_set_serial(struct lun *lun, const char *value);
void lun_set_size(struct lun *lun, size_t value);
void lun_set_ctl_lun(struct lun *lun, uint32_t value);
-struct lun_option *lun_option_new(struct lun *lun,
+struct option *option_new(struct options *os,
const char *name, const char *value);
-void lun_option_delete(struct lun_option *clo);
-struct lun_option *lun_option_find(const struct lun *lun,
- const char *name);
-void lun_option_set(struct lun_option *clo,
- const char *value);
+void option_delete(struct options *os, struct option *co);
+struct option *option_find(const struct options *os, const char *name);
+void option_set(struct option *o, const char *value);
void kernel_init(void);
int kernel_lun_add(struct lun *lun);
OpenPOWER on IntegriCloud