forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hostsutils.h
executable file
·44 lines (36 loc) · 1.53 KB
/
hostsutils.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
36
37
38
39
40
41
42
43
44
#ifndef HOSTSUTILS_H_INCLUDED
#define HOSTSUTILS_H_INCLUDED
#include "iheader.h"
#include "hostscontainer.h"
typedef enum _HostsUtilsTryResult{
HOSTSUTILS_TRY_BLOCKED = -2,
HOSTSUTILS_TRY_NONE = -1,
HOSTSUTILS_TRY_OK = 0,
HOSTSUTILS_TRY_RECURSED = 1
} HostsUtilsTryResult;
int HostsUtils_GetCName(const char *Domain,
char *Buffer,
HostsContainer *Container
);
BOOL HostsUtils_TypeExisting(HostsContainer *Container,
const char *Domain,
HostsRecordType Type
);
HostsUtilsTryResult HostsUtils_Try(IHeader *Header,
int BufferLength,
HostsContainer *Container
);
int HostsUtils_Query(SOCKET Socket, /* Both for sending and receiving */
Address_Type *BackAddress,
int Identifier,
const char *Name,
DNSRecordType Type
);
/* Error code returned */
int HostsUtils_CombineRecursedResponse(void *Buffer, /* Include IHeader */
int Bufferlength,
char *RecursedEntity,
int EntityLength,
const char *RecursedDomain
);
#endif // HOSTSUTILS_H_INCLUDED