00001 /* 00002 * $Id: ksmdef.h 731 2009-05-18 08:24:19Z sion $ 00003 * 00004 * Copyright (c) 2008-2009 Nominet UK. All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 1. Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 2. Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * 00015 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00016 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00017 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00018 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 00019 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00020 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00021 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00022 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00023 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00024 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 00025 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 * 00027 */ 00028 00029 #ifndef KSM_KSMDEF_H 00030 #define KSM_KSMDEF_H 00031 00032 /*+ 00033 * status.h - Define Status Codes 00034 * 00035 * Description: 00036 * Defines the various status codes that can be returned by the various 00037 * KSM routines. 00038 * 00039 * All status codes - with the exception of KSM_SUCCESS - are above 00040 * 65,536. Below this, status values are assumed to be error values 00041 * returned from the operating system. 00042 -*/ 00043 00044 #define KSM_SUCCESS 0 /* Successful completion */ 00045 00046 #define KSM_BASE 65536 /* Base of KSM status codes */ 00047 00048 #define KSM_INVOPTION (KSM_BASE + 0) /* ERROR: Invalid command option -%c */ 00049 #define KSM_UNRCOMMAND (KSM_BASE + 1) /* ERROR: Unrecognised command */ 00050 #define KSM_AMBCOMMAND (KSM_BASE + 2) /* ERROR: Ambiguous command */ 00051 #define KSM_NOTIMPL (KSM_BASE + 3) /* WARNING: Command not implemented yet */ 00052 #define KSM_INITFAIL (KSM_BASE + 4) /* ERROR: MySQL initialization failure */ 00053 #define KSM_CONNFAIL (KSM_BASE + 5) /* ERROR: Unable to connect to database: %s */ 00054 #define KSM_NOTCONN (KSM_BASE + 6) /* INFO: not connected to a database */ 00055 #define KSM_TOOMANYARG (KSM_BASE + 7) /* ERROR: too many command line arguments */ 00056 #define KSM_GRPCREFAIL (KSM_BASE + 8) /* ERROR: unable to create group %s - %s */ 00057 #define KSM_OBJECTID (KSM_BASE + 9) /* ERROR: unable to get ID of %s - %s */ 00058 #define KSM_EXTRADATA (KSM_BASE + 10) /* ERROR: extra data in result set */ 00059 #define KSM_NOGROUP (KSM_BASE + 11) /* ERROR: no groups specified */ 00060 #define KSM_GRPCREATE (KSM_BASE + 12) /* INFO: created group %s */ 00061 #define KSM_GRPDELETE (KSM_BASE + 13) /* INFO: created group %s */ 00062 #define KSM_COUNTFAIL (KSM_BASE + 14) /* ERROR: failed to perform count of objects in database - %s */ 00063 #define KSM_EXISTS (KSM_BASE + 15) /* ERROR: object with name '%s' already exists */ 00064 #define KSM_CREFAIL (KSM_BASE + 16) /* ERROR: failed to create '%s' */ 00065 #define KSM_NOTFOUND (KSM_BASE + 17) /* ERROR: unable to find object '%s' */ 00066 #define KSM_CHILDZONE (KSM_BASE + 18) /* ERROR: unable to delete group as child zones are attached to it */ 00067 #define KSM_INSFARG (KSM_BASE + 19) /* ERROR: insufficient command line arguments */ 00068 #define KSM_INVARG (KSM_BASE + 20) /* ERROR: invalid argument */ 00069 #define KSM_SQLFAIL (KSM_BASE + 21) /* ERROR: database operation failed - %s */ 00070 #define KSM_FLDMISMAT (KSM_BASE + 22) /* ERROR: program error - number of fields returned did not match number expected */ 00071 #define KSM_EXCESS (KSM_BASE + 23) /* WARNING: too much data in result set - excess ignored */ 00072 #define KSM_PERMANENT (KSM_BASE + 24) /* ERROR: it is not permitted to delete the permanent object %s */ 00073 #define KSM_CHILDREN (KSM_BASE + 25) /* ERROR: unable to delete %s because child objects are associated with it */ 00074 #define KSM_DELFAIL (KSM_BASE + 26) /* ERROR: unable to delete %s - %s */ 00075 #define KSM_INVNAME (KSM_BASE + 27) /* ERROR: object name is invalid */ 00076 #define KSM_NOTGROUP (KSM_BASE + 28) /* ERROR: %s is not a group */ 00077 #define KSM_NOTZONE (KSM_BASE + 29) /* ERROR: %s is not a zone */ 00078 #define KSM_NOTCONNE (KSM_BASE + 30) /* ERROR: not connected to the database */ 00079 #define KSM_STMTALLOC (KSM_BASE + 31) /* ERROR: unable to allocate space for prepared statement structure */ 00080 #define KSM_STMTPREP (KSM_BASE + 32) /* ERROR: unable to create SQL statement - %s */ 00081 #define KSM_STMTBIND (KSM_BASE + 33) /* ERROR: unable to bind parameters to statement - %s */ 00082 #define KSM_STMTEXEC (KSM_BASE + 34) /* ERROR: unable to execute SQL statement - %s */ 00083 #define KSM_UNRCONCOD (KSM_BASE + 35) /* WARNING: unrecognised condition code %d: code ignored */ 00084 #define KSM_PAREXIST (KSM_BASE + 36) /* ERROR: parameter '%' already exists attached to '%s' */ 00085 #define KSM_NOPARWTHID (KSM_BASE + 37) /* ERROR: cannot find parameter with ID of %d */ 00086 #define KSM_NOPARPNAME (KSM_BASE + 38) /* WARNING: no parameter named %s found on parent %s, default value used */ 00087 #define KSM_NOPARPID (KSM_BASE + 39) /* WARNING: no parameter named %s found on parent with ID %d, default value used */ 00088 #define KSM_UNRKEYSTA (KSM_BASE + 40) /* WARNING: key ID %d is in unrecognised state %d */ 00089 #define KSM_BUFFEROVF (KSM_BASE + 41) /* ERROR: internal error, buffer overflow in %s */ 00090 #define KSM_REQKEYTYPE (KSM_BASE + 42) /* INFO: requesting issue of %s signing keys */ 00091 #define KSM_KEYCHSTATE (KSM_BASE + 43) /* INFO: moving %d key(s) from '%s' state to '%s' state */ 00092 #define KSM_RETIRECNT (KSM_BASE + 44) /* INFO: %d 'active' keys will be retiring in the immediate future */ 00093 #define KSM_AVAILCNT (KSM_BASE + 45) /* INFO: %d keys current in 'publish', 'ready' and 'active' states */ 00094 #define KSM_KEYCNTSUMM (KSM_BASE + 46) /* INFO: %d keys required, therefore %d new keys need to be put in 'publish' state */ 00095 #define KSM_INSFGENKEY (KSM_BASE + 47) /* ERROR: only %d %ss available in 'generate' state - request abandoned */ 00096 #define KSM_GENERATECNT (KSM_BASE + 48) /* INFO: %d %ss available in 'generate' state */ 00097 #define KSM_REMAINACT (KSM_BASE + 49) /* INFO: %d %ss remaining in 'active' state */ 00098 #define KSM_READYCNT (KSM_BASE + 50) /* INFO: %d %ss in the 'ready' state */ 00099 #define KSM_NOREADYKEY (KSM_BASE + 51) /* WARNING: cannot continue with key rollover as there are no keys in the 'ready' state */ 00100 #define KSM_ACTKEYRET (KSM_BASE + 52) /* INFO: %d keys in 'active' state will have their expected retire date modified */ 00101 #define KSM_NOSUCHPAR (KSM_BASE + 53) /* ERROR: no such parameter with name %s */ 00102 00103 #endif /* KSM_KSMDEF_H */