2 * Copyright 2008, 2009, 2011 Red Hat Inc., Durham, North Carolina.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
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.
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
20 * Steve Grubb <sgrubb@redhat.com>
24 #ifndef REMOTE_CONFIG_H
25 #define REMOTE_CONFIG_H
27 typedef enum { M_IMMEDIATE, M_STORE_AND_FORWARD } rmode_t;
28 typedef enum { T_TCP, T_SSL, T_GSSAPI, T_LABELED } transport_t;
29 typedef enum { F_ASCII, F_MANAGED } format_t;
30 typedef enum { FA_IGNORE, FA_SYSLOG, FA_EXEC, FA_RECONNECT, FA_SUSPEND,
31 FA_SINGLE, FA_HALT, FA_STOP } failure_action_t;
32 typedef enum { OA_IGNORE, OA_SYSLOG, OA_SUSPEND, OA_SINGLE,
33 OA_HALT } overflow_action_t;
35 typedef struct remote_conf
37 const char *remote_server;
39 unsigned int local_port;
40 transport_t transport;
42 const char *queue_file;
43 unsigned int queue_depth;
45 unsigned int network_retry_time;
46 unsigned int max_tries_per_record;
47 unsigned int max_time_per_record;
48 unsigned int heartbeat_timeout;
50 const char *krb5_principal;
51 const char *krb5_client_name;
52 const char *krb5_key_file;
54 failure_action_t network_failure_action;
55 const char *network_failure_exe;
56 failure_action_t disk_low_action;
57 const char *disk_low_exe;
58 failure_action_t disk_full_action;
59 const char *disk_full_exe;
60 failure_action_t disk_error_action;
61 const char *disk_error_exe;
62 failure_action_t remote_ending_action;
63 const char *remote_ending_exe;
64 failure_action_t generic_error_action;
65 const char *generic_error_exe;
66 failure_action_t generic_warning_action;
67 const char *generic_warning_exe;
68 failure_action_t queue_error_action;
69 const char *queue_error_exe;
70 overflow_action_t overflow_action;
73 void clear_config(remote_conf_t *config);
74 int load_config(remote_conf_t *config, const char *file);
75 void free_config(remote_conf_t *config);