summaryrefslogtreecommitdiff
path: root/procfs.h
blob: b36c2429617957cb79f2443593f3a4bfd80262f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef CORE_PROCFS_H
#define CORE_PROCFS_H

#include <stdlib.h>
#include <stddef.h>
#include <sys/types.h>

#ifndef PAGE_SIZE
#define PAGE_SIZE (4096)
#endif

int procfs_open(pid_t pid);
int read_page(int fd, uintptr_t index, uint8_t *data);

struct procfs_map {
	uintptr_t base;
	uintptr_t max;
};

ssize_t procfs_maps(pid_t pid, struct procfs_map **maps);

#endif