up | Inhaltsverzeichniss | Kommentar

Manual page for KVM_READ(3K)

kvm_read, kvm_write - copy data to or from a kernel image or running system

SYNOPSIS

#include <kvm.h>

int kvm_read(kd, addr, buf, nbytes)
kvm_t *kd;
unsigned long addr;
char *buf;
unsigned nbytes;

int kvm_write(kd, addr, buf, nbytes)
kvm_t *kd;
unsigned long addr;
char *buf;
unsigned nbytes;

DESCRIPTION

kvm_read() transfers data from the kernel image specified by kd (see kvm_open.3k to the address space of the process. nbytes bytes of data are copied from the kernel virtual address given by addr to the buffer pointed to by buf.

kvm_write() is like kvm_read(), except that the direction of data transfer is reversed. In order to use this function, the kvm_open.3k call that returned kd must have specified write access. If a user virtual address is given, it is resolved in the address space of the process specified in the most recent kvm_getu.3k call.

RETURN VALUES

On success, kvm_read() and kvm_write() return the number of bytes actually transferred. On failure, they return -1.

SEE ALSO

kvm_getu.3k kvm_nlist.3k kvm_open.3k


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97