HyperDbg Debugger
Loading...
Searching...
No Matches
communication.h
Go to the documentation of this file.
1
12#pragma once
13
15// Serial Constants //
17
18#define COM1_PORT 0x03F8
19#define COM2_PORT 0x02F8
20#define COM3_PORT 0x03E8
21#define COM4_PORT 0x02E8
22
24// Server //
26
27int
29 SOCKET * ClientSocketArg,
30 SOCKET * ListenSocketArg);
31
32INT
33CommunicationServerReceiveMessage(SOCKET ClientSocket, CHAR * recvbuf, INT recvbuflen);
34
35INT
36CommunicationServerSendMessage(SOCKET ClientSocket, const CHAR * sendbuf, INT length);
37
38INT
40 SOCKET ListenSocket);
41
43// Client //
45
46INT
47CommunicationClientConnectToServer(PCSTR Ip, PCSTR Port, SOCKET * ConnectSocketArg);
48
49INT
50CommunicationClientSendMessage(SOCKET ConnectSocket, const CHAR * sendbuf, INT buflen);
51
52INT
53CommunicationClientShutdownConnection(SOCKET ConnectSocket);
54
55INT
56CommunicationClientReceiveMessage(SOCKET ConnectSocket, CHAR * RecvBuf, UINT32 MaxBuffLen, PUINT32 BuffLenRecvd);
57
58INT
59CommunicationClientCleanup(SOCKET ConnectSocket);
60
62// Handle Remote Connection //
64
65VOID
66RemoteConnectionListen(PCSTR Port);
67
68VOID
69RemoteConnectionConnect(PCSTR Ip, PCSTR Port);
70
71INT
72RemoteConnectionSendCommand(const CHAR * sendbuf, INT len);
73
74INT
75RemoteConnectionSendResultsToHost(const CHAR * sendbuf, INT len);
76
77INT
int INT
Definition BasicTypes.h:43
unsigned int * PUINT32
Definition BasicTypes.h:54
unsigned int UINT32
Definition BasicTypes.h:54
char CHAR
Definition BasicTypes.h:33
VOID RemoteConnectionListen(PCSTR Port)
Listen of a port and wait for a client connection.
Definition remote-connection.cpp:40
INT CommunicationServerSendMessage(SOCKET ClientSocket, const CHAR *sendbuf, INT length)
send message as the server
Definition tcpserver.cpp:188
INT CommunicationClientSendMessage(SOCKET ConnectSocket, const CHAR *sendbuf, INT buflen)
Send message a client.
Definition tcpclient.cpp:111
INT CommunicationServerShutdownAndCleanupConnection(SOCKET ClientSocket, SOCKET ListenSocket)
Shutdown and cleanup connection as server.
Definition tcpserver.cpp:216
VOID RemoteConnectionConnect(PCSTR Ip, PCSTR Port)
Connect to a remote debuggee (guest) as a client (host).
Definition remote-connection.cpp:315
INT CommunicationServerReceiveMessage(SOCKET ClientSocket, CHAR *recvbuf, INT recvbuflen)
listen and receive message as the server
Definition tcpserver.cpp:147
INT RemoteConnectionSendCommand(const CHAR *sendbuf, INT len)
send the command as a client (debugger, host) to the server (debuggee, guest)
Definition remote-connection.cpp:445
INT CommunicationClientReceiveMessage(SOCKET ConnectSocket, CHAR *RecvBuf, UINT32 MaxBuffLen, PUINT32 BuffLenRecvd)
Receive message as a client.
Definition tcpclient.cpp:173
INT RemoteConnectionSendResultsToHost(const CHAR *sendbuf, INT len)
Send the results of executing a command from deubggee (server, guest) to the debugger (client,...
Definition remote-connection.cpp:481
int CommunicationServerCreateServerAndWaitForClient(PCSTR Port, SOCKET *ClientSocketArg, SOCKET *ListenSocketArg)
Create server and wait for a client to connect.
Definition tcpserver.cpp:31
INT RemoteConnectionCloseTheConnectionWithDebuggee()
Close the connect from client side to the debuggee.
Definition remote-connection.cpp:504
INT CommunicationClientCleanup(SOCKET ConnectSocket)
cleanup the connection as client
Definition tcpclient.cpp:216
INT CommunicationClientShutdownConnection(SOCKET ConnectSocket)
shutdown the connection as a client
Definition tcpclient.cpp:137
INT CommunicationClientConnectToServer(PCSTR Ip, PCSTR Port, SOCKET *ConnectSocketArg)
communication for client, connecting to the server
Definition tcpclient.cpp:23