All pastes #350680 Raw Edit

Miscellany

public c v1 · immutable
·published 2007-02-11 17:04 UTC
rendered paste body
/* * * RRP_iSCSI.h * * Definitions of necessary iSCSI headers and utility functions. * */typedef union iscsi_header_t {	/*	 *	 * 		RFC 3720 iSCSI Login Request Packet Format	 * 		------------------------------------------	 *	 *	 *  Byte/ 	0 	| 	1	|	 2	|	3	|	 *	/		|		|		|		|	 *	|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|	 *	+---------------+---------------+---------------+---------------+	 *    0 |.|1| 	0x03 	|T|C|.|.|CSG|NSG| Version-max 	| Version-min 	|	 *	+---------------+---------------+---------------+---------------+	 *    4 |TotalAHSLength| 		DataSegmentLength 		|	 *	+---------------+---------------+---------------+---------------+	 *    8 | 				ISID 				|	 *	+ 				+---------------+---------------+	 *   12 | 				| 		TSIH 		|	 *	+---------------+---------------+---------------+---------------+	 *   16 | 			Initiator Task Tag 			|	 *	+---------------+---------------+---------------+---------------+	 *   20 | 		CID 		| 		Reserved 	|	 *	+---------------+---------------+---------------+---------------+	 *   24 | 				CmdSN 				|	 *	+---------------+---------------+---------------+---------------+	 *   28 | 		ExpStatSN or Reserved 				|	 *	+---------------+---------------+---------------+---------------+	 *   32 | 			Reserved	 			|	 *	+---------------+---------------+---------------+---------------+	 *   36 | 			Reserved 				|	 *	+---------------+---------------+---------------+---------------+	 *   40 / 			Reserved 				/	 *	/ 								/	 *	+---------------+---------------+---------------+---------------+	 *   48 / DataSegment - Login Parameters in Text request Format 	/	 *	/ 								/	 *	+---------------+---------------+---------------+---------------+	 *	 */	struct {		u8	opcode;		/* ISCSI_LOGIN_REQUEST_COMMAND	0x03 	*/		u8	unused1;	/* NOT being used			*/		u8	version_max;	/* Max version number supported		*/		u8	version_min;	/* Min version number supported		*/		u32	len;		/* TAHS Length + DS Length		*/		u16	cid;		/* Connection Id			*/		u8	unused2[2];	/* NOT being used			*/		u16	isid;		/* Initiator session id, RFC3721 	*/		u16	tsid;		/* Target session id			*/		u32	itt;		/* Initiator task tag			*/		u8	unused3[4];	/* NOT being used			*/		u32	init_cmd_rn;	/* Initial command session number	*/		u8	ununsed4[20];	/* NOT being used			*/	} login_request_command;};