mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
34f747421d
in place of making a network connection. This has involved a couple of minor infrastructure changes: - New dlg_label_change() function in the dialog.h interface, which alters the label on a control. Only used, at present, to switch the Host Name and Port boxes into Serial Line and Speed, which means that any platform not implementing serial connections (i.e. currently all but Windows) does not need to actually do anything in this function. Yet. - New small piece of infrastructure: cfg_launchable() determines whether a Config structure describes a session ready to be launched. This was previously determined by seeing if it had a non-empty host name, but it has to check the serial line as well so there's a centralised function for it. I haven't gone through all front ends and arranged for this function to be used everywhere it needs to be; so far I've only checked Windows. - Similarly, cfg_dest() returns the destination of a connection (host name or serial line) in a text format suitable for putting into messages such as `Unable to connect to %s'. [originally from svn r6815]
33 lines
957 B
C
33 lines
957 B
C
/*
|
|
* Linking module for PuTTY proper: list the available backends
|
|
* including ssh, plus the serial backend.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "putty.h"
|
|
|
|
/*
|
|
* This appname is not strictly in the right place, since Plink
|
|
* also uses this module. However, Plink doesn't currently use any
|
|
* of the dialog-box sorts of things that make use of appname, so
|
|
* it shouldn't do any harm here. I'm trying to avoid having to
|
|
* have tiny little source modules containing nothing but
|
|
* declarations of appname, for as long as I can...
|
|
*/
|
|
const char *const appname = "PuTTY";
|
|
|
|
#ifdef TELNET_DEFAULT
|
|
const int be_default_protocol = PROT_TELNET;
|
|
#else
|
|
const int be_default_protocol = PROT_SSH;
|
|
#endif
|
|
|
|
struct backend_list backends[] = {
|
|
{PROT_SSH, "ssh", &ssh_backend},
|
|
{PROT_TELNET, "telnet", &telnet_backend},
|
|
{PROT_RLOGIN, "rlogin", &rlogin_backend},
|
|
{PROT_RAW, "raw", &raw_backend},
|
|
{PROT_SERIAL, "serial", &serial_backend},
|
|
{0, NULL}
|
|
};
|