tbdefs.h 2.88 KB
Newer Older
Leigh B. Stoller's avatar
Leigh B. Stoller committed
1
2
/*
 * EMULAB-COPYRIGHT
3
 * Copyright (c) 2000-2003 University of Utah and the Flux Group.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
4
5
6
 * All rights reserved.
 */

7
8
9
/*
 * Various constants that are reflected in the DB!
 */
10
11
12
#define	TBDB_FLEN_NODEID	(12 + 1)
#define	TBDB_FLEN_VNAME		(32 + 1)
#define	TBDB_FLEN_EID		(32 + 1)
13
#define	TBDB_FLEN_UID		(8  + 1)
14
15
16
17
#define	TBDB_FLEN_PID		(12 + 1)
#define	TBDB_FLEN_GID		(16 + 1)
#define	TBDB_FLEN_NODECLASS	(10 + 1)
#define	TBDB_FLEN_NODETYPE	(30 + 1)
18
#define	TBDB_FLEN_IP		(16 + 1)
19
20
21
#define TBDB_FLEN_EVOBJTYPE	128
#define TBDB_FLEN_EVOBJNAME	128
#define TBDB_FLEN_EVEVENTTYPE	128
22
#define TBDB_FLEN_PRIVKEY	64
23
24

/*
25
26
27
 * Event system stuff.
 *
 * If you add to these two lists, make sure you add to the arrays in tbdefs.c
28
29
 */
#define TBDB_OBJECTTYPE_TESTBED	"TBCONTROL"
Mac Newbold's avatar
Mac Newbold committed
30
31
#define TBDB_OBJECTTYPE_STATE	"TBNODESTATE"
#define TBDB_OBJECTTYPE_OPMODE	"TBNODEOPMODE"
32
33
#define TBDB_OBJECTTYPE_LINK	"LINK"
#define TBDB_OBJECTTYPE_TRAFGEN	"TRAFGEN"
34
#define TBDB_OBJECTTYPE_TIME	"TIME"
35
#define TBDB_OBJECTTYPE_PROGRAM	"PROGRAM"
Mike Hibler's avatar
Mike Hibler committed
36
#define TBDB_OBJECTTYPE_FRISBEE	"FRISBEE"
37
#define TBDB_OBJECTTYPE_SIMULATOR "SIMULATOR"
38
#define TBDB_OBJECTTYPE_LINKTEST "LINKTEST"
39

40
41
#define TBDB_EVENTTYPE_START	"START"
#define TBDB_EVENTTYPE_STOP	"STOP"
42
#define TBDB_EVENTTYPE_KILL	"KILL"
43
44
45
46
47
#define TBDB_EVENTTYPE_ISUP	"ISUP"
#define TBDB_EVENTTYPE_REBOOT	"REBOOT"
#define TBDB_EVENTTYPE_UP	"UP"
#define TBDB_EVENTTYPE_DOWN	"DOWN"
#define TBDB_EVENTTYPE_MODIFY	"MODIFY"
48
#define TBDB_EVENTTYPE_SET	"SET"
49
#define TBDB_EVENTTYPE_RESET	"RESET"
50
51
#define TBDB_EVENTTYPE_HALT	"HALT"
#define TBDB_EVENTTYPE_SWAPOUT	"SWAPOUT"
52

Mac Newbold's avatar
Mac Newbold committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#define TBDB_NODESTATE_ISUP       "ISUP"
#define TBDB_NODESTATE_REBOOTED   "REBOOTED"
#define TBDB_NODESTATE_REBOOTING  "REBOOTING"
#define TBDB_NODESTATE_SHUTDOWN   "SHUTDOWN"
#define TBDB_NODESTATE_BOOTING    "BOOTING"
#define TBDB_NODESTATE_TBSETUP    "TBSETUP"
#define TBDB_NODESTATE_RELOADSETUP "RELOADSETUP"
#define TBDB_NODESTATE_RELOADING  "RELOADING"
#define TBDB_NODESTATE_RELOADDONE "RELOADDONE"
#define TBDB_NODESTATE_UNKNOWN    "UNKNOWN"

#define TBDB_NODEOPMODE_NORMAL      "NORMAL"
#define TBDB_NODEOPMODE_DELAYING    "DELAYING"
#define TBDB_NODEOPMODE_UNKNOWNOS   "UNKNOWNOS"
#define TBDB_NODEOPMODE_RELOADING   "RELOADING"
#define TBDB_NODEOPMODE_NORMALv1    "NORMALv1" 
#define TBDB_NODEOPMODE_MINIMAL     "MINIMAL" 
#define TBDB_NODEOPMODE_RELOAD      "RELOAD" 
#define TBDB_NODEOPMODE_DELAY       "DELAY" 
#define TBDB_NODEOPMODE_BOOTWHAT    "_BOOTWHAT_"
#define TBDB_NODEOPMODE_UNKNOWN     "UNKNOWN"

#define TBDB_TBCONTROL_RESET        "RESET"
#define TBDB_TBCONTROL_RELOADDONE   "RELOADDONE"
#define TBDB_TBCONTROL_TIMEOUT      "TIMEOUT"

79
80
81
82
#define TBDB_IFACEROLE_CONTROL		"ctrl"
#define TBDB_IFACEROLE_EXPERIMENT	"expt"
#define TBDB_IFACEROLE_JAIL		"jail"
#define TBDB_IFACEROLE_FAKE		"fake"
Leigh B. Stoller's avatar
Leigh B. Stoller committed
83
#define TBDB_IFACEROLE_GW		"gw"
84
85
#define TBDB_IFACEROLE_OTHER		"other"

86
87
88
89
90
/*
 * Protos.
 */
int	tbdb_validobjecttype(char *foo);
int	tbdb_valideventtype(char *foo);