|
Packit Service |
646995 |
/*
|
|
Packit Service |
646995 |
* iSCSI transport
|
|
Packit Service |
646995 |
*
|
|
Packit Service |
646995 |
* Copyright (C) 2006 Mike Christie
|
|
Packit Service |
646995 |
* Copyright (C) 2006 Red Hat, Inc. All rights reserved.
|
|
Packit Service |
646995 |
*
|
|
Packit Service |
646995 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit Service |
646995 |
* it under the terms of the GNU General Public License as published
|
|
Packit Service |
646995 |
* by the Free Software Foundation; either version 2 of the License, or
|
|
Packit Service |
646995 |
* (at your option) any later version.
|
|
Packit Service |
646995 |
*
|
|
Packit Service |
646995 |
* This program is distributed in the hope that it will be useful, but
|
|
Packit Service |
646995 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
646995 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
646995 |
* General Public License for more details.
|
|
Packit Service |
646995 |
*/
|
|
Packit Service |
646995 |
#ifndef ISCSI_TRANSPORT_H
|
|
Packit Service |
646995 |
#define ISCSI_TRANSPORT_H
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
#include "types.h"
|
|
Packit Service |
646995 |
#include "config.h"
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
enum set_host_ip_opts {
|
|
Packit Service |
646995 |
SET_HOST_IP_NOT_REQ, /* iface.ipaddress is not supported */
|
|
Packit Service |
646995 |
SET_HOST_IP_REQ, /* iface.ipaddress must be specified */
|
|
Packit Service |
646995 |
SET_HOST_IP_OPT, /* iface.ipaddress is not required */
|
|
Packit Service |
646995 |
};
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
struct iscsi_transport;
|
|
Packit Service |
646995 |
struct iscsi_conn;
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
struct iscsi_transport_template {
|
|
Packit Service |
646995 |
const char *name;
|
|
Packit Service |
646995 |
uint8_t rdma;
|
|
Packit Service |
646995 |
/*
|
|
Packit Service |
646995 |
* Drivers should set this if they require iscsid to set
|
|
Packit Service |
646995 |
* the host's ip address.
|
|
Packit Service |
646995 |
*/
|
|
Packit Service |
646995 |
uint8_t set_host_ip;
|
|
Packit Service |
646995 |
uint8_t use_boot_info;
|
|
Packit Service |
646995 |
uint8_t bind_ep_required;
|
|
Packit Service |
646995 |
uint8_t no_netdev;
|
|
Packit Service |
646995 |
/* be2iscsi has a single host vlan setting,
|
|
Packit Service |
646995 |
* but uses 2 ifaces for ipv4 and ipv6 settings; keep them in sync */
|
|
Packit Service |
646995 |
uint8_t sync_vlan_settings;
|
|
Packit Service |
646995 |
int (*ep_connect) (struct iscsi_conn *conn, int non_blocking);
|
|
Packit Service |
646995 |
int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms);
|
|
Packit Service |
646995 |
void (*ep_disconnect) (struct iscsi_conn *conn);
|
|
Packit Service |
646995 |
void (*create_conn) (struct iscsi_conn *conn);
|
|
Packit Service |
646995 |
int (*set_net_config) (struct iscsi_transport *t,
|
|
Packit Service |
646995 |
struct iface_rec *iface,
|
|
Packit Service |
646995 |
struct iscsi_session *session);
|
|
Packit Service |
646995 |
int (*exec_ping) (struct iscsi_transport *t,
|
|
Packit Service |
646995 |
struct iface_rec *iface, int datalen,
|
|
Packit Service |
646995 |
struct sockaddr_storage *dst_addr, uint32_t *status);
|
|
Packit Service |
646995 |
};
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
/* represents data path provider */
|
|
Packit Service |
646995 |
struct iscsi_transport {
|
|
Packit Service |
646995 |
struct list_head list;
|
|
Packit Service |
646995 |
uint64_t handle;
|
|
Packit Service |
646995 |
uint32_t caps;
|
|
Packit Service |
646995 |
char name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
|
Packit Service |
646995 |
struct list_head sessions;
|
|
Packit Service |
646995 |
struct iscsi_transport_template *template;
|
|
Packit Service |
646995 |
};
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
extern int set_transport_template(struct iscsi_transport *t);
|
|
Packit Service |
646995 |
extern int transport_load_kmod(char *transport_name);
|
|
Packit Service |
646995 |
extern int transport_probe_for_offload(void);
|
|
Packit Service |
646995 |
|
|
Packit Service |
646995 |
#endif
|