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