4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license from the top-level
9 * OPENSOLARIS.LICENSE or <http://opensource.org/licenses/CDDL-1.0>.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each file
14 * and include the License file from the top-level OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
24 * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
32 #include "zed_strings.h"
35 unsigned do_force:1; /* true if force enabled */
36 unsigned do_foreground:1; /* true if run in foreground */
37 unsigned do_memlock:1; /* true if locking memory */
38 unsigned do_verbose:1; /* true if verbosity enabled */
39 unsigned do_zero:1; /* true if zeroing state */
40 int syslog_facility; /* syslog facility value */
41 int min_events; /* RESERVED FOR FUTURE USE */
42 int max_events; /* RESERVED FOR FUTURE USE */
43 char *conf_file; /* abs path to config file */
44 char *pid_file; /* abs path to pid file */
45 int pid_fd; /* fd to pid file for lock */
46 char *zedlet_dir; /* abs path to zedlet dir */
47 zed_strings_t *zedlets; /* names of enabled zedlets */
48 char *state_file; /* abs path to state file */
49 int state_fd; /* fd to state file */
50 libzfs_handle_t *zfs_hdl; /* handle to libzfs */
51 int zevent_fd; /* fd for access to zevents */
54 struct zed_conf *zed_conf_create(void);
56 void zed_conf_destroy(struct zed_conf *zcp);
58 void zed_conf_parse_opts(struct zed_conf *zcp, int argc, char **argv);
60 void zed_conf_parse_file(struct zed_conf *zcp);
62 int zed_conf_scan_dir(struct zed_conf *zcp);
64 int zed_conf_write_pid(struct zed_conf *zcp);
66 int zed_conf_open_state(struct zed_conf *zcp);
68 int zed_conf_read_state(struct zed_conf *zcp, uint64_t *eidp, int64_t etime[]);
70 int zed_conf_write_state(struct zed_conf *zcp, uint64_t eid, int64_t etime[]);
72 #endif /* !ZED_CONF_H */