summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/ctld.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-10-25 12:50:26 +0000
committermav <mav@FreeBSD.org>2014-10-25 12:50:26 +0000
commitb91222fa4fd4a5dab2de697378099454a393c295 (patch)
treec9a8672374932c764b31679ac7fb3b1f692c6dd9 /usr.sbin/ctld/ctld.h
parent06aa9cfa86beab8ee900711bc5f3fad562395056 (diff)
downloadFreeBSD-src-b91222fa4fd4a5dab2de697378099454a393c295.zip
FreeBSD-src-b91222fa4fd4a5dab2de697378099454a393c295.tar.gz
Add basic iSNS client to the iSCSI target.
This makes ctld(8) register its iSCSI targets and portals on configured iSNS servers to allow initiators find them without active discovery. Fetching of allowed initiators from iSNS is not implemented now, so target ACLs still should be configured manually. Reviewed by: trasz@ MFC after: 1 month Sponsored by: iXsystems, Inc.
Diffstat (limited to 'usr.sbin/ctld/ctld.h')
-rw-r--r--usr.sbin/ctld/ctld.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h
index f0a03bd..1c7d4cb 100644
--- a/usr.sbin/ctld/ctld.h
+++ b/usr.sbin/ctld/ctld.h
@@ -146,11 +146,21 @@ struct target {
char *t_alias;
};
+struct isns {
+ TAILQ_ENTRY(isns) i_next;
+ struct conf *i_conf;
+ char *i_addr;
+ struct addrinfo *i_ai;
+};
+
struct conf {
char *conf_pidfile_path;
TAILQ_HEAD(, target) conf_targets;
TAILQ_HEAD(, auth_group) conf_auth_groups;
TAILQ_HEAD(, portal_group) conf_portal_groups;
+ TAILQ_HEAD(, isns) conf_isns;
+ int conf_isns_period;
+ int conf_isns_timeout;
int conf_debug;
int conf_timeout;
int conf_maxproc;
@@ -281,6 +291,12 @@ struct portal_group *portal_group_find(const struct conf *conf,
int portal_group_add_listen(struct portal_group *pg,
const char *listen, bool iser);
+int isns_new(struct conf *conf, const char *addr);
+void isns_delete(struct isns *is);
+void isns_register(struct isns *isns, struct isns *oldisns);
+void isns_check(struct isns *isns);
+void isns_deregister(struct isns *isns);
+
struct target *target_new(struct conf *conf, const char *name);
void target_delete(struct target *target);
struct target *target_find(struct conf *conf,
@@ -358,6 +374,7 @@ void log_debugx(const char *, ...) __printflike(1, 2);
char *checked_strdup(const char *);
bool valid_iscsi_name(const char *name);
+void set_timeout(int timeout, int fatal);
bool timed_out(void);
#endif /* !CTLD_H */
OpenPOWER on IntegriCloud