1 /* Copyright (c) 2003-2005 MySQL AB
2    Use is subject to license terms
3 
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; version 2 of the License.
7 
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12 
13    You should have received a copy of the GNU General Public License
14    along with this program; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA */
16 
17 #ifndef BLOCK_NUMBERS_H
18 #define BLOCK_NUMBERS_H
19 
20 #include <kernel_types.h>
21 #include <RefConvert.hpp>
22 
23 /* 240 */
24 #define MIN_API_BLOCK_NO  0x8000
25 
26 /* 2047 */
27 #define API_PACKED     0x07ff
28 
29 /* 4002 */
30 #define API_CLUSTERMGR 0x0FA2
31 
32 #define BACKUP      0xF4
33 #define DBTC        0xF5
34 #define DBDIH       0xF6
35 #define DBLQH       0xF7
36 #define DBACC       0xF8
37 #define DBTUP       0xF9
38 #define DBDICT      0xFA
39 #define NDBCNTR     0xFB
40 #define CNTR        0xFB
41 #define QMGR        0xFC
42 #define NDBFS       0xFD
43 #define CMVMI       0xFE
44 #define TRIX        0xFF
45 #define DBUTIL     0x100
46 #define SUMA       0x101
47 #define DBTUX      0x102
48 #define TSMAN      0x103
49 #define LGMAN      0x104
50 #define PGMAN      0x105
51 #define RESTORE    0x106
52 
53 const BlockReference BACKUP_REF  = numberToRef(BACKUP, 0);
54 const BlockReference DBTC_REF    = numberToRef(DBTC, 0);
55 const BlockReference DBDIH_REF   = numberToRef(DBDIH, 0);
56 const BlockReference DBLQH_REF   = numberToRef(DBLQH, 0);
57 const BlockReference DBACC_REF   = numberToRef(DBACC, 0);
58 const BlockReference DBTUP_REF   = numberToRef(DBTUP, 0);
59 const BlockReference DBDICT_REF  = numberToRef(DBDICT, 0);
60 const BlockReference NDBCNTR_REF = numberToRef(NDBCNTR, 0);
61 const BlockReference QMGR_REF    = numberToRef(QMGR, 0);
62 const BlockReference NDBFS_REF   = numberToRef(NDBFS, 0);
63 const BlockReference CMVMI_REF   = numberToRef(CMVMI, 0);
64 const BlockReference TRIX_REF    = numberToRef(TRIX, 0);
65 const BlockReference DBUTIL_REF  = numberToRef(DBUTIL, 0);
66 const BlockReference SUMA_REF    = numberToRef(SUMA, 0);
67 const BlockReference DBTUX_REF   = numberToRef(DBTUX, 0);
68 const BlockReference TSMAN_REF   = numberToRef(TSMAN, 0);
69 const BlockReference LGMAN_REF   = numberToRef(LGMAN, 0);
70 const BlockReference PGMAN_REF   = numberToRef(PGMAN, 0);
71 const BlockReference RESTORE_REF = numberToRef(RESTORE, 0);
72 
73 const BlockNumber MIN_BLOCK_NO = BACKUP;
74 const BlockNumber MAX_BLOCK_NO = RESTORE;
75 const BlockNumber NO_OF_BLOCKS = (MAX_BLOCK_NO - MIN_BLOCK_NO + 1);
76 
77 /**
78  * Used for printing and stuff
79  */
80 struct BlockName {
81   const char* name;
82   BlockNumber number;
83 };
84 
85 extern const BlockName BlockNames[];
86 extern const BlockNumber NO_OF_BLOCK_NAMES;
87 
88 #endif
89