1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 typedef void (* uv_read_cb_t) (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
21 typedef void (* uv_write_cb_t) (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
22 struct uvClientData_s
23 {
24 bool assoc;
25 uint fnpno;
26 uint lineno;
27 void * telnetp;
28 uv_read_cb_t read_cb;
29 uv_write_cb_t write_cb;
30 uv_write_cb_t write_actual_cb;
31
32 char buffer [1024];
33 size_t nPos;
34
35 char * ttype;
36 uint stationNo;
37 };
38
39 typedef struct uvClientData_s uvClientData;
40
41 int fnpuvInit (int telnet_port, char * telnet_address);
42 int fnpuv3270Init (int telnet3270_port);
43 void fnpuv3270Poll (bool start);
44 void fnpuvProcessEvent (void);
45 void fnpuv_start_write (uv_tcp_t * client, unsigned char * data, ssize_t len);
46 void fnpuv_start_writestr (uv_tcp_t * client, unsigned char * data);
47 void fnpuv_send_eor (uv_tcp_t * client);
48 void fnpuv_recv_eor (uv_tcp_t * client);
49 void fnpuv_start_write_actual (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
50 void fnpuv_associated_brk (uv_tcp_t * client);
51 void fnpuv_unassociated_readcb (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
52 void fnpuv_associated_readcb (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
53 void fnpuv_read_start (uv_tcp_t * client);
54 void fnpuv_read_stop (uv_tcp_t * client);
55 void fnpuv_dial_out (uint fnpno, uint lineno, word36 d1, word36 d2, word36 d3);
56 void fnpuv_open_slave (uint fnpno, uint lineno);
57 void close_connection (uv_stream_t* stream);
58 #ifdef TUN
59 void fnpTUNProcessEvent (void);
60 #endif
61 void fnpuv_3270_readcb (uv_tcp_t * client,
62 ssize_t nread,
63 unsigned char * buf);
64 void fnpuv_start_3270_write (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
65 void reset_line (struct t_line * linep);