]> granicus.if.org Git - fcron/blob - dyncom.h
fixed bug preventing audit from being disabled -- thanks Thomas Deutschmann
[fcron] / dyncom.h
1 /*
2  * FCRON - periodic command scheduler 
3  *
4  *  Copyright 2000-2016 Thibault Godouet <fcron@free.fr>
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  * 
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  *  The GNU General Public License can also be found in the file
21  *  `LICENSE' that comes with the fcron source distribution.
22  */
23
24
25 /* This file describe the communication protocol between fcron and fcrondyn */
26
27 #ifndef __DYNCOM_H__
28 #define __DYNCOM_H__
29
30 #ifdef HAVE_SYS_TYPES_H
31 #include <sys/types.h>
32 #endif
33
34 #ifdef HAVE_SYS_SOCKET_H
35 #include <sys/socket.h>
36 #endif
37
38 #ifdef HAVE_SYS_UN_H
39 #include <sys/un.h>
40 #endif
41
42 /* string which means : "No more data to read" */
43 /* Warning : should be a short string, otherwise we may need more tests in talk_fcron()
44  * (because the string might be recv()ed in 2 pieces) */
45 #define END_STR "\0\0"
46
47 /* arg types */
48 #define USER 1
49 #define JOBID 2
50 #define TIME_AND_DATE 3
51 #define NICE_VALUE 4
52 #define SIGNAL 5
53 #define BOOLEAN 6
54
55 #define ALL (-1)
56 #define CUR_USER (-2)
57 #define ARG_REQUIRED (-3)
58
59 #ifdef SYSFCRONTAB
60 #define SYSFCRONTAB_UID (-100)
61 #endif
62
63 /* commands : if you change something here, please update fcrondyn.c's cmd_list
64  *            and fcron's socket.c . */
65
66 #define CMD_LIST_JOBS 101
67 #define CMD_LIST_LAVGQ 102
68 #define CMD_LIST_SERIALQ 103
69 #define CMD_LIST_EXEQ 104
70 #define CMD_DETAILS 105
71
72 #define CMD_RESCHEDULE 201
73
74 #define CMD_RUNNOW 301
75 #define CMD_RUN 302
76
77 #define CMD_SEND_SIGNAL 401
78 #define CMD_RENICE 402
79
80 #endif                          /* __DYNCOM_H__ */