Determining the offset

The position at which transfer occurs depends on the current offset as set on the file descriptor.

In virtual-address systems such as QNX Neutrino, the current offset is taken to be the virtual address from the process's perspective.

For example, to read 4096 bytes at offset 0x00021000 from process ID number 2259, the following code snippet could be used:

int     fd;
char    buf [4096];

fd = open ("/proc/2259/as", O_RDONLY);
lseek (fd, 0x00021000, SEEK_SET);
read (fd, buf, 4096);

Of course, you should check the return values in your real code!