+ static char *cmdstr = "";
+ const char *server;
+ struct cli_state *cli;
+ fstring password="",
+ username="",
+ domain="";
+ static char *opt_authfile=NULL,
+ *opt_username=NULL,
+ *opt_domain=NULL,
+ *opt_configfile=NULL,
+ *opt_logfile=NULL,
+ *opt_ipaddr=NULL;
+ pstring logfile;
+ struct cmd_set **cmd_set;
+ struct in_addr server_ip;
+ NTSTATUS nt_status;
+ extern BOOL AllowDebugChange;
+
+ /* make sure the vars that get altered (4th field) are in
+ a fixed location or certain compilers complain */
+ poptContext pc;
+ struct poptOption long_options[] = {
+ POPT_AUTOHELP
+ {"authfile", 'A', POPT_ARG_STRING, &opt_authfile, 'A', "File containing user credentials"},
+ {"conf", 's', POPT_ARG_STRING, &opt_configfile, 's', "Specify an alternative config file"},
+ {"nopass", 'N', POPT_ARG_NONE, &got_pass, 'N', "Don't ask for a password"},
+ {"user", 'U', POPT_ARG_STRING, &opt_username, 'U', "Set the network username"},
+ {"workgroup", 'W', POPT_ARG_STRING, &opt_domain, 'W', "Set the domain name for user account"},
+ {"command", 'c', POPT_ARG_STRING, &cmdstr, 'c', "Execute semicolon separated cmds"},
+ {"logfile", 'l', POPT_ARG_STRING, &opt_logfile, 'l', "Logfile to use instead of stdout"},
+ {"dest-ip", 'I', POPT_ARG_STRING, &opt_ipaddr, 'I', "Specify destination IP address"},
+ { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug },
+ { NULL }
+ };
+