runopts.h
#ifndef _RUNOPTS_H_
#define _RUNOPTS_H_
#include "includes.h"
#include "signkey.h"
#include "buffer.h"
#include "auth.h"
#include "tcpfwd.h"
typedef struct runopts {
#if defined(ENABLE_SVR_REMOTETCPFWD) || defined(ENABLE_CLI_LOCALTCPFWD)
int listen_fwd_all;
#endif
unsigned int recv_window;
unsigned int keepalive_secs;
unsigned int idle_timeout_secs;
} runopts;
extern runopts opts;
int readhostkey(const char * filename, sign_key * hostkey, int *type);
typedef struct svr_runopts {
char * rsakeyfile;
char * dsskeyfile;
char * bannerfile;
int forkbg;
int usingsyslog;
char *ports[DROPBEAR_MAX_PORTS];
unsigned int portcount;
char *addresses[DROPBEAR_MAX_PORTS];
int inetdmode;
#ifdef DO_MOTD
int domotd;
#endif
int norootlogin;
int noauthpass;
int norootpass;
#ifdef ENABLE_SVR_REMOTETCPFWD
int noremotetcp;
#endif
#ifdef ENABLE_SVR_LOCALTCPFWD
int nolocaltcp;
#endif
sign_key *hostkey;
buffer * banner;
char * pidfile;
} svr_runopts;
extern svr_runopts svr_opts;
void svr_getopts(int argc, char ** argv);
void loadhostkeys();
typedef struct cli_runopts {
char *progname;
char *remotehost;
char *remoteport;
char *own_user;
char *username;
char *cmd;
int wantpty;
int always_accept_key;
int no_cmd;
int backgrounded;
int is_subsystem;
#ifdef ENABLE_CLI_PUBKEY_AUTH
struct SignKeyList *privkeys;
#endif
#ifdef ENABLE_CLI_REMOTETCPFWD
struct TCPFwdList * remotefwds;
#endif
#ifdef ENABLE_CLI_LOCALTCPFWD
struct TCPFwdList * localfwds;
#endif
#ifdef ENABLE_CLI_NETCAT
char *netcat_host;
unsigned int netcat_port;
#endif
#ifdef ENABLE_CLI_PROXYCMD
char *proxycmd;
#endif
} cli_runopts;
extern cli_runopts cli_opts;
void cli_getopts(int argc, char ** argv);
#endif