mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-10-26 09:14:00 +01:00
31 lines
595 B
C
31 lines
595 B
C
#include <Windows.h>
|
|
#include <stdio.h>
|
|
#define BUFSIZE 5 * 1024
|
|
|
|
#define HEADER_SIZE 4
|
|
struct agent_connection {
|
|
OVERLAPPED ol;
|
|
HANDLE connection;
|
|
struct {
|
|
DWORD size;
|
|
DWORD read;
|
|
char buf[BUFSIZE];
|
|
} request;
|
|
enum {
|
|
LISTENING = 0,
|
|
READING_HEADER,
|
|
READING,
|
|
WRITING,
|
|
DONE
|
|
} state;
|
|
struct agent_connection* next;
|
|
};
|
|
|
|
void agent_connection_on_io(struct agent_connection*, DWORD, OVERLAPPED*);
|
|
void agent_connection_disconnect(struct agent_connection*);
|
|
|
|
int agent_start();
|
|
void agent_shutdown();
|
|
void agent_listen();
|
|
void agent_cleanup_connection(struct agent_connection*);
|