#include "includes.h"
#include "signkey.h"
#include "buffer.h"
+#include "auth.h"
+#include "tcpfwd.h"
-struct RunOpts {
+typedef struct runopts {
+
+ int nolocaltcp;
+ int noremotetcp;
+
+} 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;
/* ports is an array of the portcount listening ports */
- uint16_t *ports;
+ char *ports[DROPBEAR_MAX_PORTS];
unsigned int portcount;
+ int inetdmode;
+
/* Flags indicating whether to use ipv4 and ipv6 */
/* not used yet
int ipv4;
int ipv6;
*/
-
+
+#ifdef DO_MOTD
+ /* whether to print the MOTD */
+ int domotd;
+#endif
+
+ int norootlogin;
+
+ int noauthpass;
+ int norootpass;
+
sign_key *hostkey;
buffer * banner;
-};
+} svr_runopts;
+
+extern svr_runopts svr_opts;
+
+void svr_getopts(int argc, char ** argv);
+void loadhostkeys();
+
+/* Uncompleted XXX matt */
+typedef struct cli_runopts {
+
+ char *progname;
+ char *remotehost;
+ char *remoteport;
+
+ char *username;
-typedef struct RunOpts runopts;
+ char *cmd;
+ int wantpty;
+#ifdef ENABLE_CLI_PUBKEY_AUTH
+ struct SignKeyList *privkeys; /* Keys to use for public-key auth */
+#endif
+#ifdef ENABLE_CLI_REMOTETCPFWD
+ struct TCPFwdList * remotefwds;
+#endif
+#ifdef ENABLE_CLI_LOCALTCPFWD
+ struct TCPFwdList * localfwds;
+#endif
+ /* XXX TODO */
-// BRCM begin
-runopts * getrunopts(void);
-// BRCM end
+} cli_runopts;
-void freerunopts(runopts* opts);
+extern cli_runopts cli_opts;
+void cli_getopts(int argc, char ** argv);
#endif /* _RUNOPTS_H_ */