iscsi.h

Go to the documentation of this file.
00001 #ifndef _GPXE_ISCSI_H
00002 #define _GPXE_ISCSI_H
00003 
00004 /** @file
00005  *
00006  * iSCSI protocol
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011 
00012 #include <stdint.h>
00013 #include <gpxe/socket.h>
00014 #include <gpxe/scsi.h>
00015 #include <gpxe/chap.h>
00016 #include <gpxe/refcnt.h>
00017 #include <gpxe/xfer.h>
00018 #include <gpxe/process.h>
00019 
00020 /** Default iSCSI port */
00021 #define ISCSI_PORT 3260
00022 
00023 /**
00024  * iSCSI segment lengths
00025  *
00026  * iSCSI uses an icky structure with one one-byte field (a dword
00027  * count) and one three-byte field (a byte count).  This structure,
00028  * and the accompanying macros, relieve some of the pain.
00029  */
00030 union iscsi_segment_lengths {
00031         struct {
00032                 /** The AHS length (measured in dwords) */
00033                 uint8_t ahs_len;
00034                 /** The data length (measured in bytes), in network
00035                  * byte order
00036                  */
00037                 uint8_t data_len[3];
00038         } bytes;
00039         /** Ths data length (measured in bytes), in network byte
00040          * order, with ahs_len as the first byte.
00041          */
00042         uint32_t ahs_and_data_len;
00043 };
00044 
00045 /** The length of the additional header segment, in dwords */
00046 #define ISCSI_AHS_LEN( segment_lengths ) \
00047         ( (segment_lengths).bytes.ahs_len )
00048 
00049 /** The length of the data segment, in bytes, excluding any padding */
00050 #define ISCSI_DATA_LEN( segment_lengths ) \
00051         ( ntohl ( (segment_lengths).ahs_and_data_len ) & 0xffffff )
00052 
00053 /** The padding of the data segment, in bytes */
00054 #define ISCSI_DATA_PAD_LEN( segment_lengths ) \
00055         ( ( 0 - (segment_lengths).bytes.data_len[2] ) & 0x03 )
00056 
00057 /** Set additional header and data segment lengths */
00058 #define ISCSI_SET_LENGTHS( segment_lengths, ahs_len, data_len ) do {    \
00059         (segment_lengths).ahs_and_data_len =                            \
00060                 htonl ( data_len | ( ahs_len << 24 ) );                 \
00061         } while ( 0 )
00062 
00063 /**
00064  * iSCSI basic header segment common fields
00065  *
00066  */
00067 struct iscsi_bhs_common {
00068         /** Opcode */
00069         uint8_t opcode;
00070         /** Flags */
00071         uint8_t flags;
00072         /** Fields specific to the PDU type */
00073         uint8_t other_a[2];
00074         /** Segment lengths */
00075         union iscsi_segment_lengths lengths;
00076         /** Fields specific to the PDU type */
00077         uint8_t other_b[8];
00078         /** Initiator Task Tag */
00079         uint32_t itt;
00080         /** Fields specific to the PDU type */
00081         uint8_t other_c[28];
00082 };
00083 
00084 /** Opcode mask */
00085 #define ISCSI_OPCODE_MASK 0x3f
00086 
00087 /** Immediate delivery */
00088 #define ISCSI_FLAG_IMMEDIATE 0x40
00089 
00090 /** Final PDU of a sequence */
00091 #define ISCSI_FLAG_FINAL 0x80
00092 
00093 /**
00094  * iSCSI basic header segment common request fields
00095  *
00096  */
00097 struct iscsi_bhs_common_response {
00098         /** Opcode */
00099         uint8_t opcode;
00100         /** Flags */
00101         uint8_t flags;
00102         /** Fields specific to the PDU type */
00103         uint8_t other_a[2];
00104         /** Segment lengths */
00105         union iscsi_segment_lengths lengths;
00106         /** Fields specific to the PDU type */
00107         uint8_t other_b[8];
00108         /** Initiator Task Tag */
00109         uint32_t itt;
00110         /** Fields specific to the PDU type */
00111         uint8_t other_c[4];
00112         /** Status sequence number */
00113         uint32_t statsn;
00114         /** Expected command sequence number */
00115         uint32_t expcmdsn;
00116         /** Fields specific to the PDU type */
00117         uint8_t other_d[16];
00118 };
00119 
00120 /**
00121  * iSCSI login request basic header segment
00122  *
00123  */
00124 struct iscsi_bhs_login_request {
00125         /** Opcode */
00126         uint8_t opcode;
00127         /** Flags */
00128         uint8_t flags;
00129         /** Maximum supported version number */
00130         uint8_t version_max;
00131         /** Minimum supported version number */
00132         uint8_t version_min;
00133         /** Segment lengths */
00134         union iscsi_segment_lengths lengths;
00135         /** Initiator session ID (IANA format) enterprise number and flags */
00136         uint32_t isid_iana_en;
00137         /** Initiator session ID (IANA format) qualifier */
00138         uint16_t isid_iana_qual;
00139         /** Target session identifying handle */
00140         uint16_t tsih;
00141         /** Initiator Task Tag */
00142         uint32_t itt;
00143         /** Connection ID */
00144         uint16_t cid;
00145         /** Reserved */
00146         uint16_t reserved_a;
00147         /** Command sequence number */
00148         uint32_t cmdsn;
00149         /** Expected status sequence number */
00150         uint32_t expstatsn;
00151         /** Reserved */
00152         uint8_t reserved_b[16];
00153 };
00154 
00155 /** Login request opcode */
00156 #define ISCSI_OPCODE_LOGIN_REQUEST 0x03
00157 
00158 /** Willingness to transition to next stage */
00159 #define ISCSI_LOGIN_FLAG_TRANSITION 0x80
00160 
00161 /** Key=value pairs continued in subsequent request */
00162 #define ISCSI_LOGIN_FLAG_CONTINUE 0x40
00163 
00164 /* Current stage values and mask */
00165 #define ISCSI_LOGIN_CSG_MASK 0x0c
00166 #define ISCSI_LOGIN_CSG_SECURITY_NEGOTIATION 0x00
00167 #define ISCSI_LOGIN_CSG_OPERATIONAL_NEGOTIATION 0x04
00168 #define ISCSI_LOGIN_CSG_FULL_FEATURE_PHASE 0x0c
00169 
00170 /* Next stage values and mask */
00171 #define ISCSI_LOGIN_NSG_MASK 0x03
00172 #define ISCSI_LOGIN_NSG_SECURITY_NEGOTIATION 0x00
00173 #define ISCSI_LOGIN_NSG_OPERATIONAL_NEGOTIATION 0x01
00174 #define ISCSI_LOGIN_NSG_FULL_FEATURE_PHASE 0x03
00175 
00176 /** ISID IANA format marker */
00177 #define ISCSI_ISID_IANA 0x40000000
00178 
00179 /** Fen Systems Ltd. IANA enterprise number
00180  *
00181  * Permission is hereby granted to use Fen Systems Ltd.'s IANA
00182  * enterprise number with this iSCSI implementation.
00183  */
00184 #define IANA_EN_FEN_SYSTEMS 10019
00185 
00186 /**
00187  * iSCSI login response basic header segment
00188  *
00189  */
00190 struct iscsi_bhs_login_response {
00191         /** Opcode */
00192         uint8_t opcode;
00193         /** Flags */
00194         uint8_t flags;
00195         /** Maximum supported version number */
00196         uint8_t version_max;
00197         /** Minimum supported version number */
00198         uint8_t version_min;
00199         /** Segment lengths */
00200         union iscsi_segment_lengths lengths;
00201         /** Initiator session ID (IANA format) enterprise number and flags */
00202         uint32_t isid_iana_en;
00203         /** Initiator session ID (IANA format) qualifier */
00204         uint16_t isid_iana_qual;
00205         /** Target session identifying handle */
00206         uint16_t tsih;
00207         /** Initiator Task Tag */
00208         uint32_t itt;
00209         /** Reserved */
00210         uint32_t reserved_a;
00211         /** Status sequence number */
00212         uint32_t statsn;
00213         /** Expected command sequence number */
00214         uint32_t expcmdsn;
00215         /** Maximum command sequence number */
00216         uint32_t maxcmdsn;
00217         /** Status class */
00218         uint8_t status_class;
00219         /** Status detail */
00220         uint8_t status_detail;
00221         /** Reserved */
00222         uint8_t reserved_b[10];
00223 };
00224 
00225 /** Login response opcode */
00226 #define ISCSI_OPCODE_LOGIN_RESPONSE 0x23
00227 
00228 /* Login response status codes */
00229 #define ISCSI_STATUS_SUCCESS                    0x00
00230 #define ISCSI_STATUS_REDIRECT                   0x01
00231 #define ISCSI_STATUS_INITIATOR_ERROR            0x02
00232 #define ISCSI_STATUS_INITIATOR_ERROR_AUTHENTICATION     0x01
00233 #define ISCSI_STATUS_INITIATOR_ERROR_AUTHORISATION      0x02
00234 #define ISCSI_STATUS_INITIATOR_ERROR_NOT_FOUND          0x03
00235 #define ISCSI_STATUS_INITIATOR_ERROR_REMOVED            0x04
00236 #define ISCSI_STATUS_TARGET_ERROR               0x03
00237 
00238 /**
00239  * iSCSI SCSI command basic header segment
00240  *
00241  */
00242 struct iscsi_bhs_scsi_command {
00243         /** Opcode */
00244         uint8_t opcode;
00245         /** Flags */
00246         uint8_t flags;
00247         /** Reserved */
00248         uint16_t reserved_a;
00249         /** Segment lengths */
00250         union iscsi_segment_lengths lengths;
00251         /** SCSI Logical Unit Number */
00252         struct scsi_lun lun;
00253         /** Initiator Task Tag */
00254         uint32_t itt;
00255         /** Expected data transfer length */
00256         uint32_t exp_len;
00257         /** Command sequence number */
00258         uint32_t cmdsn;
00259         /** Expected status sequence number */
00260         uint32_t expstatsn;
00261         /** SCSI Command Descriptor Block (CDB) */
00262         union scsi_cdb cdb;
00263 };
00264 
00265 /** SCSI command opcode */
00266 #define ISCSI_OPCODE_SCSI_COMMAND 0x01
00267 
00268 /** Command will read data */
00269 #define ISCSI_COMMAND_FLAG_READ 0x40
00270 
00271 /** Command will write data */
00272 #define ISCSI_COMMAND_FLAG_WRITE 0x20
00273 
00274 /* Task attributes */
00275 #define ISCSI_COMMAND_ATTR_UNTAGGED 0x00
00276 #define ISCSI_COMMAND_ATTR_SIMPLE 0x01
00277 #define ISCSI_COMMAND_ATTR_ORDERED 0x02
00278 #define ISCSI_COMMAND_ATTR_HEAD_OF_QUEUE 0x03
00279 #define ISCSI_COMMAND_ATTR_ACA 0x04
00280 
00281 /**
00282  * iSCSI SCSI response basic header segment
00283  *
00284  */
00285 struct iscsi_bhs_scsi_response {
00286         /** Opcode */
00287         uint8_t opcode;
00288         /** Flags */
00289         uint8_t flags;
00290         /** Response code */
00291         uint8_t response;
00292         /** SCSI status code */
00293         uint8_t status;
00294         /** Segment lengths */
00295         union iscsi_segment_lengths lengths;
00296         /** Reserved */
00297         uint8_t reserved_a[8];
00298         /** Initiator Task Tag */
00299         uint32_t itt;
00300         /** SNACK tag */
00301         uint32_t snack;
00302         /** Status sequence number */
00303         uint32_t statsn;
00304         /** Expected command sequence number */
00305         uint32_t expcmdsn;
00306         /** Maximum command sequence number */
00307         uint32_t maxcmdsn;
00308         /** Expected data sequence number */
00309         uint32_t expdatasn;
00310         /** Reserved */
00311         uint8_t reserved_b[8];
00312 };
00313 
00314 /** SCSI response opcode */
00315 #define ISCSI_OPCODE_SCSI_RESPONSE 0x21
00316 
00317 /** SCSI command completed at target */
00318 #define ISCSI_RESPONSE_COMMAND_COMPLETE 0x00
00319 
00320 /** SCSI target failure */
00321 #define ISCSI_RESPONSE_TARGET_FAILURE 0x01
00322 
00323 /** SCSI sense response code offset
00324  *
00325  * The SCSI response may contain unsolicited sense data in the data
00326  * segment.  If it does, this is the offset to the sense response code
00327  * byte, which is the only byte we care about.
00328  */
00329 #define ISCSI_SENSE_RESPONSE_CODE_OFFSET 2
00330 
00331 /**
00332  * iSCSI data-in basic header segment
00333  *
00334  */
00335 struct iscsi_bhs_data_in {
00336         /** Opcode */
00337         uint8_t opcode;
00338         /** Flags */
00339         uint8_t flags;
00340         /** Reserved */
00341         uint8_t reserved_a;
00342         /** SCSI status code */
00343         uint8_t status;
00344         /** Segment lengths */
00345         union iscsi_segment_lengths lengths;
00346         /** Logical Unit Number */
00347         struct scsi_lun lun;
00348         /** Initiator Task Tag */
00349         uint32_t itt;
00350         /** Target Transfer Tag */
00351         uint32_t ttt;
00352         /** Status sequence number */
00353         uint32_t statsn;
00354         /** Expected command sequence number */
00355         uint32_t expcmdsn;
00356         /** Maximum command sequence number */
00357         uint32_t maxcmdsn;
00358         /** Data sequence number */
00359         uint32_t datasn;
00360         /** Buffer offset */
00361         uint32_t offset;
00362         /** Residual count */
00363         uint32_t residual_count;
00364 };
00365 
00366 /** Data-in opcode */
00367 #define ISCSI_OPCODE_DATA_IN 0x25
00368 
00369 /** Data requires acknowledgement */
00370 #define ISCSI_DATA_FLAG_ACKNOWLEDGE 0x40
00371 
00372 /** Data overflow occurred */
00373 #define ISCSI_DATA_FLAG_OVERFLOW 0x04
00374 
00375 /** Data underflow occurred */
00376 #define ISCSI_DATA_FLAG_UNDERFLOW 0x02
00377 
00378 /** SCSI status code and overflow/underflow flags are valid */
00379 #define ISCSI_DATA_FLAG_STATUS 0x01
00380 
00381 /**
00382  * iSCSI data-out basic header segment
00383  *
00384  */
00385 struct iscsi_bhs_data_out {
00386         /** Opcode */
00387         uint8_t opcode;
00388         /** Flags */
00389         uint8_t flags;
00390         /** Reserved */
00391         uint16_t reserved_a;
00392         /** Segment lengths */
00393         union iscsi_segment_lengths lengths;
00394         /** Logical Unit Number */
00395         struct scsi_lun lun;
00396         /** Initiator Task Tag */
00397         uint32_t itt;
00398         /** Target Transfer Tag */
00399         uint32_t ttt;
00400         /** Reserved */
00401         uint32_t reserved_b;
00402         /** Expected status sequence number */
00403         uint32_t expstatsn;
00404         /** Reserved */
00405         uint32_t reserved_c;
00406         /** Data sequence number */
00407         uint32_t datasn;
00408         /** Buffer offset */
00409         uint32_t offset;
00410         /** Reserved */
00411         uint32_t reserved_d;
00412 };
00413 
00414 /** Data-out opcode */
00415 #define ISCSI_OPCODE_DATA_OUT 0x05
00416 
00417 /**
00418  * iSCSI request to transfer basic header segment
00419  *
00420  */
00421 struct iscsi_bhs_r2t {
00422         /** Opcode */
00423         uint8_t opcode;
00424         /** Flags */
00425         uint8_t flags;
00426         /** Reserved */
00427         uint16_t reserved_a;
00428         /** Segment lengths */
00429         union iscsi_segment_lengths lengths;
00430         /** Logical Unit Number */
00431         struct scsi_lun lun;
00432         /** Initiator Task Tag */
00433         uint32_t itt;
00434         /** Target Transfer Tag */
00435         uint32_t ttt;
00436         /** Status sequence number */
00437         uint32_t statsn;
00438         /** Expected command sequence number */
00439         uint32_t expcmdsn;
00440         /** Maximum command sequence number */
00441         uint32_t maxcmdsn;
00442         /** R2T sequence number */
00443         uint32_t r2tsn;
00444         /** Buffer offset */
00445         uint32_t offset;
00446         /** Desired data transfer length */
00447         uint32_t len;
00448 };
00449 
00450 /** R2T opcode */
00451 #define ISCSI_OPCODE_R2T 0x31
00452 
00453 /**
00454  * An iSCSI basic header segment
00455  */
00456 union iscsi_bhs {
00457         struct iscsi_bhs_common common;
00458         struct iscsi_bhs_common_response common_response;
00459         struct iscsi_bhs_login_request login_request;
00460         struct iscsi_bhs_login_response login_response;
00461         struct iscsi_bhs_scsi_command scsi_command;
00462         struct iscsi_bhs_scsi_response scsi_response;
00463         struct iscsi_bhs_data_in data_in;
00464         struct iscsi_bhs_data_out data_out;
00465         struct iscsi_bhs_r2t r2t;
00466         unsigned char bytes[ sizeof ( struct iscsi_bhs_common ) ];
00467 };
00468 
00469 /** State of an iSCSI TX engine */
00470 enum iscsi_tx_state {
00471         /** Nothing to send */
00472         ISCSI_TX_IDLE = 0,
00473         /** Sending the basic header segment */
00474         ISCSI_TX_BHS,
00475         /** Sending the additional header segment */
00476         ISCSI_TX_AHS,
00477         /** Sending the data segment */
00478         ISCSI_TX_DATA,
00479         /** Sending the data segment padding */
00480         ISCSI_TX_DATA_PADDING,
00481 };
00482 
00483 /** State of an iSCSI RX engine */
00484 enum iscsi_rx_state {
00485         /** Receiving the basic header segment */
00486         ISCSI_RX_BHS = 0,
00487         /** Receiving the additional header segment */
00488         ISCSI_RX_AHS,
00489         /** Receiving the data segment */
00490         ISCSI_RX_DATA,
00491         /** Receiving the data segment padding */
00492         ISCSI_RX_DATA_PADDING,
00493 };
00494 
00495 /** An iSCSI session */
00496 struct iscsi_session {
00497         /** Reference counter */
00498         struct refcnt refcnt;
00499 
00500         /** Transport-layer socket */
00501         struct xfer_interface socket;
00502 
00503         /** Target address */
00504         char *target_address;
00505         /** Target port */
00506         unsigned int target_port;
00507         /** Target IQN */
00508         char *target_iqn;
00509         /** Logical Unit Number (LUN) */
00510         struct scsi_lun lun;
00511         /** Target socket address (recorded only for iBFT) */
00512         struct sockaddr target_sockaddr;
00513 
00514         /** Session status
00515          *
00516          * This is the bitwise-OR of zero or more ISCSI_STATUS_XXX
00517          * constants.
00518          */
00519         int status;
00520         /** Retry count
00521          *
00522          * Number of times that the connection has been retried.
00523          * Reset upon a successful connection.
00524          */
00525         int retry_count;
00526 
00527         /** Initiator username (if any) */
00528         char *initiator_username;
00529         /** Initiator password (if any) */
00530         char *initiator_password;
00531         /** Target username (if any) */
00532         char *target_username;
00533         /** Target password (if any) */
00534         char *target_password;
00535         /** CHAP challenge (for target auth only)
00536          *
00537          * This is a block of random data; the first byte is used as
00538          * the CHAP identifier (CHAP_I) and the remainder as the CHAP
00539          * challenge (CHAP_C).
00540          */
00541         unsigned char chap_challenge[17];
00542         /** CHAP response (used for both initiator and target auth) */
00543         struct chap_response chap;
00544 
00545         /** Target session identifying handle
00546          *
00547          * This is assigned by the target when we first log in, and
00548          * must be reused on subsequent login attempts.
00549          */
00550         uint16_t tsih;
00551         /** Initiator task tag
00552          *
00553          * This is the tag of the current command.  It is incremented
00554          * whenever a new command is started.
00555          */
00556         uint32_t itt;
00557         /** Target transfer tag
00558          *
00559          * This is the tag attached to a sequence of data-out PDUs in
00560          * response to an R2T.
00561          */
00562         uint32_t ttt;
00563         /**
00564          * Transfer offset
00565          *
00566          * This is the offset for an in-progress sequence of data-out
00567          * PDUs in response to an R2T.
00568          */
00569         uint32_t transfer_offset;
00570         /**
00571          * Transfer length
00572          *
00573          * This is the length for an in-progress sequence of data-out
00574          * PDUs in response to an R2T.
00575          */
00576         uint32_t transfer_len;
00577         /** Command sequence number
00578          *
00579          * This is the sequence number of the current command, used to
00580          * fill out the CmdSN field in iSCSI request PDUs.  It is
00581          * updated with the value of the ExpCmdSN field whenever we
00582          * receive an iSCSI response PDU containing such a field.
00583          */
00584         uint32_t cmdsn;
00585         /** Status sequence number
00586          *
00587          * This is the most recent status sequence number present in
00588          * the StatSN field of an iSCSI response PDU containing such a
00589          * field.  Whenever we send an iSCSI request PDU, we fill out
00590          * the ExpStatSN field with this value plus one.
00591          */
00592         uint32_t statsn;
00593         
00594         /** Basic header segment for current TX PDU */
00595         union iscsi_bhs tx_bhs;
00596         /** State of the TX engine */
00597         enum iscsi_tx_state tx_state;
00598         /** TX process */
00599         struct process process;
00600 
00601         /** Basic header segment for current RX PDU */
00602         union iscsi_bhs rx_bhs;
00603         /** State of the RX engine */
00604         enum iscsi_rx_state rx_state;
00605         /** Byte offset within the current RX state */
00606         size_t rx_offset;
00607         /** Length of the current RX state */
00608         size_t rx_len;
00609         /** Buffer for received data (not always used) */
00610         void *rx_buffer;
00611 
00612         /** Current SCSI command
00613          *
00614          * Set to NULL when command is complete.
00615          */
00616         struct scsi_command *command;
00617         /** Instant return code
00618          *
00619          * Set to a non-zero value if all requests should return
00620          * immediately.  This can be used to e.g. avoid retrying
00621          * logins that are doomed to fail authentication.
00622          */
00623         int instant_rc;
00624 };
00625 
00626 /** iSCSI session is currently in the security negotiation phase */
00627 #define ISCSI_STATUS_SECURITY_NEGOTIATION_PHASE         \
00628         ( ISCSI_LOGIN_CSG_SECURITY_NEGOTIATION |        \
00629           ISCSI_LOGIN_NSG_OPERATIONAL_NEGOTIATION )
00630 
00631 /** iSCSI session is currently in the operational parameter
00632  * negotiation phase
00633  */
00634 #define ISCSI_STATUS_OPERATIONAL_NEGOTIATION_PHASE      \
00635         ( ISCSI_LOGIN_CSG_OPERATIONAL_NEGOTIATION |     \
00636           ISCSI_LOGIN_NSG_FULL_FEATURE_PHASE )
00637 
00638 /** iSCSI session is currently in the full feature phase */
00639 #define ISCSI_STATUS_FULL_FEATURE_PHASE ISCSI_LOGIN_CSG_FULL_FEATURE_PHASE
00640 
00641 /** Mask for all iSCSI session phases */
00642 #define ISCSI_STATUS_PHASE_MASK ( ISCSI_LOGIN_CSG_MASK | ISCSI_LOGIN_NSG_MASK )
00643 
00644 /** iSCSI session needs to send the initial security negotiation strings */
00645 #define ISCSI_STATUS_STRINGS_SECURITY 0x0100
00646 
00647 /** iSCSI session needs to send the CHAP_A string */
00648 #define ISCSI_STATUS_STRINGS_CHAP_ALGORITHM 0x0200
00649 
00650 /** iSCSI session needs to send the CHAP response */
00651 #define ISCSI_STATUS_STRINGS_CHAP_RESPONSE 0x0400
00652 
00653 /** iSCSI session needs to send the mutual CHAP challenge */
00654 #define ISCSI_STATUS_STRINGS_CHAP_CHALLENGE 0x0800
00655 
00656 /** iSCSI session needs to send the operational negotiation strings */
00657 #define ISCSI_STATUS_STRINGS_OPERATIONAL 0x1000
00658 
00659 /** Mask for all iSCSI "needs to send" flags */
00660 #define ISCSI_STATUS_STRINGS_MASK 0xff00
00661 
00662 /** Target has requested forward (initiator) authentication */
00663 #define ISCSI_STATUS_AUTH_FORWARD_REQUIRED 0x00010000
00664 
00665 /** Initiator requires target (reverse) authentication */
00666 #define ISCSI_STATUS_AUTH_REVERSE_REQUIRED 0x00020000
00667 
00668 /** Target authenticated itself correctly */
00669 #define ISCSI_STATUS_AUTH_REVERSE_OK 0x00040000
00670 
00671 /** Maximum number of retries at connecting */
00672 #define ISCSI_MAX_RETRIES 2
00673 
00674 extern int iscsi_attach ( struct scsi_device *scsi, const char *root_path );
00675 extern void iscsi_detach ( struct scsi_device *scsi );
00676 extern const char * iscsi_initiator_iqn ( void );
00677 
00678 #endif /* _GPXE_ISCSI_H */

Generated on Tue Apr 6 20:01:08 2010 for gPXE by  doxygen 1.5.7.1