forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipmisc.h
executable file
·35 lines (27 loc) · 832 Bytes
/
ipmisc.h
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
#ifndef IPMISC_H_INCLUDED
#define IPMISC_H_INCLUDED
#include "ipchunk.h"
#include "dnsparser.h"
typedef enum _MiscType {
IP_MISC_TYPE_UNKNOWN = 0,
IP_MISC_TYPE_BLOCK,
IP_MISC_TYPE_SUBSTITUTE,
} MiscType;
#define IP_MISC_ACTION_NOTHING 0
#define IP_MISC_ACTION_BLOCK (-1)
typedef struct _IPMisc IPMisc;
struct _IPMisc{
/* private */
IpChunk c;
int (*AddBlockFromString)(IPMisc *m, const char *Ip);
int (*AddSubstituteFromString)(IPMisc *m,
const char *Ip,
const char *Substituter
);
int (*Process)(IPMisc *m,
char *DNSPackage, /* Without TCPLength */
int PackageLength
);
};
int IPMisc_Init(IPMisc *m);
#endif // IPMISC_H_INCLUDED