diff options
Diffstat (limited to 'lib/libkvm/kvm.h')
-rw-r--r-- | lib/libkvm/kvm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libkvm/kvm.h b/lib/libkvm/kvm.h index 77b118cf3c05..5402bf9ae808 100644 --- a/lib/libkvm/kvm.h +++ b/lib/libkvm/kvm.h @@ -36,6 +36,7 @@ #include <sys/cdefs.h> #include <sys/types.h> #include <nlist.h> +#include <vm/vm.h> /* Default version symbol. */ #define VRS_SYM "_version" @@ -73,7 +74,19 @@ struct kvm_swap { u_int ksw_reserved2; }; +struct kvm_page { + unsigned int version; + u_long paddr; + u_long kmap_vaddr; + u_long dmap_vaddr; + vm_prot_t prot; + u_long offset; + size_t len; + /* end of version 1 */ +}; + #define SWIF_DEV_PREFIX 0x0002 +#define LIBKVM_WALK_PAGES_VERSION 1 __BEGIN_DECLS int kvm_close(kvm_t *); @@ -104,6 +117,9 @@ ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t); ssize_t kvm_read_zpcpu(kvm_t *, unsigned long, void *, size_t, int); ssize_t kvm_read2(kvm_t *, kvaddr_t, void *, size_t); ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t); + +typedef int kvm_walk_pages_cb_t(struct kvm_page *, void *); +int kvm_walk_pages(kvm_t *, kvm_walk_pages_cb_t *, void *); __END_DECLS #endif /* !_KVM_H_ */ |