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