forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
request_response.h
executable file
·60 lines (37 loc) · 1.27 KB
/
request_response.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef REQUEST_RESPONSE_H_INCLUDED
#define REQUEST_RESPONSE_H_INCLUDED
#include "querydnsbase.h"
#include "readconfig.h"
#include "dnscache.h"
#include "common.h"
int InitAddress(ConfigFileInfo *ConfigInfo);
int InitCheckIPs(ConfigFileInfo *ConfigInfo);
BOOL SocketIsStillReadable(SOCKET Sock, int timeout);
void ClearSocketBuffer(SOCKET Sock);
int SendAndReveiveRawMessageViaTCP(SOCKET Sock,
const void *Content,
int ContentLength,
ExtendableBuffer *ResultBuffer,
uint16_t *TCPLength /* Big-endian */
);
int TCPProxies_Init(StringList *Proxies);
int QueryDNSViaTCP(void);
void SetUDPFilter(BOOL State);
void SetAppendEDNSOpt(BOOL State);
int InitBlockedIP(StringList *l);
int InitIPSubstituting(StringList *l);
int QueryDNSViaUDP(void);
struct TestServerArguments
{
const char *ServerAddress;
uint32_t *Counter;
};
int TestServer(struct TestServerArguments *Args);
int SetSocketWait(SOCKET sock, BOOL Wait);
int SetSocketSendTimeLimit(SOCKET sock, int time);
int SetSocketRecvTimeLimit(SOCKET sock, int time);
int SetSocketNonBlock(SOCKET sock, BOOL NonBlocked);
BOOL TCPSocketIsHealthy(SOCKET sock);
void CloseTCPConnection(SOCKET sock);
void TransferStart(BOOL StartTCP);
#endif // REQUEST_RESPONSE_H_INCLUDED