public final class NOPInParser extends TargetMessageParser
This class parses a NOP-In message defined in the iSCSI Standard (RFC3720).
NOP-In is either sent by a target as a response to a NOP-Out, as a "ping" to an initiator, or as a means to
carry a changed ExpCmdSN and/or MaxCmdSN if another PDU will not be available for
a long time (as determined by the target).
When a target receives the NOP-Out with a valid Initiator Task Tag (not the reserved value
0xffffffff), it MUST respond with a NOP-In with the same Initiator Task Tag that was provided
in the NOP-Out request. It MUST also duplicate up to the first MaxRecvDataSegmentLength bytes
of the initiator provided Ping Data. For such a response, the Target Transfer Tag MUST be
0xffffffff.
Otherwise, when a target sends a NOP-In that is not a response to a Nop-Out received from the initiator,
the Initiator Task Tag MUST be set to 0xffffffff and the Data Segment MUST NOT contain any
data (DataSegmentLength MUST be 0).
This fields have these specific meanings:
A LUN MUST be set to a correct value when the Target Transfer Tag is valid (not the reserved value
0xffffffff).
The StatSN field will always contain the next StatSN. However, when the Initiator Task Tag is set to
0xffffffff, StatSN for the connection is not advanced after this PDU is sent.
expectedCommandSequenceNumber, maximumCommandSequenceNumber, statusSequenceNumberlogicalUnitNumber, protocolDataUnit| Constructor and Description |
|---|
NOPInParser(ProtocolDataUnit initProtocolDataUnit)
Default constructor, creates a new, empty
NOPInParser object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIntegrity()
This method checks, if all parsed fields are valid.
|
void |
clear()
This method sets all settings to their initial values.
|
protected void |
deserializeBytes1to3(int line)
Parse the bytes
1 till 3 in the Basic Header
Segment. |
protected void |
deserializeBytes20to23(int line)
Parse the bytes
20 till 23 in the Basic Header
Segment. |
DataSegmentFactory.DataSegmentFormat |
getDataSegmentFormat()
If this method returns
true, hen it indicates that the data
segment data is interpreted as binary data. |
int |
getTargetTransferTag()
If the target is responding to a NOP-Out, this is set to the reserved
value
0xffffffff. |
protected int |
serializeBytes20to23()
Serializes the bytes
20 till 23 in the Basic
Header Segment. |
void |
setTargetTransferTag(int targetTransferTag)
Sets the Target Transfer Tag of this object.
|
String |
toString()
This method concatenate all the fields of a derived parser to allow an
easy generation of debug informations.
|
deserializeBytes24to27, deserializeBytes28to31, deserializeBytes32to35, deserializeBytes36to39, deserializeBytes40to43, deserializeBytes44to47, getExpectedCommandSequenceNumber, getMaximumCommandSequenceNumber, getShortInfo, getStatusSequenceNumber, incrementSequenceNumber, serializeBytes1to3, serializeBytes24to27, serializeBytes28to31, serializeBytes32to35, serializeBytes36to39, serializeBytes40to43, serializeBytes44to47, setExpectedCommandSequenceNumber, setMaximumCommandSequenceNumber, setStatusSequenceNumbercanContainAdditionalHeaderSegments, canHaveDigests, deserializeBytes12to15, deserializeBytes8to11, getLogicalUnitNumber, serializeBytes12to15, serializeBytes8to11, setLogicalUnitNumberpublic NOPInParser(ProtocolDataUnit initProtocolDataUnit)
NOPInParser object.initProtocolDataUnit - The reference ProtocolDataUnit instance, which
contains this NOPInParser subclass object.public final int getTargetTransferTag()
0xffffffff.
If the target is sending a NOP-In as a Ping (intending to receive a corresponding NOP-Out), this field
is set to a valid value (not the reserved 0xffffffff).
If the target is initiating a NOP-In without wanting to receive a corresponding NOP-Out, this field
MUST hold the reserved value of 0xffffffff.
public final void setTargetTransferTag(int targetTransferTag)
targetTransferTag - the new Target Transfer Tag.public final String toString()
toString in class TargetMessageParserpublic final DataSegmentFactory.DataSegmentFormat getDataSegmentFormat()
true, hen it indicates that the data
segment data is interpreted as binary data. Else the data segment data
must be interpreted as Text Format.getDataSegmentFormat in class AbstractMessageParserDataSegmentFactory.DataSegmentFormatpublic final void clear()
clear in class TargetMessageParserprotected final void deserializeBytes1to3(int line)
throws InternetSCSIException
1 till 3 in the Basic Header
Segment.deserializeBytes1to3 in class TargetMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes20to23(int line)
throws InternetSCSIException
20 till 23 in the Basic Header
Segment.deserializeBytes20to23 in class TargetMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void checkIntegrity()
throws InternetSCSIException
checkIntegrity in class AbstractMessageParserInternetSCSIException - If the integrity is violated.protected final int serializeBytes20to23()
20 till 23 in the Basic
Header Segment.serializeBytes20to23 in class TargetMessageParserCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.