/*
* 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
* or http://www.opensolaris.org/os/licensing.
* 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
*/
/*LINTLIBRARY*/
/*PROTOLIB1*/
/*
* Copyright 1999-2000, 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* usr/src/lib/librcm/llib-ldevinfo
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "librcm.h"
#include "librcm_event.h"
/* librcm interfaces */
int rcm_get_handle(char *, uint_t, void *, rcm_handle_t **);
int rcm_free_handle(rcm_handle_t *);
int rcm_get_info(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_get_rsrcstate(rcm_handle_t *, char *, int *);
void rcm_free_info(rcm_info_t *);
int rcm_append_info(rcm_info_t **, rcm_info_t *);
rcm_info_tuple_t *rcm_info_next(rcm_info_t *, rcm_info_tuple_t *);
const char *rcm_info_rsrc(rcm_info_tuple_t *);
const char *rcm_info_info(rcm_info_tuple_t *);
const char *rcm_info_modname(rcm_info_tuple_t *);
const char *rcm_info_error(rcm_info_tuple_t *);
pid_t rcm_info_pid(rcm_info_tuple_t *);
int rcm_info_state(rcm_info_tuple_t *);
int rcm_info_seqnum(rcm_info_tuple_t *);
nvlist_t *rcm_info_properties(rcm_info_tuple_t *);
int rcm_request_offline(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_request_offline_list(rcm_handle_t *, char **, uint_t, rcm_info_t **);
int rcm_notify_online(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_notify_online_list(rcm_handle_t *, char **, uint_t, rcm_info_t **);
int rcm_notify_remove(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_notify_remove_list(rcm_handle_t *, char **, uint_t, rcm_info_t **);
int rcm_request_suspend(rcm_handle_t *, char *, uint_t, timespec_t *,
rcm_info_t **);
int rcm_request_suspend_list(rcm_handle_t *, char **, uint_t, timespec_t *,
rcm_info_t **);
int rcm_notify_resume(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_notify_resume_list(rcm_handle_t *, char **, uint_t, rcm_info_t **);
int rcm_notify_event(rcm_handle_t *, char *, uint_t, nvlist_t *, rcm_info_t **);
int rcm_register_event(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_unregister_event(rcm_handle_t *, char *, uint_t);
int rcm_register_capacity(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_unregister_capacity(rcm_handle_t *, char *, uint_t);
int rcm_register_interest(rcm_handle_t *, char *, uint_t, rcm_info_t **);
int rcm_unregister_interest(rcm_handle_t *, char *, uint_t);
int rcm_exec_cmd(char *);
char *rcm_module_dir(uint_t);
void *rcm_module_open(char *);
void rcm_module_close(void *);
const char *rcm_get_client_name(rcm_handle_t *);
char *rcm_script_dir(uint_t);
char *rcm_dir(uint_t, int *);
char *rcm_get_script_dir(char *);
int rcm_is_script(char *);
/* event related interfaces */
int get_event_service(char *, void *, size_t, void **, size_t *);
int create_event_service(char *, void (*)(void **, size_t *));
int revoke_event_service(int);