libsysevent_impl.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 2002-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBSYSEVENT_IMPL_H
#define _LIBSYSEVENT_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* libsysevent implementation-specific structures
*/
/* sysevent publisher/subscriber handle and related data structures */
#define CHAN_PATH "/var/run/sysevent_channels"
#define REG_DOOR "reg_door"
/* Subscription size values */
#define MAX_SUBSCRIPTION_SZ 1024
/* Sysevent Channel Handle */
typedef struct sysevent_impl_handle {
int sh_bound; /* Channel bind status */
int sh_door_desc; /* Service door descrip */
char *sh_door_name; /* Service door */
char *sh_channel_name; /* Event Channel name */
char *sh_channel_path; /* Full path to Event Chan */
void *sh_priv_data; /* Pub/Sub private data */
/* Sysevent queue for subscriber delivery */
typedef struct sysevent_queue {
struct sysevent_queue *sq_next;
/*
* Subscriber private data stored in the sysevent channel handle
*/
typedef struct subscriber_priv {
char *sp_door_name; /* Publisher reg door */
/* Subscriber information stored on the publisher side */
typedef struct subscriber_data {
int sd_flag; /* flag */
char *sd_door_name; /* Client door name */
/* Publisher private data stored in the sysevent channel handle */
typedef struct publisher_priv {
/* Subscriber flag values */
/* Sysevent handle access */
/*
* GPEC Interface definitions
*/
typedef struct evchan_subscriber evchan_subscr_t;
typedef struct evchan_sub_head {
/* Event channel handle */
typedef struct evchan_impl_handle {
int ev_fd; /* descriptor for sev driver */
/* Evchan handle access */
/*
* Subscriber private data
*/
struct evchan_subscriber {
int evsub_door_desc; /* Service door descriptor */
char *evsub_sid; /* identifier of subscriber */
void *evsub_cookie; /* subscriber cookie */
};
/* Access to subscriber data */
/* Characters for channel name syntax */
(c) == '-' || (c) == '_')
#ifdef __cplusplus
}
#endif
#endif /* _LIBSYSEVENT_IMPL_H */