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
#define VOID
Definition BasicTypes.h:33
unsigned int * PUINT32
Definition BasicTypes.h:48
unsigned int UINT32
Definition BasicTypes.h:48
char CHAR
Definition BasicTypes.h:31
VOID RemoteConnectionListen(PCSTR Port)
Listen of a port and wait for a client connection.
Definition remote-connection.cpp:40
int RemoteConnectionCloseTheConnectionWithDebuggee()
Close the connect from client side to the debuggee.
Definition remote-connection.cpp:504
VOID RemoteConnectionConnect(PCSTR Ip, PCSTR Port)
Connect to a remote debuggee (guest) as a client (host)
Definition remote-connection.cpp:315
int CommunicationClientReceiveMessage(SOCKET ConnectSocket, CHAR *RecvBuf, UINT32 MaxBuffLen, PUINT32 BuffLenRecvd)
Receive message as a client.
Definition tcpclient.cpp:173
int CommunicationServerShutdownAndCleanupConnection(SOCKET ClientSocket, SOCKET ListenSocket)
Shutdown and cleanup connection as server.
Definition tcpserver.cpp:216
int CommunicationClientShutdownConnection(SOCKET ConnectSocket)
shutdown the connection as a client
Definition tcpclient.cpp:137
int CommunicationClientCleanup(SOCKET ConnectSocket)
cleanup the connection as client
Definition tcpclient.cpp:216
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 CommunicationServerCreateServerAndWaitForClient(PCSTR Port, SOCKET *ClientSocketArg, SOCKET *ListenSocketArg)
Create server and wait for a client to connect.
Definition tcpserver.cpp:31
int CommunicationClientConnectToServer(PCSTR Ip, PCSTR Port, SOCKET *ConnectSocketArg)
communication for client, connecting to the server
Definition tcpclient.cpp:23
int CommunicationServerReceiveMessage(SOCKET ClientSocket, char *recvbuf, int recvbuflen)
listen and receive message as the server
Definition tcpserver.cpp:147
int CommunicationServerSendMessage(SOCKET ClientSocket, const char *sendbuf, int length)
send message as the server
Definition tcpserver.cpp:188
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 CommunicationClientSendMessage(SOCKET ConnectSocket, const char *sendbuf, int buflen)
Send message a client.
Definition tcpclient.cpp:111