};
struct backend_tag {
- char *(*init) (void *frontend_handle, void **backend_handle,
+ char *(*init) (void *frontend_handle, void **backend_handle, Config *cfg,
char *host, int port, char **realhost, int nodelay);
+ /* back->reconfig() passes in a replacement configuration. */
+ void (*reconfig) (void *handle, Config *cfg);
/* back->send() returns the current amount of buffered data. */
int (*send) (void *handle, char *buf, int len);
/* back->sendbuffer() does the same thing but without attempting a send */
GLOBAL int default_protocol;
GLOBAL int default_port;
-/* This variable, OTOH, needs to be made non-global ASAP. FIXME. */
-GLOBAL Config cfg;
-
struct RSAKey; /* be a little careful of scope */
/*
void term_nopaste(Terminal *);
int term_ldisc(Terminal *, int option);
void term_copyall(Terminal *);
-void term_reconfig(Terminal *);
+void term_reconfig(Terminal *, Config *);
void term_seen_key_event(Terminal *);
int from_backend(void *, int is_stderr, char *data, int len);
void term_provide_resize_fn(Terminal *term,
/*
* Exports from logging.c.
*/
-void *log_init(void *frontend);
+void *log_init(void *frontend, Config *cfg);
+void log_reconfig(void *logctx, Config *cfg);
void logfopen(void *logctx);
void logfclose(void *logctx);
void logtraffic(void *logctx, unsigned char c, int logmode);
* defined differently in various places and required _by_
* cmdline.c).
*/
-int cmdline_process_param(char *, char *, int);
-void cmdline_run_saved(void);
+int cmdline_process_param(char *, char *, int, Config *);
+void cmdline_run_saved(Config *);
extern char *cmdline_password;
#define TOOLTYPE_FILETRANSFER 1
extern int cmdline_tooltype;