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 char *zedlet_dir; /* abs path to zedlet dir */
46 zed_strings_t *zedlets; /* names of enabled zedlets */
47 char *state_file; /* abs path to state file */
48 int state_fd; /* fd to state file */
49 libzfs_handle_t *zfs_hdl; /* handle to libzfs */
50 int zevent_fd; /* fd for access to zevents */
53 struct zed_conf *zed_conf_create(void);
55 void zed_conf_destroy(struct zed_conf *zcp);
57 void zed_conf_parse_opts(struct zed_conf *zcp, int argc, char **argv);
59 void zed_conf_parse_file(struct zed_conf *zcp);
61 int zed_conf_scan_dir(struct zed_conf *zcp);
63 int zed_conf_write_pid(struct zed_conf *zcp);
65 int zed_conf_open_state(struct zed_conf *zcp);
67 int zed_conf_read_state(struct zed_conf *zcp, uint64_t *eidp, int64_t etime[]);
69 int zed_conf_write_state(struct zed_conf *zcp, uint64_t eid, int64_t etime[]);
71 #endif /* !ZED_CONF_H */