Main Page   Compound List   File List   Compound Members  

rwKernel Class Reference

Wrapper around kernel memory access. More...

#include <rwKernel.hpp>

List of all members.

Public Methods

 rwKernel ()
 Create the object with a fairly standard configuration. More...

 rwKernel (int file, int offset)
 Create a rwKernel object with the defined parameters. More...

 ~rwKernel ()
 Destructor. More...

void read (unsigned char *dest, unsigned int len, unsigned int addr)
 read from kernel. More...

void write (unsigned char *src, unsigned int len, unsigned int addr)
 write to kernel. More...

void read (char *a, unsigned int b, unsigned int c)
 Foo.

void write (char *a, unsigned int b, unsigned int c)
 Foo.


Detailed Description

Wrapper around kernel memory access.

It lets you read from and write to the kernel without taking care of offsets or file access.


Constructor & Destructor Documentation

rwKernel::rwKernel
 

Create the object with a fairly standard configuration.

This constructor will assume that you want to use /dev/mem and a standard offset (as used by any 2.4.x and any 2.2.x kernel not defined to use more than 1GB of ram).

rwKernel::rwKernel int file,
int offset
 

Create a rwKernel object with the defined parameters.

Parameters:
file   sets the file to use. This must be either PROCKCORE (to use /proc/kcore as the memory device) or DEVMEM (to use /dev/mem as the memory device).
offset   sets the offset from real memory addresses to virtual (kernel-) addresses. This is only needed if (file == DEVMEM), otherways supply IGNORE.

rwKernel::~rwKernel
 

Destructor.

Will unmap the used device.


Member Function Documentation

void rwKernel::read unsigned char * dest,
unsigned int len,
unsigned int addr
 

read from kernel.

Parameters:
dest   read data to this address.
len   amount of bytes to read.
addr   read data from this address.

void rwKernel::write unsigned char * src,
unsigned int len,
unsigned int addr
 

write to kernel.

Parameters:
src   read data from this address.
len   amount of bytes to write.
addr   write data to this address.


The documentation for this class was generated from the following file:
Generated at Tue Aug 14 18:04:51 2001 for Kermit by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001