OpenDNSSEC-enforcer
1.3.9
Main Page
Data Structures
Files
File List
Globals
enforcer
ksm
include
ksm
db_fields.h
Go to the documentation of this file.
1
/*
2
* $Id: db_fields.h 3838 2010-08-31 11:35:52Z sion $
3
*
4
* Copyright (c) 2008-2009 Nominet UK. All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*
27
*/
28
29
#ifndef KSM_DB_FIELDS_H
30
#define KSM_DB_FIELDS_H
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
/*+
37
* db_fields.h - KSM database Field Definitions
38
*
39
* Description:
40
* Gives the relative positions of fields with a table.
41
*
42
* Each constant is of the form
43
*
44
* DB_<table name>_<field name>
45
*
46
* Also defined are:
47
*
48
* DB_INVALID A value that is always an invalid field value
49
* DB_<table>_NFIELD Number of fields in the given table
50
-*/
51
52
/* Invalid field number */
53
54
#define DB_INVALID -1
55
56
/* Keydata_view fields */
57
58
#define DB_KEYDATA_FIELDS "id, state, generate, publish, ready, active, retire, dead, keytype, algorithm, location, zone_id, fixedDate"
59
#define DB_KEYDATA_ID 0
60
#define DB_KEYDATA_STATE 1
61
#define DB_KEYDATA_GENERATE 2
62
#define DB_KEYDATA_PUBLISH 3
63
#define DB_KEYDATA_READY 4
64
#define DB_KEYDATA_ACTIVE 5
65
#define DB_KEYDATA_RETIRE 6
66
#define DB_KEYDATA_DEAD 7
67
#define DB_KEYDATA_KEYTYPE 8
68
#define DB_KEYDATA_ALGORITHM 9
69
#define DB_KEYDATA_LOCATION 10
70
#define DB_KEYDATA_ZONE_ID 11
71
#define DB_KEYDATA_FIXED_DATE 12
72
73
#define DB_KEYDATA_NFIELD 13
74
75
/* Parameter_view (and list) fields */
76
77
#define DB_PARAMETER_VIEW_FIELDS "name, category, parameter_id, value, policy_id"
78
#define DB_PARAMETER_LIST_FIELDS "name, category, parameter_id"
79
#define DB_PARAMETER_NAME 0
80
#define DB_PARAMETER_CATEGORY 1
81
#define DB_PARAMETER_ID 2
82
#define DB_PARAMETER_VALUE 3
83
#define DB_PARAMETER_POLICY_ID 4
84
85
#define DB_PARAMETER_VIEW_NFIELD 5
86
#define DB_PARAMETER_LIST_NFIELD 3
87
88
#define DB_POLICY_PARAMETER_NAME 0
89
#define DB_POLICY_PARAMETER_CATEGORY 1
90
#define DB_POLICY_PARAMETER_VALUE 2
91
92
#define DB_SECURITY_MODULE_TABLE "securitymodules"
93
#define DB_SECURITY_MODULE_FIELDS "id, name, capacity, requirebackup"
94
#define DB_SECURITY_MODULE_ID 0
95
#define DB_SECURITY_MODULE_NAME 1
96
#define DB_SECURITY_MODULE_CAPACITY 2
97
#define DB_SECURITY_MODULE_REQUIREBACKUP 3
98
99
#define DB_ZONE_TABLE "zones"
100
#define DB_ZONE_FIELDS "id, name, policy_id, signconf, input, output"
101
#define DB_ZONE_ID 0
102
#define DB_ZONE_NAME 1
103
#define DB_ZONE_POLICY_ID 2
104
#define DB_ZONE_SIGNCONF 3
105
#define DB_ZONE_INPUT 4
106
#define DB_ZONE_OUTPUT 5
107
108
/* policy select variables, including salt */
109
#define DB_POLICY_ID 0
110
#define DB_POLICY_NAME 1
111
#define DB_POLICY_DESCRIPTION 2
112
#define DB_POLICY_AUDIT 3
113
#define DB_POLICY_SALT 1
114
#define DB_POLICY_SALT_STAMP 2
115
116
117
/* when selecting count(*) from ... */
118
#define DB_COUNT 0
119
120
#ifdef __cplusplus
121
};
122
#endif
123
124
#endif
/* KSM_DB_FIELDS_H */
Generated on Thu Mar 20 2014 15:30:04 for OpenDNSSEC-enforcer by
1.8.1.2