]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - contrib/cygtermd/telnet.h
first pass
[PuTTY.git] / contrib / cygtermd / telnet.h
1 /*
2  * Header declaring Telnet-handling functions.
3  */
4
5 #ifndef FIXME_TELNET_H
6 #define FIXME_TELNET_H
7
8 #include "sel.h"
9
10 typedef struct telnet_tag *Telnet;
11
12 struct shell_data {
13     char **envvars;                    /* array of "VAR=value" terms */
14     int nenvvars;
15     char *termtype;
16 };
17
18 /*
19  * Create and destroy a Telnet structure.
20  */
21 Telnet telnet_new(sel_wfd *net, sel_wfd *pty);
22 void telnet_free(Telnet telnet);
23
24 /*
25  * Process data read from the pty.
26  */
27 void telnet_from_pty(Telnet telnet, char *buf, int len);
28
29 /*
30  * Process Telnet protocol data received from the network.
31  */
32 void telnet_from_net(Telnet telnet, char *buf, int len);
33
34 /*
35  * Return true if pre-shell-startup negotiations are complete and
36  * it's safe to start the shell subprocess now. On a true return,
37  * also fills in the shell_data structure.
38  */
39 int telnet_shell_ok(Telnet telnet, struct shell_data *shdata);
40
41 #endif /* FIXME_TELNET_H */