blob: 248ed13f7b0aa5911756bd43d4d551c454f2c067 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/*
* SymbolFingp.hpp:
* some fingerprint
* written by palmers / teso
*/
#ifndef __SymbolFingp_H
#define __SymbolFingp_H
#include <map>
#include <fstream>
#include <string>
#include <iostream>
/* default file to open */
#define DEFAULT_FILE "SymbolFind.conf"
/* defines used for the type field in struct cell */
#define WWCARD 1
#define NOCARD 0
struct cell
{
unsigned char type;
unsigned char val;
};
struct sfp
{
char *name;
unsigned long start_addr;
unsigned long stop_addr;
long offset;
unsigned short length;
struct cell *fp;
};
/**
* class to hold fingerprints of a function (a [kernel-]symbol).
*/
class SymbolFingp
{
private:
typedef map<string, struct sfp> FingerThing;
FingerThing Fingers;
void readFingers (ifstream);
bool addFinger (struct sfp *);
public:
/**
* Reads configuration from default file.
*/
SymbolFingp ();
/**
* Reads configuration from specified file.
*/
SymbolFingp (string);
/**
* Foo.
*/
~SymbolFingp ();
/**
* Return the Fingerprint matching the supplied name.
*/
struct sfp *getFinger (string);
};
#endif /* __SymbolFingp_H */
|