1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #ifndef UVUTIL_H
24 # define UVUTIL_H
25
26 struct uv_access_s
27 {
28 uv_loop_t * loop;
29 int port;
30 char * address;
31 # define PW_SIZE 128
32 char pw[PW_SIZE + 1];
33 char pwBuffer[PW_SIZE + 1];
34 int pwPos;
35
36 void (* connectPrompt) (uv_tcp_t * client);
37 void (* connected) (uv_tcp_t * client);
38 bool open;
39 uv_tcp_t server;
40 uv_tcp_t * client;
41 bool useTelnet;
42 void * telnetp;
43 bool loggedOn;
44 unsigned char * inBuffer;
45 uint inSize;
46 uint inUsed;
47 };
48
49 typedef struct uv_access_s uv_access;
50 void accessStartWriteStr (uv_tcp_t * client, char * data);
51 void uv_open_access (uv_access * access);
52 # ifndef QUIET_UNUSED
53 void accessPutStr (uv_access * access, char * str);
54 void accessPutChar (uv_access * access, char ch);
55 # endif
56 int accessGetChar (uv_access * access);
57 void accessStartWrite (uv_tcp_t * client, char * data, ssize_t datalen);
58 void accessCloseConnection (uv_stream_t* stream);
59 #endif