Commit b09def42 authored by chiaming2000's avatar chiaming2000
Browse files

Sync kinetic.proto from Kinetic-Protocol repository.

Only comments were updated in this sync.
parent 651e01bc
Loading
Loading
Loading
Loading
+124 −186

File changed.

Preview size limit exceeded, changes collapsed.

+479 −479
Original line number Diff line number Diff line
@@ -17,10 +17,10 @@
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

package com.seagate.kinetic.proto;

option java_outer_classname = "Kinetic"; /**
option java_outer_classname = "Kinetic";
/**
 * Update summary:
 *
 * 1. Message is divided into the following logical sections.
@@ -29,25 +29,18 @@ option java_outer_classname = "Kinetic"; /**
 * 1.2 Body.
 * 1.3 Status.
 * 1.4 value.
 * 1.5 Hmac.
 *
 * 2. Added ackSequence field in Header to handle concurrency and asynchronous operations.
 *
 * 3. Added MessageType in Header to identify message type for each message.
 *
 * 3.1 Java client runtime lib implementation added logic to validate respond message types.
 * 1.5 HMAC.
 *
 * 4. Added (repeated) Property in header for future extensions.
 *
 */ message Message {
 */
 message Message {

// The command contains the header, body and status as a single
// unit that will be used to calculate the hmac.
// unit that will be used to calculate the HMAC.
	optional Command command = 1;

    // 2 is reserved, do not use

  //hmac
	//HMAC
	optional bytes hmac = 3;
	message Command {
	//message header
@@ -99,7 +92,7 @@ option java_outer_classname = "Kinetic"; /**
		//                  complete at the time that the time expired
		optional int64 timeout = 9;

    // If true, equests will not attempt multi revolution recoveries even if the timeout has not occurred.
		// If true, requests will not attempt multi revolution recoveries even if the timeout has not occurred.
		// In this case the result will be DATA_ERROR. To have the drive exhaust all possible error recovery, leave
		// this field off or set to false, and make sure that the timeout is set to be longer than any possible queue
		// time and error recovery time. On a disk drive, the maximum error recovery time could be seconds.
@@ -122,13 +115,9 @@ option java_outer_classname = "Kinetic"; /**
		//range operation
		optional Range range = 2;

    //set up opeartion
		//set up operation
		optional Setup setup = 3;

    // EXPERIMENTAL!
    //
    // The following is incomplete and evolving. Implement at your own risk.
    //
		// Peer to Peer operations.
		optional P2POperation p2pOperation = 4;

@@ -391,15 +380,14 @@ option java_outer_classname = "Kinetic"; /**
			// name of the vendor. Should be "Seagate"
			optional string vendor = 5;

      // name of the device. Have no clue what this should be...
      // "TBD" for the drive?
      // "Simulator" for the simulator?
			// The model of the device.
			// "Simulator" for the simulator.
			optional string model = 6;

      // Device Serial number (SN) from the underlying drive
			// Device Serial number (SN)
			optional bytes serialNumber = 7;

      // Device world wide name (WWN) from the underlying drive
			// Device world wide name (WWN)
			optional bytes worldWideName = 14;

			// This is the vendor specific version of the software on the drive in dot notation
@@ -447,7 +435,7 @@ option java_outer_classname = "Kinetic"; /**
		repeated ACL acl = 2; // one per identity
		message ACL {
			optional int64 identity = 1;
      optional bytes key = 2; // the hmac key
			optional bytes key = 2; // the HMAC key
            optional HMACAlgorithm hmacAlgorithm = 3;

			// value that must be in the key for read, write, range requests. If none are specified
@@ -489,40 +477,52 @@ option java_outer_classname = "Kinetic"; /**
        INVALID_ALGORITHM = -1; // Must come first, so default is invalid
        SHA1 = 1; // see NIST
		SHA2 = 2; // see NIST
    SHA3 = 3; // see NIST. The length of the tag determined the lenth of the hash
    CRC32 = 4; // the CRC32 is the standard ethernet CRC32. See IEEE
		SHA3 = 3; // see NIST. The length of the tag determined the length of the hash
		CRC32 = 4; // the CRC32 is the standard Ethernet CRC32. See IEEE
		CRC64 = 5; // The CRC is ...
    // 7-99 are reserverd.
		// 7-99 are reserved.
		// 100-inf are private algorithms.
	}

	//operation code
	enum MessageType {
        INVALID_MESSAGE_TYPE = -1; // Must come first, so default is invalid

        GET = 2; //get operation
    GET_RESPONSE = 1; //get response
		GET_RESPONSE = 1;

		PUT = 4; //put operation
		PUT_RESPONSE = 3;

		DELETE = 6;
		DELETE_RESPONSE = 5;

		GETNEXT = 8;
		GETNEXT_RESPONSE = 7;

		GETPREVIOUS = 10;
		GETPREVIOUS_RESPONSE = 9;

		GETKEYRANGE = 12;
		GETKEYRANGE_RESPONSE = 11;

        // 13 and 14 are reserved, do not use

		GETVERSION = 16;
		GETVERSION_RESPONSE = 15;

        // 17, 18, 19, and 20 are reserved, do not use

		SETUP = 22;
		SETUP_RESPONSE = 21;

		GETLOG = 24;
		GETLOG_RESPONSE = 23;

		SECURITY = 26;
		SECURITY_RESPONSE = 25;

    //peer to peer push operation
    PEER2PEERPUSH = 28;
		PEER2PEERPUSH = 28; //peer to peer push operation
		PEER2PEERPUSH_RESPONSE = 27;

		NOOP = 30;