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
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.
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]
23 * Copyright (c) 1987-1998 by Sun Microsystems, Inc.
24 * All rights reserved.
28 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
34 #include <sys/types.h>
44 /* define a 'cookie' to pass around between user code and the library */
45 typedef struct _kvmd kvm_t
;
47 /* libkvm routine definitions */
51 extern kvm_t
*kvm_open(const char *, const char *, const char *,
53 extern int kvm_close(kvm_t
*);
54 extern int kvm_nlist(kvm_t
*, struct nlist
[]);
55 extern ssize_t
kvm_read(kvm_t
*, uintptr_t, void *, size_t);
56 extern ssize_t
kvm_kread(kvm_t
*, uintptr_t, void *, size_t);
57 extern ssize_t
kvm_uread(kvm_t
*, uintptr_t, void *, size_t);
58 extern ssize_t
kvm_aread(kvm_t
*, uintptr_t, void *, size_t, struct as
*);
59 extern ssize_t
kvm_pread(kvm_t
*, uint64_t, void *, size_t);
60 extern ssize_t
kvm_write(kvm_t
*, uintptr_t, const void *, size_t);
61 extern ssize_t
kvm_kwrite(kvm_t
*, uintptr_t, const void *, size_t);
62 extern ssize_t
kvm_uwrite(kvm_t
*, uintptr_t, const void *, size_t);
63 extern ssize_t
kvm_awrite(kvm_t
*, uintptr_t, const void *, size_t,
65 extern ssize_t
kvm_pwrite(kvm_t
*, uint64_t, const void *, size_t);
66 extern uint64_t kvm_physaddr(kvm_t
*, struct as
*, uintptr_t);
67 extern proc_t
*kvm_getproc(kvm_t
*, pid_t
);
68 extern proc_t
*kvm_nextproc(kvm_t
*);
69 extern int kvm_setproc(kvm_t
*);
70 extern user_t
*kvm_getu(kvm_t
*, struct proc
*);
71 extern int kvm_getcmd(kvm_t
*, proc_t
*, user_t
*, char ***, char ***);
72 extern const char *kvm_namelist(kvm_t
*);
76 extern kvm_t
*kvm_open();
77 extern int kvm_close();
78 extern int kvm_nlist();
79 extern ssize_t
kvm_read();
80 extern ssize_t
kvm_kread();
81 extern ssize_t
kvm_uread();
82 extern ssize_t
kvm_aread();
83 extern ssize_t
kvm_pread();
84 extern ssize_t
kvm_write();
85 extern ssize_t
kvm_kwrite();
86 extern ssize_t
kvm_uwrite();
87 extern ssize_t
kvm_awrite();
88 extern ssize_t
kvm_pwrite();
89 extern uint64_t Kvm_physaddr();
90 extern proc_t
*kvm_getproc();
91 extern proc_t
*kvm_nextproc();
92 extern int kvm_setproc();
93 extern user_t
*kvm_getu();
94 extern int kvm_getcmd();