📄 iscsi-ioctl.h
字号:
#ifndef ISCSI_IOCTL_H_#define ISCSI_IOCTL_H_/* * iSCSI connection daemon * Copyright (C) 2001 Cisco Systems, Inc. * maintained by linux-iscsi@cisco.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * See the file COPYING included with this distribution for more details. * * $Id: iscsi-ioctl.h,v 1.15 2002/09/23 17:42:39 smferris Exp $ * * include for ioctl calls between the daemon and the kernel module * */#include "iscsi-protocol.h"#include "iscsiAuthClient.h"#include "iscsi-portal.h"/* * ioctls */#define ISCSI_ESTABLISH_SESSION 0x00470301#define ISCSI_TERMINATE_SESSION 0x00470302#define ISCSI_SHUTDOWN 0x00470303#define ISCSI_GETTRACE 0x00470304#define ISCSI_PROBE_LUNS 0x00470305#define ISCSI_RESET_PROBING 0x00470306typedef struct scsi_device_info { int max_sd_devices; int max_sd_partitions; int max_st_devices; int max_sg_devices; int max_sr_devices;} scsi_device_info_t;typedef struct iscsi_session_ioctl { uint32_t ioctl_size; uint32_t ioctl_version; uint8_t isid[6]; int iscsi_bus; int target_id; int probe_order; int password_length; char username[iscsiAuthStringMaxLength + 1]; unsigned char password[iscsiAuthStringMaxLength + 1]; unsigned char TargetName[TARGET_NAME_MAXLEN + 1]; unsigned char InitiatorName[TARGET_NAME_MAXLEN + 1]; unsigned char InitiatorAlias[TARGET_NAME_MAXLEN + 1]; uint32_t lun_bitmap[8]; char link_base_dir[LINK_PATH_MAX + 1]; mode_t link_dir_mode; scsi_device_info_t device_info; int host_number; /* returned from the kernel */ int channel; /* returned from the kernel */ unsigned char TargetAlias[TARGET_NAME_MAXLEN + 1]; /* returned from the kernel */ uint32_t num_portals; uint32_t portal_info_size; iscsi_portal_info_t portals[1]; /* 1 or more portals for this session to use */} iscsi_session_ioctl_t;#define ISCSI_SESSION_IOCTL_VERSION 16typedef struct iscsi_terminate_session_ioctl_t { uint32_t ioctl_size; uint32_t ioctl_version; int iscsi_bus; int target_id;} iscsi_terminate_session_ioctl_t;#define ISCSI_TERMINATE_SESSION_IOCTL_VERSION 1typedef struct iscsi_probe_luns_ioctl_t { uint32_t ioctl_size; uint32_t ioctl_version; int iscsi_bus; int target_id; uint32_t lun_bitmap[8]; scsi_device_info_t device_info;} iscsi_probe_luns_ioctl_t;#define ISCSI_PROBE_LUNS_IOCTL_VERSION 1#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -