1*7c478bd9Sstevel@tonic-gate/* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate/*LINTLIBRARY*/ 23*7c478bd9Sstevel@tonic-gate/*PROTOLIB1*/ 24*7c478bd9Sstevel@tonic-gate/* 25*7c478bd9Sstevel@tonic-gate * Copyright 1999-2000, 2003 Sun Microsystems, Inc. All rights reserved. 26*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 27*7c478bd9Sstevel@tonic-gate * 28*7c478bd9Sstevel@tonic-gate * usr/src/lib/librcm/llib-ldevinfo 29*7c478bd9Sstevel@tonic-gate */ 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 32*7c478bd9Sstevel@tonic-gate 33*7c478bd9Sstevel@tonic-gate#include "librcm.h" 34*7c478bd9Sstevel@tonic-gate#include "librcm_event.h" 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate/* librcm interfaces */ 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gateint rcm_get_handle(char *, uint_t, void *, rcm_handle_t **); 39*7c478bd9Sstevel@tonic-gateint rcm_free_handle(rcm_handle_t *); 40*7c478bd9Sstevel@tonic-gateint rcm_get_info(rcm_handle_t *, char *, uint_t, rcm_info_t **); 41*7c478bd9Sstevel@tonic-gateint rcm_get_rsrcstate(rcm_handle_t *, char *, int *); 42*7c478bd9Sstevel@tonic-gatevoid rcm_free_info(rcm_info_t *); 43*7c478bd9Sstevel@tonic-gateint rcm_append_info(rcm_info_t **, rcm_info_t *); 44*7c478bd9Sstevel@tonic-gatercm_info_tuple_t *rcm_info_next(rcm_info_t *, rcm_info_tuple_t *); 45*7c478bd9Sstevel@tonic-gateconst char *rcm_info_rsrc(rcm_info_tuple_t *); 46*7c478bd9Sstevel@tonic-gateconst char *rcm_info_info(rcm_info_tuple_t *); 47*7c478bd9Sstevel@tonic-gateconst char *rcm_info_modname(rcm_info_tuple_t *); 48*7c478bd9Sstevel@tonic-gateconst char *rcm_info_error(rcm_info_tuple_t *); 49*7c478bd9Sstevel@tonic-gatepid_t rcm_info_pid(rcm_info_tuple_t *); 50*7c478bd9Sstevel@tonic-gateint rcm_info_state(rcm_info_tuple_t *); 51*7c478bd9Sstevel@tonic-gateint rcm_info_seqnum(rcm_info_tuple_t *); 52*7c478bd9Sstevel@tonic-gatenvlist_t *rcm_info_properties(rcm_info_tuple_t *); 53*7c478bd9Sstevel@tonic-gateint rcm_request_offline(rcm_handle_t *, char *, uint_t, rcm_info_t **); 54*7c478bd9Sstevel@tonic-gateint rcm_request_offline_list(rcm_handle_t *, char **, uint_t, rcm_info_t **); 55*7c478bd9Sstevel@tonic-gateint rcm_notify_online(rcm_handle_t *, char *, uint_t, rcm_info_t **); 56*7c478bd9Sstevel@tonic-gateint rcm_notify_online_list(rcm_handle_t *, char **, uint_t, rcm_info_t **); 57*7c478bd9Sstevel@tonic-gateint rcm_notify_remove(rcm_handle_t *, char *, uint_t, rcm_info_t **); 58*7c478bd9Sstevel@tonic-gateint rcm_notify_remove_list(rcm_handle_t *, char **, uint_t, rcm_info_t **); 59*7c478bd9Sstevel@tonic-gateint rcm_request_suspend(rcm_handle_t *, char *, uint_t, timespec_t *, 60*7c478bd9Sstevel@tonic-gate rcm_info_t **); 61*7c478bd9Sstevel@tonic-gateint rcm_request_suspend_list(rcm_handle_t *, char **, uint_t, timespec_t *, 62*7c478bd9Sstevel@tonic-gate rcm_info_t **); 63*7c478bd9Sstevel@tonic-gateint rcm_notify_resume(rcm_handle_t *, char *, uint_t, rcm_info_t **); 64*7c478bd9Sstevel@tonic-gateint rcm_notify_resume_list(rcm_handle_t *, char **, uint_t, rcm_info_t **); 65*7c478bd9Sstevel@tonic-gateint rcm_notify_event(rcm_handle_t *, char *, uint_t, nvlist_t *, rcm_info_t **); 66*7c478bd9Sstevel@tonic-gateint rcm_register_event(rcm_handle_t *, char *, uint_t, rcm_info_t **); 67*7c478bd9Sstevel@tonic-gateint rcm_unregister_event(rcm_handle_t *, char *, uint_t); 68*7c478bd9Sstevel@tonic-gateint rcm_register_capacity(rcm_handle_t *, char *, uint_t, rcm_info_t **); 69*7c478bd9Sstevel@tonic-gateint rcm_unregister_capacity(rcm_handle_t *, char *, uint_t); 70*7c478bd9Sstevel@tonic-gateint rcm_register_interest(rcm_handle_t *, char *, uint_t, rcm_info_t **); 71*7c478bd9Sstevel@tonic-gateint rcm_unregister_interest(rcm_handle_t *, char *, uint_t); 72*7c478bd9Sstevel@tonic-gateint rcm_exec_cmd(char *); 73*7c478bd9Sstevel@tonic-gatechar *rcm_module_dir(uint_t); 74*7c478bd9Sstevel@tonic-gatevoid *rcm_module_open(char *); 75*7c478bd9Sstevel@tonic-gatevoid rcm_module_close(void *); 76*7c478bd9Sstevel@tonic-gateconst char *rcm_get_client_name(rcm_handle_t *); 77*7c478bd9Sstevel@tonic-gate 78*7c478bd9Sstevel@tonic-gatechar *rcm_script_dir(uint_t); 79*7c478bd9Sstevel@tonic-gatechar *rcm_dir(uint_t, int *); 80*7c478bd9Sstevel@tonic-gatechar *rcm_get_script_dir(char *); 81*7c478bd9Sstevel@tonic-gateint rcm_is_script(char *); 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gate/* event related interfaces */ 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gateint get_event_service(char *, void *, size_t, void **, size_t *); 86*7c478bd9Sstevel@tonic-gateint create_event_service(char *, void (*)(void **, size_t *)); 87*7c478bd9Sstevel@tonic-gateint revoke_event_service(int); 88