Package org.jscsi.target.scsi.cdb

Examples of org.jscsi.target.scsi.cdb.ScsiOperationCode


            switch (bhs.getOpCode()) {

                case SCSI_COMMAND :
                    if (connection.getTargetSession().isNormalSession()) {
                        final SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
                        ScsiOperationCode scsiOpCode = ScsiOperationCode.valueOf(parser.getCDB().get(0));

                        LOGGER.debug("scsiOpCode = " + scsiOpCode);// log SCSI
                                                                   // Operation Code

                        if (scsiOpCode != null) {
View Full Code Here


    public void execute (ProtocolDataUnit pdu) throws IOException , InterruptedException , InternetSCSIException , DigestException , SettingsException {

        // find out the type of READ CAPACITY command ((10) or (16))
        final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
        final SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
        final ScsiOperationCode opCode = ScsiOperationCode.valueOf(parser.getCDB().get(0));
        ReadCapacityCdb cdb;
        if (opCode == ScsiOperationCode.READ_CAPACITY_10)
            cdb = new ReadCapacity10Cdb(parser.getCDB());
        else if (opCode == ScsiOperationCode.READ_CAPACITY_16)
            cdb = new ReadCapacity16Cdb(parser.getCDB());
View Full Code Here

        // get relevant values from PDU/CDB
        BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
        SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
        final int initiatorTaskTag = bhs.getInitiatorTaskTag();
        WriteCdb cdb;
        final ScsiOperationCode scsiOpCode = ScsiOperationCode.valueOf(parser.getCDB().get(0));
        if (scsiOpCode == ScsiOperationCode.WRITE_10)
            cdb = new Write10Cdb(parser.getCDB());
        else if (scsiOpCode == ScsiOperationCode.WRITE_6)
            cdb = new Write6Cdb(parser.getCDB());
        else {
View Full Code Here

        SCSICommandParser parser = (SCSICommandParser) bhs.getParser();
        final int initiatorTaskTag = bhs.getInitiatorTaskTag();

        // get the Read(6) or Read(10) CDB
        ReadCdb cdb;
        final ScsiOperationCode scsiOpCode = ScsiOperationCode.valueOf(parser.getCDB().get(0));
        if (scsiOpCode == ScsiOperationCode.READ_10)// most likely option first
            cdb = new Read10Cdb(parser.getCDB());
        else if (scsiOpCode == ScsiOperationCode.READ_6)
            cdb = new Read6Cdb(parser.getCDB());
        else {
View Full Code Here

        if (LOGGER.isDebugEnabled()) {
            // sharrajesh
            // Needed to debug, out of order receiving of StatusSN and ExpStatSN
            if (bhs.getOpCode() == OperationCode.SCSI_COMMAND) {
                final SCSICommandParser scsiParser = (SCSICommandParser) bhs.getParser();
                ScsiOperationCode scsiOpCode = ScsiOperationCode.valueOf(scsiParser.getCDB().get(0));
                LOGGER.debug("scsiOpCode = " + scsiOpCode);
                LOGGER.debug("CDB bytes: \n" + Debug.byteBufferToString(scsiParser.getCDB()));
            }
            // LOGGER.debug("parser.expectedStatusSequenceNumber: " + expectedStatusSequenceNumber);
            if (connection == null)
View Full Code Here

TOP

Related Classes of org.jscsi.target.scsi.cdb.ScsiOperationCode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.