mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
e48354ce07
The Linux-iSCSI.org target module is a full featured in-kernel software implementation of iSCSI target mode (RFC-3720) for the current WIP mainline target v4.1 infrastructure code for the v3.1 kernel. More information can be found here: http://linux-iscsi.org/wiki/ISCSI This includes support for: * RFC-3720 defined request / response state machines and support for all defined iSCSI operation codes from Section 10.2.1.2 using libiscsi include/scsi/iscsi_proto.h PDU definitions * Target v4.1 compatible control plane using the generic layout in target_core_fabric_configfs.c and fabric dependent attributes within /sys/kernel/config/target/iscsi/ subdirectories. * Target v4.1 compatible iSCSI statistics based on RFC-4544 (iSCSI MIBS) * Support for IPv6 and IPv4 network portals in M:N mapping to TPGs * iSCSI Error Recovery Hierarchy support * Per iSCSI connection RX/TX thread pair scheduling affinity * crc32c + crc32c_intel SSEv4 instruction offload support using libcrypto * CHAP Authentication support using libcrypto * Conversion to use internal SGl allocation with iscsit_alloc_buffs() -> transport_generic_map_mem_to_cmd() (nab: Fix iscsi_proto.h struct scsi_lun usage from linux-next in commit: iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]) (nab: Fix 32-bit compile warnings) Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Andy Grover <agrover@redhat.com> Acked-by: Roland Dreier <roland@kernel.org> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
32 lines
831 B
C
32 lines
831 B
C
#ifndef _ISCSI_CHAP_H_
|
|
#define _ISCSI_CHAP_H_
|
|
|
|
#define CHAP_DIGEST_MD5 5
|
|
#define CHAP_DIGEST_SHA 6
|
|
|
|
#define CHAP_CHALLENGE_LENGTH 16
|
|
#define CHAP_CHALLENGE_STR_LEN 4096
|
|
#define MAX_RESPONSE_LENGTH 64 /* sufficient for MD5 */
|
|
#define MAX_CHAP_N_SIZE 512
|
|
|
|
#define MD5_SIGNATURE_SIZE 16 /* 16 bytes in a MD5 message digest */
|
|
|
|
#define CHAP_STAGE_CLIENT_A 1
|
|
#define CHAP_STAGE_SERVER_AIC 2
|
|
#define CHAP_STAGE_CLIENT_NR 3
|
|
#define CHAP_STAGE_CLIENT_NRIC 4
|
|
#define CHAP_STAGE_SERVER_NR 5
|
|
|
|
extern u32 chap_main_loop(struct iscsi_conn *, struct iscsi_node_auth *, char *, char *,
|
|
int *, int *);
|
|
|
|
struct iscsi_chap {
|
|
unsigned char digest_type;
|
|
unsigned char id;
|
|
unsigned char challenge[CHAP_CHALLENGE_LENGTH];
|
|
unsigned int authenticate_target;
|
|
unsigned int chap_state;
|
|
} ____cacheline_aligned;
|
|
|
|
#endif /*** _ISCSI_CHAP_H_ ***/
|