OpenDNSSEC-enforcer
1.4.8.2
Main Page
Data Structures
Files
File List
Globals
enforcer
ksm
include
ksm
db_fields.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_DB_FIELDS_H
28
#define KSM_DB_FIELDS_H
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
34
/*+
35
* db_fields.h - KSM database Field Definitions
36
*
37
* Description:
38
* Gives the relative positions of fields with a table.
39
*
40
* Each constant is of the form
41
*
42
* DB_<table name>_<field name>
43
*
44
* Also defined are:
45
*
46
* DB_INVALID A value that is always an invalid field value
47
* DB_<table>_NFIELD Number of fields in the given table
48
-*/
49
50
/* Invalid field number */
51
52
#define DB_INVALID -1
53
54
/* Keydata_view fields */
55
56
#define DB_KEYDATA_FIELDS "id, state, generate, publish, ready, active, retire, dead, keytype, algorithm, location, zone_id, fixedDate, rfc5011, revoked"
57
#define DB_KEYDATA_ID 0
58
#define DB_KEYDATA_STATE 1
59
#define DB_KEYDATA_GENERATE 2
60
#define DB_KEYDATA_PUBLISH 3
61
#define DB_KEYDATA_READY 4
62
#define DB_KEYDATA_ACTIVE 5
63
#define DB_KEYDATA_RETIRE 6
64
#define DB_KEYDATA_DEAD 7
65
#define DB_KEYDATA_KEYTYPE 8
66
#define DB_KEYDATA_ALGORITHM 9
67
#define DB_KEYDATA_LOCATION 10
68
#define DB_KEYDATA_ZONE_ID 11
69
#define DB_KEYDATA_FIXED_DATE 12
70
#define DB_KEYDATA_RFC5011 13
71
#define DB_KEYDATA_REVOKE 14
72
73
#define DB_KEYDATA_NFIELD 15
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, in_type, out_type"
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
#define DB_ZONE_IN_TYPE 6
108
#define DB_ZONE_OUT_TYPE 7
109
110
/* policy select variables, including salt */
111
#define DB_POLICY_ID 0
112
#define DB_POLICY_NAME 1
113
#define DB_POLICY_DESCRIPTION 2
114
#define DB_POLICY_SALT 1
115
#define DB_POLICY_SALT_STAMP 2
116
117
118
/* when selecting count(*) from ... */
119
#define DB_COUNT 0
120
121
#ifdef __cplusplus
122
};
123
#endif
124
125
#endif
/* KSM_DB_FIELDS_H */
Generated by
1.8.9.1