ctld.h (279003) | ctld.h (279006) |
---|---|
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 279003 2015-02-19 14:33:46Z mav $ | 29 * $FreeBSD: stable/10/usr.sbin/ctld/ctld.h 279006 2015-02-19 14:52:01Z mav $ |
30 */ 31 32#ifndef CTLD_H 33#define CTLD_H 34 35#include <sys/queue.h> 36#ifdef ICL_KERNEL_PROXY 37#include <sys/types.h> --- 76 unchanged lines hidden (view full) --- 114struct portal_group { 115 TAILQ_ENTRY(portal_group) pg_next; 116 struct conf *pg_conf; 117 char *pg_name; 118 struct auth_group *pg_discovery_auth_group; 119 int pg_discovery_filter; 120 bool pg_unassigned; 121 TAILQ_HEAD(, portal) pg_portals; | 30 */ 31 32#ifndef CTLD_H 33#define CTLD_H 34 35#include <sys/queue.h> 36#ifdef ICL_KERNEL_PROXY 37#include <sys/types.h> --- 76 unchanged lines hidden (view full) --- 114struct portal_group { 115 TAILQ_ENTRY(portal_group) pg_next; 116 struct conf *pg_conf; 117 char *pg_name; 118 struct auth_group *pg_discovery_auth_group; 119 int pg_discovery_filter; 120 bool pg_unassigned; 121 TAILQ_HEAD(, portal) pg_portals; |
122 TAILQ_HEAD(, port) pg_ports; |
|
122 char *pg_redirection; 123 124 uint16_t pg_tag; 125}; 126 | 123 char *pg_redirection; 124 125 uint16_t pg_tag; 126}; 127 |
128struct port { 129 TAILQ_ENTRY(port) p_next; 130 TAILQ_ENTRY(port) p_pgs; 131 TAILQ_ENTRY(port) p_ts; 132 struct conf *p_conf; 133 char *p_name; 134 struct auth_group *p_auth_group; 135 struct portal_group *p_portal_group; 136 struct target *p_target; 137 138 uint32_t p_ctl_port; 139}; 140 |
|
127struct lun_option { 128 TAILQ_ENTRY(lun_option) lo_next; 129 struct lun *lo_lun; 130 char *lo_name; 131 char *lo_value; 132}; 133 134struct lun { --- 12 unchanged lines hidden (view full) --- 147 int l_ctl_lun; 148}; 149 150struct target { 151 TAILQ_ENTRY(target) t_next; 152 struct conf *t_conf; 153 struct lun *t_luns[MAX_LUNS]; 154 struct auth_group *t_auth_group; | 141struct lun_option { 142 TAILQ_ENTRY(lun_option) lo_next; 143 struct lun *lo_lun; 144 char *lo_name; 145 char *lo_value; 146}; 147 148struct lun { --- 12 unchanged lines hidden (view full) --- 161 int l_ctl_lun; 162}; 163 164struct target { 165 TAILQ_ENTRY(target) t_next; 166 struct conf *t_conf; 167 struct lun *t_luns[MAX_LUNS]; 168 struct auth_group *t_auth_group; |
155 struct portal_group *t_portal_group; | 169 TAILQ_HEAD(, port) t_ports; |
156 char *t_name; 157 char *t_alias; 158 char *t_redirection; | 170 char *t_name; 171 char *t_alias; 172 char *t_redirection; |
159 160 uint32_t t_ctl_port; | |
161}; 162 163struct isns { 164 TAILQ_ENTRY(isns) i_next; 165 struct conf *i_conf; 166 char *i_addr; 167 struct addrinfo *i_ai; 168}; 169 170struct conf { 171 char *conf_pidfile_path; 172 TAILQ_HEAD(, lun) conf_luns; 173 TAILQ_HEAD(, target) conf_targets; 174 TAILQ_HEAD(, auth_group) conf_auth_groups; | 173}; 174 175struct isns { 176 TAILQ_ENTRY(isns) i_next; 177 struct conf *i_conf; 178 char *i_addr; 179 struct addrinfo *i_ai; 180}; 181 182struct conf { 183 char *conf_pidfile_path; 184 TAILQ_HEAD(, lun) conf_luns; 185 TAILQ_HEAD(, target) conf_targets; 186 TAILQ_HEAD(, auth_group) conf_auth_groups; |
187 TAILQ_HEAD(, port) conf_ports; |
|
175 TAILQ_HEAD(, portal_group) conf_portal_groups; 176 TAILQ_HEAD(, isns) conf_isns; 177 int conf_isns_period; 178 int conf_isns_timeout; 179 int conf_debug; 180 int conf_timeout; 181 int conf_maxproc; 182 --- 11 unchanged lines hidden (view full) --- 194#define CONN_SESSION_TYPE_DISCOVERY 1 195#define CONN_SESSION_TYPE_NORMAL 2 196 197#define CONN_DIGEST_NONE 0 198#define CONN_DIGEST_CRC32C 1 199 200struct connection { 201 struct portal *conn_portal; | 188 TAILQ_HEAD(, portal_group) conf_portal_groups; 189 TAILQ_HEAD(, isns) conf_isns; 190 int conf_isns_period; 191 int conf_isns_timeout; 192 int conf_debug; 193 int conf_timeout; 194 int conf_maxproc; 195 --- 11 unchanged lines hidden (view full) --- 207#define CONN_SESSION_TYPE_DISCOVERY 1 208#define CONN_SESSION_TYPE_NORMAL 2 209 210#define CONN_DIGEST_NONE 0 211#define CONN_DIGEST_CRC32C 1 212 213struct connection { 214 struct portal *conn_portal; |
215 struct port *conn_port; |
|
202 struct target *conn_target; 203 int conn_socket; 204 int conn_session_type; 205 char *conn_initiator_name; 206 char *conn_initiator_addr; 207 char *conn_initiator_alias; 208 uint8_t conn_initiator_isid[6]; 209 struct sockaddr_storage conn_initiator_sa; --- 102 unchanged lines hidden (view full) --- 312 const char *addr); 313 314int isns_new(struct conf *conf, const char *addr); 315void isns_delete(struct isns *is); 316void isns_register(struct isns *isns, struct isns *oldisns); 317void isns_check(struct isns *isns); 318void isns_deregister(struct isns *isns); 319 | 216 struct target *conn_target; 217 int conn_socket; 218 int conn_session_type; 219 char *conn_initiator_name; 220 char *conn_initiator_addr; 221 char *conn_initiator_alias; 222 uint8_t conn_initiator_isid[6]; 223 struct sockaddr_storage conn_initiator_sa; --- 102 unchanged lines hidden (view full) --- 326 const char *addr); 327 328int isns_new(struct conf *conf, const char *addr); 329void isns_delete(struct isns *is); 330void isns_register(struct isns *isns, struct isns *oldisns); 331void isns_check(struct isns *isns); 332void isns_deregister(struct isns *isns); 333 |
334struct port *port_new(struct conf *conf, struct target *target, 335 struct portal_group *pg); 336struct port *port_find(const struct conf *conf, const char *name); 337struct port *port_find_in_pg(const struct portal_group *pg, 338 const char *target); 339void port_delete(struct port *port); 340 |
|
320struct target *target_new(struct conf *conf, const char *name); 321void target_delete(struct target *target); 322struct target *target_find(struct conf *conf, 323 const char *name); 324int target_set_redirection(struct target *target, 325 const char *addr); | 341struct target *target_new(struct conf *conf, const char *name); 342void target_delete(struct target *target); 343struct target *target_find(struct conf *conf, 344 const char *name); 345int target_set_redirection(struct target *target, 346 const char *addr); |
326void target_set_ctl_port(struct target *target, 327 uint32_t value); | |
328 329struct lun *lun_new(struct conf *conf, const char *name); 330void lun_delete(struct lun *lun); 331struct lun *lun_find(const struct conf *conf, const char *name); 332void lun_set_backend(struct lun *lun, const char *value); 333void lun_set_blocksize(struct lun *lun, size_t value); 334void lun_set_device_id(struct lun *lun, const char *value); 335void lun_set_path(struct lun *lun, const char *value); --- 10 unchanged lines hidden (view full) --- 346void lun_option_set(struct lun_option *clo, 347 const char *value); 348 349void kernel_init(void); 350int kernel_lun_add(struct lun *lun); 351int kernel_lun_resize(struct lun *lun); 352int kernel_lun_remove(struct lun *lun); 353void kernel_handoff(struct connection *conn); | 347 348struct lun *lun_new(struct conf *conf, const char *name); 349void lun_delete(struct lun *lun); 350struct lun *lun_find(const struct conf *conf, const char *name); 351void lun_set_backend(struct lun *lun, const char *value); 352void lun_set_blocksize(struct lun *lun, size_t value); 353void lun_set_device_id(struct lun *lun, const char *value); 354void lun_set_path(struct lun *lun, const char *value); --- 10 unchanged lines hidden (view full) --- 365void lun_option_set(struct lun_option *clo, 366 const char *value); 367 368void kernel_init(void); 369int kernel_lun_add(struct lun *lun); 370int kernel_lun_resize(struct lun *lun); 371int kernel_lun_remove(struct lun *lun); 372void kernel_handoff(struct connection *conn); |
354int kernel_port_add(struct target *targ); 355int kernel_port_update(struct target *targ); 356int kernel_port_remove(struct target *targ); | 373int kernel_port_add(struct port *port); 374int kernel_port_update(struct port *port); 375int kernel_port_remove(struct port *port); |
357void kernel_capsicate(void); 358 359#ifdef ICL_KERNEL_PROXY 360void kernel_listen(struct addrinfo *ai, bool iser, 361 int portal_id); 362void kernel_accept(int *connection_id, int *portal_id, 363 struct sockaddr *client_sa, 364 socklen_t *client_salen); --- 42 unchanged lines hidden --- | 376void kernel_capsicate(void); 377 378#ifdef ICL_KERNEL_PROXY 379void kernel_listen(struct addrinfo *ai, bool iser, 380 int portal_id); 381void kernel_accept(int *connection_id, int *portal_id, 382 struct sockaddr *client_sa, 383 socklen_t *client_salen); --- 42 unchanged lines hidden --- |