1 /* 2 Copyright 2021 Northern.tech AS 3 4 This file is part of CFEngine 3 - written and maintained by Northern.tech AS. 5 6 This program is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by the 8 Free Software Foundation; version 3. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 18 19 To the extent this program is licensed as part of the Enterprise 20 versions of CFEngine, the applicable Commercial Open Source License 21 (COSL) may apply to this file if you as a licensee so wish it. See 22 included file COSL.txt. 23 */ 24 25 #ifndef CFENGINE_CF3_EXTERN_H 26 #define CFENGINE_CF3_EXTERN_H 27 28 29 #include <cfnet.h> /* CF_MAX_IP_LEN */ 30 #include <cf3.defs.h> /* CF_MAXVARSIZE,CF_OBSERVABLES */ 31 32 33 /* See variables in cf3globals.c and syntax.c */ 34 35 extern pid_t ALARM_PID; 36 extern RSA *PRIVKEY, *PUBKEY; 37 38 extern char BINDINTERFACE[CF_MAXVARSIZE]; 39 extern time_t CONNTIMEOUT; 40 41 extern time_t CFSTARTTIME; 42 43 extern struct utsname VSYSNAME; 44 extern char VIPADDRESS[CF_MAX_IP_LEN]; 45 extern char VPREFIX[1024]; 46 47 extern char VFQNAME[CF_MAXVARSIZE]; 48 extern char VDOMAIN[CF_MAXVARSIZE / 2]; 49 extern char VUQNAME[CF_MAXVARSIZE / 2]; 50 51 typedef enum EvalMode { 52 EVAL_MODE_NORMAL = 0, /* needs to be 'false' to work for DONTDO below */ 53 EVAL_MODE_DRY_RUN = 1, 54 EVAL_MODE_SIMULATE_DIFF = 2, 55 EVAL_MODE_SIMULATE_MANIFEST = 3, 56 EVAL_MODE_SIMULATE_MANIFEST_FULL = 4, 57 } EvalMode; 58 59 extern EvalMode EVAL_MODE; 60 61 /* This is only for backwards compatibility with code that uses 62 * 'if (!DONTDO)'. */ 63 #define DONTDO ((bool) EVAL_MODE) 64 65 extern bool MINUSF; 66 67 extern int EDITFILESIZE; 68 extern int VIFELAPSED; 69 extern int VEXPIREAFTER; 70 71 extern const char *const OBSERVABLES[CF_OBSERVABLES][2]; 72 73 extern bool FIPS_MODE; 74 extern HashMethod CF_DEFAULT_DIGEST; 75 extern int CF_DEFAULT_DIGEST_LEN; 76 77 extern int CF_PERSISTENCE; 78 79 extern const char *const CF_AGENTTYPES[]; 80 81 extern int CFA_MAXTHREADS; 82 extern AgentType THIS_AGENT_TYPE; 83 extern long LASTSEENEXPIREAFTER; 84 extern const char *DEFAULT_COPYTYPE; 85 86 extern const char *const DAY_TEXT[]; 87 extern const char *const MONTH_TEXT[]; 88 extern const char *const SHIFT_TEXT[]; 89 90 #endif 91