1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00
putty-source/contrib/cygtermd/telnet.h
Simon Tatham 96ec2c2500 Get rid of lots of implicit pointer types.
All the main backend structures - Ssh, Telnet, Pty, Serial etc - now
describe structure types themselves rather than pointers to them. The
same goes for the codebase-wide trait types Socket and Plug, and the
supporting types SockAddr and Pinger.

All those things that were typedefed as pointers are older types; the
newer ones have the explicit * at the point of use, because that's
what I now seem to be preferring. But whichever one of those is
better, inconsistently using a mixture of the two styles is worse, so
let's make everything consistent.

A few types are still implicitly pointers, such as Bignum and some of
the GSSAPI types; generally this is either because they have to be
void *, or because they're typedefed differently on different
platforms and aren't always pointers at all. Can't be helped. But I've
got rid of the main ones, at least.
2018-10-04 19:10:23 +01:00

42 lines
907 B
C

/*
* Header declaring Telnet-handling functions.
*/
#ifndef FIXME_TELNET_H
#define FIXME_TELNET_H
#include "sel.h"
typedef struct Telnet Telnet;
struct shell_data {
char **envvars; /* array of "VAR=value" terms */
int nenvvars;
char *termtype;
};
/*
* Create and destroy a Telnet structure.
*/
Telnet *telnet_new(sel_wfd *net, sel_wfd *pty);
void telnet_free(Telnet *telnet);
/*
* Process data read from the pty.
*/
void telnet_from_pty(Telnet *telnet, char *buf, int len);
/*
* Process Telnet protocol data received from the network.
*/
void telnet_from_net(Telnet *telnet, char *buf, int len);
/*
* Return true if pre-shell-startup negotiations are complete and
* it's safe to start the shell subprocess now. On a true return,
* also fills in the shell_data structure.
*/
int telnet_shell_ok(Telnet *telnet, struct shell_data *shdata);
#endif /* FIXME_TELNET_H */