Deleted Added
full compact
ctld.h (256281) ctld.h (263720)
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 255570 2013-09-14 15:29:06Z trasz $
29 * $FreeBSD: stable/10/usr.sbin/ctld/ctld.h 263720 2014-03-25 12:01:55Z 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>

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

48 TAILQ_ENTRY(auth) a_next;
49 struct auth_group *a_auth_group;
50 char *a_user;
51 char *a_secret;
52 char *a_mutual_user;
53 char *a_mutual_secret;
54};
55
30 */
31
32#ifndef CTLD_H
33#define CTLD_H
34
35#include <sys/queue.h>
36#include <stdbool.h>
37#include <libutil.h>

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

48 TAILQ_ENTRY(auth) a_next;
49 struct auth_group *a_auth_group;
50 char *a_user;
51 char *a_secret;
52 char *a_mutual_user;
53 char *a_mutual_secret;
54};
55
56struct auth_name {
57 TAILQ_ENTRY(auth_name) an_next;
58 struct auth_group *an_auth_group;
59 char *an_initator_name;
60};
61
62struct auth_portal {
63 TAILQ_ENTRY(auth_portal) ap_next;
64 struct auth_group *ap_auth_group;
65 char *ap_initator_portal;
66};
67
56#define AG_TYPE_UNKNOWN 0
57#define AG_TYPE_NO_AUTHENTICATION 1
58#define AG_TYPE_CHAP 2
59#define AG_TYPE_CHAP_MUTUAL 3
60
61struct auth_group {
62 TAILQ_ENTRY(auth_group) ag_next;
63 struct conf *ag_conf;
64 char *ag_name;
65 struct target *ag_target;
66 int ag_type;
67 TAILQ_HEAD(, auth) ag_auths;
68#define AG_TYPE_UNKNOWN 0
69#define AG_TYPE_NO_AUTHENTICATION 1
70#define AG_TYPE_CHAP 2
71#define AG_TYPE_CHAP_MUTUAL 3
72
73struct auth_group {
74 TAILQ_ENTRY(auth_group) ag_next;
75 struct conf *ag_conf;
76 char *ag_name;
77 struct target *ag_target;
78 int ag_type;
79 TAILQ_HEAD(, auth) ag_auths;
80 TAILQ_HEAD(, auth_name) ag_names;
81 TAILQ_HEAD(, auth_portal) ag_portals;
68};
69
70struct portal {
71 TAILQ_ENTRY(portal) p_next;
72 struct portal_group *p_portal_group;
73 bool p_iser;
74 char *p_listen;
75 struct addrinfo *p_ai;

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

187const struct auth *auth_new_chap(struct auth_group *ag,
188 const char *user, const char *secret);
189const struct auth *auth_new_chap_mutual(struct auth_group *ag,
190 const char *user, const char *secret,
191 const char *user2, const char *secret2);
192const struct auth *auth_find(struct auth_group *ag,
193 const char *user);
194
82};
83
84struct portal {
85 TAILQ_ENTRY(portal) p_next;
86 struct portal_group *p_portal_group;
87 bool p_iser;
88 char *p_listen;
89 struct addrinfo *p_ai;

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

201const struct auth *auth_new_chap(struct auth_group *ag,
202 const char *user, const char *secret);
203const struct auth *auth_new_chap_mutual(struct auth_group *ag,
204 const char *user, const char *secret,
205 const char *user2, const char *secret2);
206const struct auth *auth_find(struct auth_group *ag,
207 const char *user);
208
209const struct auth_name *auth_name_new(struct auth_group *ag,
210 const char *initiator_name);
211bool auth_name_defined(const struct auth_group *ag);
212const struct auth_name *auth_name_find(const struct auth_group *ag,
213 const char *initiator_name);
214
215const struct auth_portal *auth_portal_new(struct auth_group *ag,
216 const char *initiator_portal);
217bool auth_portal_defined(const struct auth_group *ag);
218const struct auth_portal *auth_portal_find(const struct auth_group *ag,
219 const char *initiator_portal);
220
195struct portal_group *portal_group_new(struct conf *conf, const char *name);
196void portal_group_delete(struct portal_group *pg);
197struct portal_group *portal_group_find(struct conf *conf, const char *name);
198int portal_group_add_listen(struct portal_group *pg,
199 const char *listen, bool iser);
200
201struct target *target_new(struct conf *conf, const char *iqn);
202void target_delete(struct target *target);

--- 75 unchanged lines hidden ---
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);
228void target_delete(struct target *target);

--- 75 unchanged lines hidden ---