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