diff options
author | 2009-08-13 20:28:29 +0000 | |
---|---|---|
committer | 2009-08-13 20:28:29 +0000 | |
commit | e740f2986bbd3d654387db55720fe541b55c5252 (patch) | |
tree | 14a5b3c2c341e643bf70f397ae8bb4f1fac5ff4c /sys | |
parent | We do not do vm86 mode on amd64 (diff) | |
download | wireguard-openbsd-e740f2986bbd3d654387db55720fe541b55c5252.tar.xz wireguard-openbsd-e740f2986bbd3d654387db55720fe541b55c5252.zip |
Add more stuff change some fields to make the handling a bit easier.
OK dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/iscsi.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/sys/scsi/iscsi.h b/sys/scsi/iscsi.h index bcddf00ed86..79e326b0006 100644 --- a/sys/scsi/iscsi.h +++ b/sys/scsi/iscsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iscsi.h,v 1.2 2009/03/23 02:19:07 dlg Exp $ */ +/* $OpenBSD: iscsi.h,v 1.3 2009/08/13 20:28:29 claudio Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -19,8 +19,6 @@ #ifndef _SYS_SCSI_ISCSI_H #define _SYS_SCSI_ISCSI_H -#define ISCSI_OP_ - struct iscsi_pdu { u_int8_t opcode; u_int8_t flags; @@ -33,7 +31,11 @@ struct iscsi_pdu { u_int32_t itt; - u_int8_t _reserved2[28]; + u_int8_t _reserved2[4]; + + u_int32_t cmdsn; + + u_int8_t _reserved3[20]; } __packed; /* @@ -68,6 +70,15 @@ struct iscsi_pdu { #define ISCSI_PDU_I(_h) ((_h)->opcode & 0x40) #define ISCSI_PDU_F(_h) ((_h)->flags & 0x80) +#define ISCSI_OP_F_IMMEDIATE 0x40 + +/* + * various other flags and values + */ +#define ISCSI_ISID_OUI 0x00000000 +#define ISCSI_ISID_EN 0x40000000 +#define ISCSI_ISID_RAND 0x80000000 + struct iscsi_pdu_scsi_request { u_int8_t opcode; u_int8_t flags; @@ -200,17 +211,17 @@ struct iscsi_pdu_data_in { u_int32_t ttt; - u_int8_t statsn[4]; + u_int32_t statsn; - u_int8_t expcmdsn[4]; + u_int32_t expcmdsn; - u_int8_t maxcmdsn[4]; + u_int32_t maxcmdsn; - u_int8_t datasn[4]; + u_int32_t datasn; - u_int8_t buffer_offs[4]; + u_int32_t buffer_offs; - u_int8_t residual[4]; + u_int32_t residual; } __packed; struct iscsi_pdu_rt2 { @@ -335,6 +346,14 @@ struct iscsi_pdu_login_request { u_int8_t _reserved2[16]; } __packed; +#define ISCSI_LOGIN_F_T 0x80 +#define ISCSI_LOGIN_F_C 0x40 +#define ISCSI_LOGIN_F_CSG(x) (((x) & 0x3) << 2) +#define ISCSI_LOGIN_F_NSG(x) ((x) & 0x3) +#define ISCSI_LOGIN_STG_SECNEG 0 +#define ISCSI_LOGIN_STG_OPNEG 1 +#define ISCSI_LOGIN_STG_FULL 3 + struct iscsi_pdu_login_response { u_int8_t opcode; u_int8_t flags; |