Deleted Added
full compact
ctld.h (263720) ctld.h (263723)
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2012 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Edward Tomasz Napierala under sponsorship
6 * from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: stable/10/usr.sbin/ctld/ctld.h 263720 2014-03-25 12:01:55Z trasz $
29 * $FreeBSD: stable/10/usr.sbin/ctld/ctld.h 263723 2014-03-25 12:10:30Z trasz $
30 */
31
32#ifndef CTLD_H
33#define CTLD_H
34
35#include <sys/queue.h>
36#include <stdbool.h>
37#include <libutil.h>

--- 88 unchanged lines hidden (view full) ---

126};
127
128struct target {
129 TAILQ_ENTRY(target) t_next;
130 TAILQ_HEAD(, lun) t_luns;
131 struct conf *t_conf;
132 struct auth_group *t_auth_group;
133 struct portal_group *t_portal_group;
30 */
31
32#ifndef CTLD_H
33#define CTLD_H
34
35#include <sys/queue.h>
36#include <stdbool.h>
37#include <libutil.h>

--- 88 unchanged lines hidden (view full) ---

126};
127
128struct target {
129 TAILQ_ENTRY(target) t_next;
130 TAILQ_HEAD(, lun) t_luns;
131 struct conf *t_conf;
132 struct auth_group *t_auth_group;
133 struct portal_group *t_portal_group;
134 char *t_iqn;
134 char *t_name;
135 char *t_alias;
136};
137
138struct conf {
139 char *conf_pidfile_path;
140 TAILQ_HEAD(, target) conf_targets;
141 TAILQ_HEAD(, auth_group) conf_auth_groups;
142 TAILQ_HEAD(, portal_group) conf_portal_groups;

--- 76 unchanged lines hidden (view full) ---

219 const char *initiator_portal);
220
221struct portal_group *portal_group_new(struct conf *conf, const char *name);
222void portal_group_delete(struct portal_group *pg);
223struct portal_group *portal_group_find(struct conf *conf, const char *name);
224int portal_group_add_listen(struct portal_group *pg,
225 const char *listen, bool iser);
226
135 char *t_alias;
136};
137
138struct conf {
139 char *conf_pidfile_path;
140 TAILQ_HEAD(, target) conf_targets;
141 TAILQ_HEAD(, auth_group) conf_auth_groups;
142 TAILQ_HEAD(, portal_group) conf_portal_groups;

--- 76 unchanged lines hidden (view full) ---

219 const char *initiator_portal);
220
221struct portal_group *portal_group_new(struct conf *conf, const char *name);
222void portal_group_delete(struct portal_group *pg);
223struct portal_group *portal_group_find(struct conf *conf, const char *name);
224int portal_group_add_listen(struct portal_group *pg,
225 const char *listen, bool iser);
226
227struct target *target_new(struct conf *conf, const char *iqn);
227struct target *target_new(struct conf *conf, const char *name);
228void target_delete(struct target *target);
229struct target *target_find(struct conf *conf,
228void target_delete(struct target *target);
229struct target *target_find(struct conf *conf,
230 const char *iqn);
230 const char *name);
231
232struct lun *lun_new(struct target *target, int lun_id);
233void lun_delete(struct lun *lun);
234struct lun *lun_find(struct target *target, int lun_id);
235void lun_set_backend(struct lun *lun, const char *value);
236void lun_set_blocksize(struct lun *lun, size_t value);
237void lun_set_device_id(struct lun *lun, const char *value);
238void lun_set_path(struct lun *lun, const char *value);

--- 65 unchanged lines hidden ---
231
232struct lun *lun_new(struct target *target, int lun_id);
233void lun_delete(struct lun *lun);
234struct lun *lun_find(struct target *target, int lun_id);
235void lun_set_backend(struct lun *lun, const char *value);
236void lun_set_blocksize(struct lun *lun, size_t value);
237void lun_set_device_id(struct lun *lun, const char *value);
238void lun_set_path(struct lun *lun, const char *value);

--- 65 unchanged lines hidden ---