tldm-universe/Ardent/UV/gcidir/include/vm_ici.h

352 lines
20 KiB
C
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
/******************************************************************************
*
* vm_ici.h - Used by the ICI as the main include file.
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software, Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 16/03/94 12306 JC Changed max rec.id to be 255
* 09.03.94 12306 JC Added MAX_ERROR_LENGTH define
* 13.12.93 12306 JC Creation of Module. Based on the PI/open version.
*
*****************************************************************************/
/* ICI argument types */
typedef long IC_KEY_ARG_TYPE; /* interfaces that take a key argument */
typedef long* IC_KEY_ARG_PTR; /* interfaces that take a key argument */
typedef long IC_NUM_ARG_TYPE; /* general numeric data type */
typedef long* IC_NUM_ARG_PTR; /* general numeric data type */
typedef char IC_CHAR_ARG_TYPE; /* general character data */
typedef char* IC_CHAR_ARG_PTR; /* general character data */
typedef long IC_CODE_ARG_TYPE; /* return code types */
typedef long* IC_CODE_ARG_PTR; /* return code types */
/* Mark characters */
#define I_IM (char)255
#define I_FM (char)254
#define I_VM (char)253
#define I_SM (char)252
#define I_TM (char)251
#define ITEM_MARK (char)255
#define FIELD_MARK (char)254
#define VALUE_MARK (char)253
#define SUBVALUE_MARK (char)252
#define TEXT_MARK (char)251
/* Limits */
#define IC_MAX_RECID_LENGTH 255 /* Maximum length of a record id*/
#define IC_MAX_SELECT_LIST 10 /* Highest select list number */
#define IC_MAX_SUB_ARGS 17 /* Maximum number of subroutine args.*/
#define IC_MAX_SUBNAME_LENGTH 32 /* Maximum length of subroutine name.*/
/* Parameters (key values) */
#define IK_DATA 0 /* Open the data portion */
#define IK_DICT 1 /* Open the dictionary portion */
#define IK_DELETE 0 /* Release any locks on that record during DELETE*/
#define IK_DELETEU 3 /* Retain any locks during DELETE*/
#define IK_READ 0 /* READ without locking */
#define IK_READU 2 /* READU lock */
#define IK_READL 4 /* READL lock */
#define IK_WAIT 1 /* An additive value to IK$READU and IK$READL*/
#define IK_WRITE 0 /* Release the lock during WRITE*/
#define IK_WRITEU 5 /* Retain the lock during WRITE */
#define IK_HCNONE 0 /* No conversions forced to the host*/
#define IK_HCDATE 1 /* Force date conversions to be done on the host*/
#define IK_HCTIME 2 /* Force time conversions to be done on the host*/
#define IK_HCMD 4 /* Force MD conversions to be done on the host*/
#define IK_MORE 0 /* Show that there is more segments of data*/
#define IK_FINISHED 1 /* Show last part of write seg. */
#define IK_ABORT 3 /* Transaction ABORT or ROLLBACK*/
#define IK_COMMIT 2 /* Transaction COMMIT */
#define IK_START 1 /* Transaction START or BEGIN */
/* FILEINFO keys (copied from fileinfo.it in PI) */
#define FINFO_IS_FILEVAR 0 /* Anything */
#define FINFO_VOCNAME 1 /* PI only */
#define FINFO_PATHNAME 2 /* ALL */
#define FINFO_TYPE 3 /* ALL */
#define FINFO_HASHALG 4 /* LH, SH */
#define FINFO_MODULUS 5 /* LH, SH */
#define FINFO_MINMODULUS 6 /* LH */
#define FINFO_GROUPSIZE 7 /* LH */
#define FINFO_LARGERECORDSIZE 8 /* LH */
#define FINFO_MERGELOAD 9 /* LH */
#define FINFO_SPLITLOAD 10 /* LH */
#define FINFO_CURRENTLOAD 11 /* LH (percentage) */
#define FINFO_NODENAME 12 /* ALL. Null if local, else nodename*/
#define FINFO_IS_AKFILE 13 /* LH */
#define FINFO_CURRENTLINE 14 /* SEQ */
#define FINFO_PARTNUM 15 /* Distributed, Multivolume */
#define FINFO_STATUS 16 /* Distributed, Multivolume */
#define FINFO_RECOVERYTYPE 17 /* ALL */
#define FINFO_RECOVERYID 18 /* LH */
#define FINFO_IS_FIXED_MODULUS 19 /* LH */
/* Next one depends on whether Primos or PI/open really */
#define FINFO_MAXOPTION 19 /* Maximum key */
/* File type values as returned by fileinfo. Taken from filetypes.it. */
#define FILETYPE_MEMORY 1
#define FILETYPE_HASHED 2
#define FILETYPE_DYNAMIC 3
#define FILETYPE_TYPE1 4
#define FILETYPE_SEQ 5
#define FILETYPE_MULTIVOLUME 6
#define FILETYPE_DISTRIBUTED 7
/* Lock status values returned by RECORDLOCKED(). Taken from rec_locked.it. */
#define LOCK_MY_FILELOCK 3 /* this user has filelock */
#define LOCK_MY_READU 2 /* this user has readu lock */
#define LOCK_MY_READL 1 /* this user has readl lock */
#define LOCK_NO_LOCK 0 /* record not locked */
#define LOCK_OTHER_READL -1 /* another user has readl lock */
#define LOCK_OTHER_READU -2 /* another user has readu lock */
#define LOCK_OTHER_FILELOCK -3 /* another user has filelock */
/* Error numbers. */
#define MAX_ERROR_LEN 128
/* Numbers relating to the C library on the PC. */
/* These are adapted from the file errno.h. */
#define IE_PC_CLIB_FIRST 14000 /* First error number in range */
#define IE_ENOENT 14002 /* No such file or directory */
#define IE_EIO 14005 /* I/O error */
#define IE_EBADF 14009 /* Bad file number */
#define IE_ENOMEM 14012 /* No memory available */
#define IE_EACCES 14013 /* Permission denied */
#define IE_EINVAL 14022 /* Invalid argument */
#define IE_ENFILE 14023 /* File table overflow */
#define IE_EMFILE 14024 /* Too many open files */
#define IE_ENOSPC 14028 /* No space left on device */
#define IE_BAD_VERSION 14030 /* Bad server version number */
/* Numbers relating to the Virtual Socket Library on the PC. */
#define IE_BW_START 14200 /* Beginning of range */
#define IE_BW_BASE 14500 /* Offset for error mapping */
#define IE_VSL_BADNETKEY 14495 /* VSL network type not specified correctly*/
#define IE_VSL_NONETMODULE 14499 /* VSL network module not loaded*/
#define IE_BW_WOULDBLOCK 14535 /* Operation would block */
#define IE_BW_INPROGRESS 14536 /* Operation now in progress */
#define IE_BW_ALREADY 14537 /* Operation already in progress*/
#define IE_BW_NOTSOCK 14538 /* Socket operation on non-socket*/
#define IE_BW_DESTADDRREQ 14539 /* Destination address required */
#define IE_BW_MSGSIZE 14540 /* Message too long */
#define IE_BW_PROTOTYPE 14541 /* Protocol wrong type for socket*/
#define IE_BW_NOPROTOOPT 14542 /* Bad protocol option */
#define IE_BW_PROTONOSUPPORT 14543 /* Protocol not supported */
#define IE_BW_SOCKTNOSUPPORT 14544 /* Socket type not supported */
#define IE_BW_OPNOTSUPP 14545 /* Operation not supported on socket*/
#define IE_BW_PFNOSUPPORT 14546 /* Protocol family not supported*/
#define IE_BW_AFNOSUPPORT 14547 /* Addr family not supported by prot family*/
#define IE_BW_ADDRINUSE 14548 /* Address already in use */
#define IE_BW_ADDRNOTAVAIL 14549 /* Can't assign requested address*/
#define IE_BW_NETDOWN 14550 /* Network is down */
#define IE_BW_NETUNREACH 14551 /* Network is unreachable */
#define IE_BW_NETRESET 14552 /* Network dropped connection or reset*/
#define IE_BW_CONNABORTED 14553 /* Software caused connection abort*/
#define IE_BW_CONNRESET 14554 /* Connection reset by peer */
#define IE_BW_NOBUFS 14555 /* No buffer space available */
#define IE_BW_ISCONN 14556 /* Socket is already connected */
#define IE_BW_NOTCONN 14557 /* Socket is not connected */
#define IE_BW_SHUTDOWN 14558 /* Can't send after socket shutdown*/
#define IE_BW_TOOMANYREFS 14559 /* Too many references: can't splice*/
#define IE_BW_TIMEDOUT 14560 /* Connection timed out */
#define IE_BW_CONNREFUSED 14561 /* Connection refused */
#define IE_BW_LOOP 14562 /* Too many levels of symbolic links*/
#define IE_BW_NAMETOOLONG 14563 /* File name too long */
#define IE_BW_HOSTDOWN 14564 /* Host is down */
#define IE_BW_HOSTUNREACH 14565 /* Host is unreachable */
#define IE_BW_NOTEMPTY 14566 /* Directory not empty */
#define IE_BW_PROCLIM 14567 /* Too many processes */
#define IE_BW_USERS 14568 /* Too many users */
#define IE_BW_DQUOT 14569 /* Disc quota exceeded */
#define IE_BW_STALE 14570 /* Stale NFS file handle */
#define IE_BW_REMOTE 14571 /* Too many levels of remote in path*/
#define IE_BW_NOSTR 14572 /* Device is not a stream */
#define IE_BW_TIME 14573 /* Timer expired */
#define IE_BW_NOSR 14574 /* Out of streams resources */
#define IE_BW_NOMSG 14575 /* No message of desired type */
#define IE_BW_BADMSG 14576 /* Trying to read unreadable message*/
#define IE_BW_IDRM 14577 /* Identifier removed */
#define IE_BW_DEADLK 14578 /* Deadlock condition. */
#define IE_BW_NOLCK 14579 /* No record locks available. */
#define IE_BW_BADVERSION 14580 /* Library/driver version mismatch*/
#define IE_BW_INVALSOCK 14581 /* Invalid argument */
#define IE_BW_TOOMANYSOCK 14582 /* Too many open sockets */
#define IE_BW_FAULTSOCK 14583 /* Bad address in sockets call */
#define IE_BW_RESET 14584 /* The socket has reset */
#define IE_BW_NOTUNIQUE 14585 /* Unique parameter required */
#define IE_BW_NOGATEADDR 14586 /* Gateway address required */
#define IE_BW_SENDERR 14587 /* The packet could not be sent */
#define IE_BW_NOETHDRVR 14588 /* No driver or card failed init*/
#define IE_BW_WRITPENDING 14589 /* Queued write operation */
#define IE_BW_READPENDING 14590 /* Queued read operation */
#define IE_BW_NOTCPIP 14591 /* TCPIP not loaded */
#define IE_BW_DRVBUSY 14592 /* TCPIP busy */
#define IE_BW_END 14999 /* End of range */
/* Numbers in this group are derived from INFORMATION itself. */
/* DO NOT CHANGE THESE!!! except for changes in INFORMATION... */
#define IE_FRST 10000 /* First PI-specific error number*/
/* Errors generated from library routine calls */
#define IE_NOACCESS 11000 /* Requested access denied */
#define IE_NOSUPPORT 11001 /* Function not supported on this system*/
#define IE_NOTRELATIVE 11002 /* Relative pathname expected and not given*/
#define IE_PATHNOTFOUND 11003 /* Pathname could not be found */
#define IE_NOTASSIGNED 11004 /* Device not assigned */
#define IE_NODEVICE 11005 /* Device not known */
#define IE_ROFS 11006 /* Device assigned with Read Only access*/
#define IE_BADSTTY 11007 /* Bad stty option when device assigned*/
#define IE_UNKNOWN_USER 11008 /* Attempting to send message to user not in PI*/
#define IE_SND_REQ_REC 11009 /* Sender requires receive enabled*/
#define IE_MSG_REJECTED 11010 /* Message rejected by recipient*/
#define IE_ALI 22000 /* Already initialised */
#define IE_BFN 22001 /* bad field number (READV, WRITEV...)*/
#define IE_BTS 22002 /* buffer.size too small or not valid number*/
#define IE_IID 22003 /* Illegal record ID */
#define IE_LRR 22004 /* last record read (READNEXT) */
#define IE_NFI 22005 /* file.tag is not a file identifier*/
#define IE_NIN 22006 /* Client library not initialised for this task*/
#define IE_NLK 22007 /* The file was not locked by your process*/
#define IE_NPI 22008 /* Prime INFORMATION is not available*/
#define IE_STR 22009 /* The FILEINFO result is a string.*/
#define IE_MEM 22010 /* no memory to DIM an array (OPEN)*/
#define IE_RLS 22011 /* Error releasing memory */
#define IE_BPF 22012 /* Bad Partitioned file */
#define IE_ALG 22013 /* Bad Partitioning algorithm */
#define IE_NUP 22014 /* Non-unique Part number */
#define IE_DNA 22015 /* Dynt not available */
/* Generic and visible file system errors */
#define IE_RNF 30001 /* Record not found */
#define IE_LCK 30002 /* File or record is locked by another user*/
#define IE_FITF 30007 /* File table (ie smm) full */
#define IE_PAR 30010 /* Bad parameter */
#define IE_KEY 30011 /* Bad key */
#define IE_EXS 30012 /* File already exists in an attempt to create*/
#define IE_WFT 30013 /* Wrong file type: not segdir or dir*/
#define IE_EXCL 30014 /* File opened exclusively by another user*/
#define IE_BRWL 30015 /* Rwlock on file is wrong and can't be fixed*/
#define IE_WSFT 30016 /* Wrong subfile type */
#define IE_SFNF 30018 /* Subfile not found when expected*/
#define IE_BMF 30019 /* Bad header in memory file */
#define IE_UFT 30020 /* Unsupported file type */
#define IE_UNKN 30021 /* Unknown file type detected */
#define IE_EOF 30025 /* Didn't read expected number of bytes*/
#define IE_IOF 30031 /* Illegal operation on file */
#define IE_BSHR 30049 /* Shared data for file doesn't match file*/
#define IE_BLHP 30052 /* Bad header in LH primary subfile*/
#define IE_BLHO 30053 /* Bad header in LH overflow subfile*/
#define IE_NAM 30075 /* Bad file name */
#define IE_UFI 30086 /* Unimplemented FILEINFO request*/
#define IE_BIL 30094 /* Bad ID length */
/* Errors for OPEN */
#define IE_NVR 31000 /* No VOC record */
#define IE_NPN 31001 /* No pathname in VOC record */
#define IE_VNF 31002 /* VOC file record not a File record*/
#define IE_TIMEDOUT 31115 /* Time out on receiving packets*/
/* Errors for CLEARFILE */
#define IE_CFNEA 31100 /* Clear file no exclusive access*/
/* Errors for client library, taken from ICI */
#define IE_LNA 33200 /* Select list not active */
#define IE_PAR1 33201 /* Bad parameter 1 */
#define IE_PAR2 33202 /* Bad parameter 2 */
#define IE_PAR3 33203 /* Bad parameter 3 */
#define IE_PAR4 33204 /* Bad parameter 4 */
#define IE_PAR5 33205 /* Bad parameter 5 */
#define IE_PAR6 33206 /* Bad parameter 6 */
#define IE_PAR7 33207 /* Bad parameter 7 */
#define IE_PAR8 33208 /* Bad parameter 8 */
#define IE_PAR9 33209 /* Bad parameter 9 */
#define IE_BSLN 33211 /* Bad select list number */
#define IE_BPID 33212 /* Bad partfile id */
#define IE_BAK 33213 /* Bad AK file */
#define IE_BADARGS 33214 /* Bad number of arguments to sub call*/
#define IE_SUBNEX 33215 /* Subroutine does not exist */
#define IE_ILLFUNC 33216 /* Illigal function in tranction */
/* Error numbers generated explicitly by the interCALL server: */
#define IE_BAD_COMMAND 39000 /* command not recognized by server*/
#define IE_NO_LOGOUT 39001 /* no way to perform a LOGOUT command*/
#define IE_BAD_LENGTH 39002 /* data.length not a valid number*/
#define IE_NO_VOC 39003 /* can't open the VOC file */
#define IE_CLIENT_RESET 39004 /* internal - client RESET received OK*/
#define IE_INVALID_SRC 39005 /* @SYSTEM.RETURN.CODE non-numeric after EXECUTE*/
#define IE_TOOLONG_SRC 39006 /* @SYSTEM.RETURN.CODE has more than 2 fields*/
#define IE_KEY_NOT_IMP 39007 /* interCALL server key not implemented*/
#define IE_WRITE_FAILURE 39008 /* WRITE failed and taken ELSE clause*/
#define IE_NO_WRITE 39010 /* Returned when write contine before write start*/
#define IE_NFBMV 39011 /* No fields for multi value delete select*/
#define IE_NMV 39012 /* Fields but no multi value for delete select*/
#define IE_EXECUTE_ERROR 39013 /* ic_buffer contains an error message*/
#define IE_EOO 39014 /* Error on opening file */
#define IE_FAE 39015 /* File already exists */
#define IE_REC_EXISTS 39016 /* Record alread exists on insert*/
#define IE_SNC 39017 /* Subroutine has not been cataloged*/
#define IE_ILLTYPE 39018 /* Illigal type for set hook call*/
/* Errors for the Client/Server interface */
#define IE_NODATA 39101 /* Host not responding */
#define IE_SYNC_TIMEOUT 39102 /* Synchroniser not received */
#define IE_RCV_TIMEOUT 39103 /* Timeout on receving packets */
#define IE_HOSTERROR 39104 /* Host length error on receive */
#define IE_NOT_READY 39105 /* Host does not give "ready" prompt*/
#define IE_NO_ACK 39106 /* Packet not acknowledged */
#define IE_NUM_TASKS 39107 /* Too many concurrent user tasks*/
#define IE_UDATA_LOCK 39108 /* Could not lock user data block*/
#define IE_LIBINUSE 39109 /* Library in use */
#define IE_DATA_LOSS 39110 /* Host got incorrect length from PC*/
#define IE_HOST_NNUM 39111 /* Host response non-numeric */
#define IE_HOST_DATA 39112 /* Host length error on receive */
#define IE_HOST_RESPONSE 39113 /* No data in host response */
#define IE_NO_HOST_NAME 39114 /* Host name missing from script file*/
#define IE_SOCKET_CLOSED 39115 /* Host has closed socket */
#define IE_BAD_HOST_NAME 39116 /* Failed to get address for this host*/
#define IE_FATAL 39117 /* Fatal error */
#define IE_BAD_ERROR 39118 /* Bad error from server i.e. error 0*/