summaryrefslogtreecommitdiff
path: root/usr/src/lib/librcm/llib-lrcm
blob: c6c8dd1679c7b1d4df3115219c75cd83862c3559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
 * 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);