sysevent_conf_mod.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2000-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYSEVENT_CONF_MOD_H
#define _SYSEVENT_CONF_MOD_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* syseventd_print debug levels for sysevent_conf_mod
*/
/*
* Directory where sysevent.conf files reside
*/
#define SYSEVENT_CONFIG_DIR "/etc/sysevent/config"
/*
* Lock file name to serialize registry updates
*/
#define LOCK_FILENAME "sysevent.lock"
/*
* sysevent.conf files list
*/
typedef struct conftab {
char *cf_conf_file; /* source conf file */
} conftab_t;
/*
* sysevent.conf table
*/
typedef struct syseventtab {
char *se_conf_file; /* source conf file */
int se_lineno; /* line number */
char *se_vendor; /* vendor */
char *se_publisher; /* publisher */
char *se_class; /* event class */
char *se_subclass; /* event subclass */
char *se_user; /* user */
char *se_reserved1; /* reserved1 */
char *se_reserved2; /* reserved2 */
char *se_path; /* event path */
char *se_args; /* optional args */
struct syseventtab *se_next;
typedef struct sysevent_hdr_info {
char *class;
char *subclass;
char *vendor;
char *publisher;
/*
* Structures for building arbitarily long strings and argument lists
*/
typedef struct str {
char *s_str;
int s_len;
int s_alloc;
int s_hint;
} str_t;
/*
* Queue of commands ready to be transported to syseventconfd
*/
typedef struct cmdqueue {
} cmdqueue_t;
/*
* syseventconfd state
*/
enum {
};
/*
* Prototypes
*/
static char *skip_spaces(char **cpp);
static char *next_field(char **cpp);
static void sc_strfree(char *s);
static void build_event_table(void);
static void free_event_table(void);
static int enter_lock(char *lock_file);
static char *se_attr_type_to_str(int se_attr_type);
static void start_syseventconfd(void);
static void abort_cmd_queue(void);
static void transport_queued_events(void);
#ifdef __cplusplus
}
#endif
#endif /* _SYSEVENT_CONF_MOD_H */