OpenDNSSEC-enforcer  1.4.7
ksmdef.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2009 Nominet UK. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
19  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
21  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
23  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  */
26 
27 #ifndef KSM_KSMDEF_H
28 #define KSM_KSMDEF_H
29 
30 /*+
31  * status.h - Define Status Codes
32  *
33  * Description:
34  * Defines the various status codes that can be returned by the various
35  * KSM routines.
36  *
37  * All status codes - with the exception of KSM_SUCCESS - are above
38  * 65,536. Below this, status values are assumed to be error values
39  * returned from the operating system.
40 -*/
41 
42 #define KSM_SUCCESS 0 /* Successful completion */
43 
44 #define KSM_BASE 65536 /* Base of KSM status codes */
45 
46 #define KSM_INVOPTION (KSM_BASE + 0) /* ERROR: Invalid command option -%c */
47 #define KSM_UNRCOMMAND (KSM_BASE + 1) /* ERROR: Unrecognised command */
48 #define KSM_AMBCOMMAND (KSM_BASE + 2) /* ERROR: Ambiguous command */
49 #define KSM_NOTIMPL (KSM_BASE + 3) /* WARNING: Command not implemented yet */
50 #define KSM_INITFAIL (KSM_BASE + 4) /* ERROR: MySQL initialization failure */
51 #define KSM_CONNFAIL (KSM_BASE + 5) /* ERROR: Unable to connect to database: %s */
52 #define KSM_NOTCONN (KSM_BASE + 6) /* INFO: not connected to a database */
53 #define KSM_TOOMANYARG (KSM_BASE + 7) /* ERROR: too many command line arguments */
54 #define KSM_GRPCREFAIL (KSM_BASE + 8) /* ERROR: unable to create group %s - %s */
55 #define KSM_OBJECTID (KSM_BASE + 9) /* ERROR: unable to get ID of %s - %s */
56 #define KSM_EXTRADATA (KSM_BASE + 10) /* ERROR: extra data in result set */
57 #define KSM_NOGROUP (KSM_BASE + 11) /* ERROR: no groups specified */
58 #define KSM_GRPCREATE (KSM_BASE + 12) /* INFO: created group %s */
59 #define KSM_GRPDELETE (KSM_BASE + 13) /* INFO: created group %s */
60 #define KSM_COUNTFAIL (KSM_BASE + 14) /* ERROR: failed to perform count of objects in database - %s */
61 #define KSM_EXISTS (KSM_BASE + 15) /* ERROR: object with name '%s' already exists */
62 #define KSM_CREFAIL (KSM_BASE + 16) /* ERROR: failed to create '%s' */
63 #define KSM_NOTFOUND (KSM_BASE + 17) /* ERROR: unable to find object '%s' */
64 #define KSM_CHILDZONE (KSM_BASE + 18) /* ERROR: unable to delete group as child zones are attached to it */
65 #define KSM_INSFARG (KSM_BASE + 19) /* ERROR: insufficient command line arguments */
66 #define KSM_INVARG (KSM_BASE + 20) /* ERROR: invalid argument */
67 #define KSM_SQLFAIL (KSM_BASE + 21) /* ERROR: database operation failed - %s */
68 #define KSM_FLDMISMAT (KSM_BASE + 22) /* ERROR: program error - number of fields returned did not match number expected */
69 #define KSM_EXCESS (KSM_BASE + 23) /* WARNING: too much data in result set - excess ignored */
70 #define KSM_PERMANENT (KSM_BASE + 24) /* ERROR: it is not permitted to delete the permanent object %s */
71 #define KSM_CHILDREN (KSM_BASE + 25) /* ERROR: unable to delete %s because child objects are associated with it */
72 #define KSM_DELFAIL (KSM_BASE + 26) /* ERROR: unable to delete %s - %s */
73 #define KSM_INVNAME (KSM_BASE + 27) /* ERROR: object name is invalid */
74 #define KSM_NOTGROUP (KSM_BASE + 28) /* ERROR: %s is not a group */
75 #define KSM_NOTZONE (KSM_BASE + 29) /* ERROR: %s is not a zone */
76 #define KSM_NOTCONNE (KSM_BASE + 30) /* ERROR: not connected to the database */
77 #define KSM_STMTALLOC (KSM_BASE + 31) /* ERROR: unable to allocate space for prepared statement structure */
78 #define KSM_STMTPREP (KSM_BASE + 32) /* ERROR: unable to create SQL statement - %s */
79 #define KSM_STMTBIND (KSM_BASE + 33) /* ERROR: unable to bind parameters to statement - %s */
80 #define KSM_STMTEXEC (KSM_BASE + 34) /* ERROR: unable to execute SQL statement - %s */
81 #define KSM_UNRCONCOD (KSM_BASE + 35) /* WARNING: unrecognised condition code %d: code ignored */
82 #define KSM_PAREXIST (KSM_BASE + 36) /* ERROR: parameter '%' already exists attached to '%s' */
83 #define KSM_NOPARWTHID (KSM_BASE + 37) /* ERROR: cannot find parameter with ID of %d */
84 #define KSM_NOPARPNAME (KSM_BASE + 38) /* WARNING: no parameter named %s found on parent %s, default value used */
85 #define KSM_NOPARPID (KSM_BASE + 39) /* WARNING: no parameter named %s found on parent with ID %d, default value used */
86 #define KSM_UNRKEYSTA (KSM_BASE + 40) /* WARNING: key ID %d is in unrecognised state %d */
87 #define KSM_BUFFEROVF (KSM_BASE + 41) /* ERROR: internal error, buffer overflow in %s */
88 #define KSM_REQKEYTYPE (KSM_BASE + 42) /* INFO: requesting issue of %s signing keys */
89 #define KSM_KEYCHSTATE (KSM_BASE + 43) /* INFO: moving %d key(s) from '%s' state to '%s' state */
90 #define KSM_RETIRECNT (KSM_BASE + 44) /* INFO: %d 'active' keys will be retiring in the immediate future */
91 #define KSM_AVAILCNT (KSM_BASE + 45) /* INFO: %d keys current in 'publish', 'ready' and 'active' states */
92 #define KSM_KEYCNTSUMM (KSM_BASE + 46) /* INFO: %d keys required, therefore %d new keys need to be put in 'publish' state */
93 #define KSM_INSFGENKEY (KSM_BASE + 47) /* ERROR: only %d %ss available in 'generate' state - request abandoned */
94 #define KSM_GENERATECNT (KSM_BASE + 48) /* INFO: %d %ss available in 'generate' state */
95 #define KSM_REMAINACT (KSM_BASE + 49) /* INFO: %d %ss remaining in 'active' state */
96 #define KSM_READYCNT (KSM_BASE + 50) /* INFO: %d %ss in the 'ready' state */
97 #define KSM_NOREADYKEY (KSM_BASE + 51) /* WARNING: cannot continue with key rollover as there are no keys in the 'ready' state */
98 #define KSM_ACTKEYRET (KSM_BASE + 52) /* INFO: %d keys in 'active' state will have their expected retire date modified */
99 #define KSM_NOSUCHPAR (KSM_BASE + 53) /* ERROR: no such parameter with name %s */
100 
101 #endif /* KSM_KSMDEF_H */