CASA/include/sscs_unx_cache_defines.h

149 lines
5.3 KiB
C
Raw Normal View History

/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#ifndef _SSCS_UNX_CACHE_DEFINES_H_
#define _SSCS_UNX_CACHE_DEFINES_H_
// internal definitions
// Lengths of message fields
#define MSGID_LEN 2
#define MSG_LEN 4
#define MSG_WORD_LEN 2
#define MSG_DWORD_LEN 4
#define MSG_STRING_LEN 4
// Some fixed message lengths for request and reply
#define MSG_REPLY_OPENSS 14
#define MSG_REPLY_GENERAL 10
#define MSG_REPLY_GETSSINFO 14
#define MSG_REPLY_GETKEYCHAIN_INFO 22
/* Return Codes from ipc server (sscs) to the client(cachelib).
*/
#define SSCS_REPLY_SUCCESS 0
#define SSCS_E_INVALID_MESSAGE -1
#define SSCS_E_VERSION_NOT_SUPPORTED -2
#define SSCS_E_SYSTEM_ERROR -3
#define SSCS_E_REPLY_NOT_AVAILABLE -4
#define SSCS_E_INVALID_KEYCHAIN -5
#define SSCS_E_INVALID_SECRETID -6
#define SSCS_E_KEYCHAIN_ALREADY_EXISTS -7
#define SSCS_E_MAX_KEYCHAINS_REACHED -8
#define SSCS_E_ADD_KEYCHAIN_FAILED -9
#define SSCS_E_NO_KEYCHAINS_EXIST -10
#define SSCS_E_KEYCHAIN_DOES_NOT_EXIST -11
#define SSCS_E_REMOVE_KEYCHAIN_FAILED -12
#define SSCS_E_WRITE_SECRET_FAILED -13
#define SSCS_E_ADDING_DEFAULT_KEYCHAIN_FAILED -14
#define SSCS_E_NO_SECRETS_EXIST -15
#define SSCS_E_REMOVE_SECRET_FAILED -16
#define SSCS_E_GET_SOCKET_PATH_FAILED -17
#define SSCS_E_CREATE_SOCKET_FAILED -18
#define SSCS_E_SECRETID_DOES_NOT_EXIST -19
#define SSCS_E_INVALID_INPUT -20
#define SSCS_E_SETTING_PASSCODE_FAILED -21
#define SSCS_STORE_IS_PERSISTENT -22
#define SSCS_STORE_IS_NOT_PERSISTENT -23
#define SSCS_SECRET_IS_PERSISTENT -24
#define SSCS_SECRET_IS_NOT_PERSISTENT -25
#define SSCS_E_INCORRECT_FUNCTION_CALL_SEQUENCE -30
/* Request and Response message Ids.
*/
#define MAX_MESSAGES 14
#define REQ_CACHE_OPEN_SECRET_STORE_MSGID 0x0001
#define RESP_CACHE_OPEN_SECRET_STORE_MSGID 0x1001
#define REQ_CACHE_CLOSE_SECRET_STORE_MSGID 0x0002
#define RESP_CACHE_CLOSE_SECRET_STORE_MSGID 0x1002
#define REQ_CACHE_REMOVE_SECRET_STORE_MSGID 0x0003
#define RESP_CACHE_REMOVE_SECRET_STORE_MSGID 0x1003
#define REQ_CACHE_ENUMERATE_KEYCHAINIDS_MSGID 0x0004
#define RESP_CACHE_ENUMERATE_KEYCHAINIDS_MSGID 0x1004
#define REQ_CACHE_ADD_KEYCHAIN_MSGID 0x0005
#define RESP_CACHE_ADD_KEYCHAIN_MSGID 0x1005
#define REQ_CACHE_REMOVE_KEYCHAIN_MSGID 0x0006
#define RESP_CACHE_REMOVE_KEYCHAIN_MSGID 0x1006
#define REQ_CACHE_ENUMERATE_SECRETIDS_MSGID 0x0007
#define RESP_CACHE_ENUMERATE_SECRETIDS_MSGID 0x1007
#define REQ_CACHE_READ_SECRET_MSGID 0x0008
#define RESP_CACHE_READ_SECRET_MSGID 0x1008
#define REQ_CACHE_WRITE_SECRET_MSGID 0x0009
#define RESP_CACHE_WRITE_SECRET_MSGID 0x1009
#define REQ_CACHE_REMOVE_SECRET_MSGID 0x000A
#define RESP_CACHE_REMOVE_SECRET_MSGID 0x100A
#define REQ_GET_SECRETSTORE_INFO_MSGID 0x000B
#define RESP_GET_SECRETSTORE_INGO_MSGID 0x100B
#define REQ_GET_KEYCHAIN_INFO_MSGID 0x000C
#define RESP_GET_KEYCHAIN_INFO_MSGID 0x100C
#define REQ_LOCK_CACHE_MSGID 0x000D
#define RESP_LOCK_CACHE_MSGID 0x100D
#define REQ_UNLOCK_CACHE_MSGID 0x000E
#define RESP_UNLOCK_CACHE_MSGID 0x100E
#define REQ_SET_MASTER_PASSCODE 0x000F
#define RESP_SET_MASTER_PASSCODE 0x100F
#define REQ_READ_KEY_MSGID 0x0010
#define RESP_READ_KEY_MSGID 0x1010
#define REQ_WRITE_KEY_MSGID 0x0011
#define RESP_WRITE_KEY_MSGID 0x1011
#define REQ_SET_MASTER_PASSWORD 0x0012
#define RESP_SET_MASTER_PASSWORD 0x1021
#define REQ_IS_SECRET_PERSISTENT 0x0013
#define RESP_IS_SECRET_PERSISTENT 0x1013
2005-12-09 18:42:13 +01:00
#define REQ_IS_OBJECT_SERIALIZATION 0x0014
#define RESP_IS_OBJECT_SERIALIZATION 0x1014
#define REQ_WRITE_BINARY_KEY_MSGID 0x0015
#define RESP_WRITE_BINARY_KEY_MSGID 0x1015
#define REQ_READ_BINARY_KEY_MSGID 0x0016
#define RESP_READ_BINARY_KEY_MSGID 0x1016
#define EXT_TYPE_WINDOWS_LUID 0x00000001;
#define WINDOWS_LUID_LEN 0x00000008;
#endif //_CACHE_DEFINES_H_