Kernel VM Library Functions kvmread(3KVM)
NAME
kvmread, kvmwrite - copy data to or from a kernel image or
running system
SYNOPSIS
cc [ flag... ] file... -lkvm [ library...]
#include
ssizet kvmread(kvmt *kd, uintptrt addr, void *buf, sizet nbytes);
ssizet kvmwrite(kvmt *kd, uintptrt addr, void *buf, sizet nbytes);
DESCRIPTION
The kvmread() function transfers data from the kernel image
specified by kd (see kvmopen(3KVM)) 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.
The kvmwrite() function is like kvmread(), except that the
direction of data transfer is reversed. To use this func-
tion, the kvmopen(3KVM) 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 kvmgetu(3KVM) call.
USAGE
The kvmread() and kvmwrite() functions are obsolete and
might be removed in a future release. The functions
described on the kvmkread(3KVM) manual page should be used
instead.
RETURN VALUES
On success, these functions return the number of bytes actu-
ally transferred. On failure, they return -1.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 2 May 2002 1
Kernel VM Library Functions kvmread(3KVM)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Obsolete
MT-Level Unsafe
SEE ALSO
kvmgetu(3KVM), kvmkread(3KVM)kvmnlist(3KVM),
kvmopen(3KVM), attributes(5)
SunOS 5.11 Last change: 2 May 2002 2
|