aboutsummaryrefslogtreecommitdiffstats
path: root/src/vm.h
blob: 4a994f95d8a028c9c760ae60dd002a8fa453083c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _VM_H_
#define _VM_H_
#include <stdint.h>

typedef struct VMMapping {
  void *begin;
  void *end;
  uint8_t r:1;
  uint8_t w:1;
  uint8_t x:1;
  uint8_t s:1;
  uint8_t p:1;
  const char *name;
  struct VMMapping *next;
} VMMapping;

typedef struct MemscanResult {
  VMMapping *mapping;
  off_t offset;
  struct MemscanResult *next;
} MemscanResult;

VMMapping* parse_vmmap (int pid);

MemscanResult* memscan(int pid, uint8_t *byte_seq, uint64_t byte_seq_len);

#endif // _VM_H_