-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.h
51 lines (37 loc) · 1.4 KB
/
functions.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
//
// Created by 1 on 2021/7/6.
//
#ifndef CM_DNS_CPP_FUNCTIONS_H
#define CM_DNS_CPP_FUNCTIONS_H
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cstdarg>
#include <vector>
#include <WinSock2.h>
#include "DetailedLogDealer.h"
#include "SimpleLogDealer.h"
#include "define.h"
#include "MessageDealer.h"
#include "DNSStore.h"
#include "DNSStore.h"
class functions {
public:
static void
forwardQuery(char *recvBuf, sockaddr_in reveice_in, sockaddr_in server_in, SOCKET &externSoc, SOCKET localSoc,
int len, int debugMode);
static void
sendingBack(char *rece_buff, std::string ip, sockaddr_in receive_in, SOCKET localSoc, int rec_len, std::string type,
int debug_mode);
static void sendBackPTR(char *rece_buff, int rec_len, sockaddr_in receive_in, SOCKET localSoc, int debug_mode);
void str_split(const std::string &str, const std::string &sign, std::vector<std::string> &results);
EM_IP_TYPE Check_IP_V6(std::vector<std::string> vecIpSection);
EM_IP_TYPE Check_IP(std::string strIP);
std::string Get_Type_Name(EM_IP_TYPE emType);
EM_IP_TYPE Check_IP_V4(std::vector<std::string> vecIpSection);
static void
forwardSelectQuery(char *recvBuf, sockaddr_in receive_in, sockaddr_in server_in, SOCKET &externSoc, SOCKET localSoc,
int len, int debugMode);
};
#endif //CM_DNS_CPP_FUNCTIONS_H