public final class ISID extends Object
This is an initiator-defined component of the session identifier and is structured as follows (see [RFC3721] and Section 9.1.1 Conservative Reuse of ISIDs for details):
| Byte | 0 | 1 | 2 | 3 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bits | 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 |
| 8 | ||||||||||||||||||||||||||||||||
| 12 | ||||||||||||||||||||||||||||||||
The T field identifies the format and usage of A, B, C, and D as indicated below:
| T | Description |
|---|---|
| 00b | OUI-Format A&B are a 22 bit OUI (the I/G & U/L bits are omitted)C&D 24 bit qualifier |
| 01b | EN - Format (IANA Enterprise Number) A - Reserved B&C EN (IANA Enterprise Number) D - Qualifier |
| 10b | "Random" A - Reserved B&C Random D - Qualifier |
| 11b | A,B,C&D Reserved |
For the T field values 00b and 01b, a combination of A
and B (for 00b) or B and C (for 01b)
identifies the vendor or organization whose component (software or hardware) generates this ISID. A vendor
or organization with one or more OUIs, or one or more Enterprise Numbers, MUST use at least one of these
numbers and select the appropriate value for the T field when its components generate ISIDs.
An OUI or EN MUST be set in the corresponding fields in network byte order (byte
big-endian).
If the T field is 10b, B and C are set to a random
24-bit unsigned integer value in network byte order (byte big-endian). See [RFC3721] for how
this affects the principle of "conservative reuse".
The Qualifier field is a 16 or 24-bit unsigned integer value that provides a
range of possible values for the ISID within the selected namespace. It may be set to any value within the
constraints specified in the iSCSI protocol (see Section 3.4.3 Consequences of the Model and Section 9.1.1
Conservative Reuse of ISIDs).
The T field value of 11b is reserved.
If the ISID is derived from something assigned to a hardware adapter or interface by a vendor, as a preset default value, it MUST be configurable to a value assigned according to the SCSI port behavior desired by the system in which it is installed (see Section 9.1.1 Conservative Reuse of ISIDs and Section 9.1.2 iSCSI Name, ISID, and TPGT Use). The resultant ISID MUST also be persistent over power cycles, reboot, card swap, etc. For details have a look in the [RFC3721].
| Constructor and Description |
|---|
ISID()
Default constructor, creates a new, empty ISID object.
|
ISID(org.jscsi.parser.login.ISID.Format initT,
byte initA,
short initB,
byte initC,
short initD)
This constructor creates a new ISID object with the given settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIntegrity()
This method checks, if all fields are valid.
|
void |
clear()
This methods resets their attributes to the defaults.
|
static ISID |
createRandom(long seed)
This method creates an Initiator Session ID of the
Random format defined in the iSCSI
Standard (RFC3720). |
boolean |
equals(ISID isid)
This method compares a given ISID object with this object for value
equality.
|
byte |
getA()
Returns the value of the field
A. |
short |
getB()
Returns the value of the field
B. |
byte |
getC()
Returns the value of the field
C. |
short |
getD()
Returns the value of the field
D. |
org.jscsi.parser.login.ISID.Format |
getT()
Returns the value of the field
T. |
int |
hashCode() |
long |
serialize()
Serializes this ISID object ot its byte representation.
|
String |
toString()
Creates a string with all fields of this ISID object.
|
public ISID()
public ISID(org.jscsi.parser.login.ISID.Format initT,
byte initA,
short initB,
byte initC,
short initD)
initT - The new T-Value.initA - The new A-Value.initB - The new B-Value.initC - The new C-Value.initD - The new D-Value.public static final ISID createRandom(long seed)
Random format defined in the iSCSI
Standard (RFC3720).seed - The initialization seed for random generator.ISID.public final long serialize()
throws InternetSCSIException
InternetSCSIException - If any violation of the iSCSI-Standard emerge.public final String toString()
public final boolean equals(ISID isid)
isid - The given ISID object to check.True, if the values of the two ISID objects are
equal. Else false.public final void clear()
public final byte getA()
A.A.public final short getB()
B.B.public final byte getC()
C.C.public final short getD()
D.D.public final org.jscsi.parser.login.ISID.Format getT()
T.T.protected final void checkIntegrity()
throws InternetSCSIException
InternetSCSIException - If the integrity is violated.Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.