CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/data/headers/windows/c_payload_util/winsock_util.h
Views: 1904
1
#ifndef _WINSOCK_UTIL
2
#define _WINSOCK_UTIL
3
4
#define WIN32_LEAN_AND_MEAN
5
6
#include <windows.h>
7
#include <winsock2.h>
8
#include <intrin.h>
9
#include <ws2tcpip.h>
10
11
typedef int (WINAPI *FuncWSAStartup)
12
(
13
WORD wVersionRequired,
14
LPWSADATA lpWSAData
15
);
16
17
typedef int (WINAPI *FuncWSACleanup) ();
18
19
typedef int (WINAPI *FuncGetAddrInfo)
20
(
21
PCSTR pNodeName,
22
PCSTR pServiceName,
23
const ADDRINFO *pHints,
24
LPADDRINFO *ppResult
25
);
26
27
typedef void (WINAPI *FuncFreeAddrInfo)
28
(
29
LPADDRINFO pAddrInfo
30
);
31
32
typedef SOCKET (WINAPI *FuncWSASocketA) (
33
int af,
34
int type,
35
int protocol,
36
LPWSAPROTOCOL_INFO lpProtocolInfo,
37
GROUP g,
38
DWORD dwFlags
39
);
40
41
typedef int (WINAPI *FuncConnect)
42
(
43
SOCKET s,
44
const struct sockaddr *name,
45
int namelen
46
);
47
48
typedef int (WINAPI *FuncSend)
49
(
50
SOCKET s,
51
const char *buf,
52
int len,
53
int flags
54
);
55
56
typedef int (WINAPI *FuncRecv)
57
(
58
SOCKET s,
59
char *buf,
60
int len,
61
int flags
62
);
63
64
#endif
65
66