/* Gconnect - codename:Blue Sky Effort (C)  2003 l0rdloki@digitalsynapse-ks.com 
 *
 * Original copyright notice for Proxytunnel - (C) 2001-2002 Jos Visser / Mark Janssen
 * Contact:                  josv@osp.nl / maniac@maniac.nl 
*/

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef _cmdline_h
#define _cmdline_h

struct gengetopt_args_info 
{
  char *user_arg;	/* Username to send to HTTPS proxy for auth. */
  char *pass_arg;	/* Password to send to HTTPS proxy for auth. */
  char *proxyhost_arg;	/* HTTPS Proxy host to connect to. */
  int proxyport_arg;	/* HTTPS Proxy host portnumber to connect to. */
  char *desthost_arg;	/* Destination host to built the tunnel to. */
  int destport_arg;	/* Dest host portnumber to built the tunnel to. */
  int dottedquad_flag;	/* Resolve hostname to dottedquad notation. */
  int verbose_flag;	/* Turn on verbosity (default=off). */
  int quiet_flag;	/* Turn on quiet mode (default=off). */
  int standalone_arg;	/* Forking flag (-f) on port */
  int sslClientmode_flag;    /* Communicate via ssl (-c) client mode */
  int sslServermode_flag;    /* Make it a ssl server (-s) */
  unsigned sslLocalIp_arg;      /* Local IP address */ 
  int sslLocalPort_arg;      /* Local port */
  unsigned int sslRedirectIp_arg;   /* Redirector Address */
  int sslRedirectPort_arg;   /* Redirector port */
  char *certFile_arg;        /* Certificate */
  char *sslProto_arg;        /* SSL Protocol */
  char *keyFile_arg;          /* Key Certificate */
  char *verifyFile_arg;       /* Key Certificate */
  char *verifyDir_arg;       /* Key Certificate */
  int peerCert_flag;         /* Peer Certificate */
  int  verifyFile_given;      /* Is the Key Certificate given */
  int  verifyDir_given;      /* Is the Key Certificate given */
  int  peerCert_given;        /* Is the Peer Certificate given */
  int  keyFile_given;         /* Is the Key Certificate given */
  int help_given;	/* Whether help was given. */
  int version_given;	/* Whether version was given. */
  int user_given;	/* Whether user was given. */
  int pass_given;	/* Whether pass was given. */
  int proxyhost_given;	/* Whether proxyhost was given. */
  int proxyport_given;	/* Whether proxyport was given. */
  int desthost_given;	/* Whether desthost was given. */
  int destport_given;	/* Whether destport was given. */
  int dottedquad_given;	/* Whether dottedquad was given. */
  int verbose_given;	/* Whether verbose was given. */
  int quiet_given;	/* Whether quiet mode was given. */
  int sslClientmode_given;   /* Indicate clientmode was given */
  int sslServermode_given;   /* Indicate servermode was given */
  int sslLocalIp_given;      /* Indicate localaddress was given */
  int sslLocalPort_given;    /* Indicate localport was given */
  int sslRedirectIp_given;   /* Indicate redirector address was given */
  int sslRedirectPort_given; /* Indicate redirect port was given */
  int certFile_given;        /* Certificate */
  int sslProto_given;        /* SSL Protocol */
  int standalone_given;        /* Forking Flag */
};

int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *args_info );
void cmdline_parser_print_help( void );
void cmdline_parser_print_version( void );

#endif /* _cmdline_h */
