File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / coova-chilli / src / cmdline.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 22:48:25 2012 UTC (13 years, 1 month ago) by misho
Branches: coova-chilli, MAIN
CVS tags: v1_0_12, HEAD
coova-chilli

    1: /** @file cmdline.h
    2:  *  @brief The header file for the command line option parser
    3:  *  generated by GNU Gengetopt version 2.22
    4:  *  http://www.gnu.org/software/gengetopt.
    5:  *  DO NOT modify this file, since it can be overwritten
    6:  *  @author GNU Gengetopt by Lorenzo Bettini */
    7: 
    8: #ifndef CMDLINE_H
    9: #define CMDLINE_H
   10: 
   11: /* If we use autoconf.  */
   12: #ifdef HAVE_CONFIG_H
   13: #include "config.h"
   14: #endif
   15: 
   16: #include <stdio.h> /* for FILE */
   17: 
   18: #ifdef __cplusplus
   19: extern "C" {
   20: #endif /* __cplusplus */
   21: 
   22: #ifndef CMDLINE_PARSER_PACKAGE
   23: /** @brief the program name */
   24: #define CMDLINE_PARSER_PACKAGE PACKAGE
   25: #endif
   26: 
   27: #ifndef CMDLINE_PARSER_VERSION
   28: /** @brief the program version */
   29: #define CMDLINE_PARSER_VERSION VERSION
   30: #endif
   31: 
   32: /** @brief Where the command line options are stored */
   33: struct gengetopt_args_info
   34: {
   35:   const char *help_help; /**< @brief Print help and exit help description.  */
   36:   const char *version_help; /**< @brief Print version and exit help description.  */
   37:   int fg_flag;	/**< @brief Run in foreground (default=off).  */
   38:   const char *fg_help; /**< @brief Run in foreground help description.  */
   39:   int debug_flag;	/**< @brief Run in debug mode (default=off).  */
   40:   const char *debug_help; /**< @brief Run in debug mode help description.  */
   41:   int debugfacility_arg;	/**< @brief Which modules to print debug messages for (default='1').  */
   42:   char * debugfacility_orig;	/**< @brief Which modules to print debug messages for original value given at command line.  */
   43:   const char *debugfacility_help; /**< @brief Which modules to print debug messages for help description.  */
   44:   int logfacility_arg;	/**< @brief Syslog facility to be used for logging (default='-1').  */
   45:   char * logfacility_orig;	/**< @brief Syslog facility to be used for logging original value given at command line.  */
   46:   const char *logfacility_help; /**< @brief Syslog facility to be used for logging help description.  */
   47:   char * conf_arg;	/**< @brief Read configuration file.  */
   48:   char * conf_orig;	/**< @brief Read configuration file original value given at command line.  */
   49:   const char *conf_help; /**< @brief Read configuration file help description.  */
   50:   int interval_arg;	/**< @brief Re-read configuration file at this interval (default='3600').  */
   51:   char * interval_orig;	/**< @brief Re-read configuration file at this interval original value given at command line.  */
   52:   const char *interval_help; /**< @brief Re-read configuration file at this interval help description.  */
   53:   char * pidfile_arg;	/**< @brief Filename of process id file.  */
   54:   char * pidfile_orig;	/**< @brief Filename of process id file original value given at command line.  */
   55:   const char *pidfile_help; /**< @brief Filename of process id file help description.  */
   56:   char * statedir_arg;	/**< @brief Directory of nonvolatile data.  */
   57:   char * statedir_orig;	/**< @brief Directory of nonvolatile data original value given at command line.  */
   58:   const char *statedir_help; /**< @brief Directory of nonvolatile data help description.  */
   59:   char * net_arg;	/**< @brief Network (default='192.168.182.0/24').  */
   60:   char * net_orig;	/**< @brief Network original value given at command line.  */
   61:   const char *net_help; /**< @brief Network help description.  */
   62:   int dhcpstart_arg;	/**< @brief Network DHCP Starting IP (default='0').  */
   63:   char * dhcpstart_orig;	/**< @brief Network DHCP Starting IP original value given at command line.  */
   64:   const char *dhcpstart_help; /**< @brief Network DHCP Starting IP help description.  */
   65:   int dhcpend_arg;	/**< @brief Network DHCP Ending IP (default='0').  */
   66:   char * dhcpend_orig;	/**< @brief Network DHCP Ending IP original value given at command line.  */
   67:   const char *dhcpend_help; /**< @brief Network DHCP Ending IP help description.  */
   68:   char * dynip_arg;	/**< @brief Dynamic IP address pool.  */
   69:   char * dynip_orig;	/**< @brief Dynamic IP address pool original value given at command line.  */
   70:   const char *dynip_help; /**< @brief Dynamic IP address pool help description.  */
   71:   int nodynip_flag;	/**< @brief No Dynamic IP assignment (default=off).  */
   72:   const char *nodynip_help; /**< @brief No Dynamic IP assignment help description.  */
   73:   char * statip_arg;	/**< @brief Static IP address pool.  */
   74:   char * statip_orig;	/**< @brief Static IP address pool original value given at command line.  */
   75:   const char *statip_help; /**< @brief Static IP address pool help description.  */
   76:   char * dns1_arg;	/**< @brief Primary DNS server IP address.  */
   77:   char * dns1_orig;	/**< @brief Primary DNS server IP address original value given at command line.  */
   78:   const char *dns1_help; /**< @brief Primary DNS server IP address help description.  */
   79:   char * dns2_arg;	/**< @brief Secondary DNS server IP address.  */
   80:   char * dns2_orig;	/**< @brief Secondary DNS server IP address original value given at command line.  */
   81:   const char *dns2_help; /**< @brief Secondary DNS server IP address help description.  */
   82:   char * domain_arg;	/**< @brief Domain to use for DNS lookups (default='coova.org').  */
   83:   char * domain_orig;	/**< @brief Domain to use for DNS lookups original value given at command line.  */
   84:   const char *domain_help; /**< @brief Domain to use for DNS lookups help description.  */
   85:   char * ipup_arg;	/**< @brief Script to run after link-up.  */
   86:   char * ipup_orig;	/**< @brief Script to run after link-up original value given at command line.  */
   87:   const char *ipup_help; /**< @brief Script to run after link-up help description.  */
   88:   char * ipdown_arg;	/**< @brief Script to run after link-down.  */
   89:   char * ipdown_orig;	/**< @brief Script to run after link-down original value given at command line.  */
   90:   const char *ipdown_help; /**< @brief Script to run after link-down help description.  */
   91:   char * conup_arg;	/**< @brief Script to run after user logon.  */
   92:   char * conup_orig;	/**< @brief Script to run after user logon original value given at command line.  */
   93:   const char *conup_help; /**< @brief Script to run after user logon help description.  */
   94:   char * condown_arg;	/**< @brief Script to run after user logoff.  */
   95:   char * condown_orig;	/**< @brief Script to run after user logoff original value given at command line.  */
   96:   const char *condown_help; /**< @brief Script to run after user logoff help description.  */
   97:   int txqlen_arg;	/**< @brief TX Queue length for tun interface (linux only) (default='100').  */
   98:   char * txqlen_orig;	/**< @brief TX Queue length for tun interface (linux only) original value given at command line.  */
   99:   const char *txqlen_help; /**< @brief TX Queue length for tun interface (linux only) help description.  */
  100:   char * tundev_arg;	/**< @brief TUN/TAP Device, as in tun0 or tap1.  */
  101:   char * tundev_orig;	/**< @brief TUN/TAP Device, as in tun0 or tap1 original value given at command line.  */
  102:   const char *tundev_help; /**< @brief TUN/TAP Device, as in tun0 or tap1 help description.  */
  103:   char * radiuslisten_arg;	/**< @brief IP address to send from.  */
  104:   char * radiuslisten_orig;	/**< @brief IP address to send from original value given at command line.  */
  105:   const char *radiuslisten_help; /**< @brief IP address to send from help description.  */
  106:   char * radiusserver1_arg;	/**< @brief IP address of radius server 1 (default='rad01.coova.org').  */
  107:   char * radiusserver1_orig;	/**< @brief IP address of radius server 1 original value given at command line.  */
  108:   const char *radiusserver1_help; /**< @brief IP address of radius server 1 help description.  */
  109:   char * radiusserver2_arg;	/**< @brief IP address of radius server 2 (default='rad01.coova.org').  */
  110:   char * radiusserver2_orig;	/**< @brief IP address of radius server 2 original value given at command line.  */
  111:   const char *radiusserver2_help; /**< @brief IP address of radius server 2 help description.  */
  112:   int radiusauthport_arg;	/**< @brief Authentication UDP port of radius server (default='1812').  */
  113:   char * radiusauthport_orig;	/**< @brief Authentication UDP port of radius server original value given at command line.  */
  114:   const char *radiusauthport_help; /**< @brief Authentication UDP port of radius server help description.  */
  115:   int radiusacctport_arg;	/**< @brief Accounting UDP port of radius server (default='1813').  */
  116:   char * radiusacctport_orig;	/**< @brief Accounting UDP port of radius server original value given at command line.  */
  117:   const char *radiusacctport_help; /**< @brief Accounting UDP port of radius server help description.  */
  118:   char * radiussecret_arg;	/**< @brief Radius shared secret (default='coova-anonymous').  */
  119:   char * radiussecret_orig;	/**< @brief Radius shared secret original value given at command line.  */
  120:   const char *radiussecret_help; /**< @brief Radius shared secret help description.  */
  121:   int radiustimeout_arg;	/**< @brief Retry timeout in seconds (default='30').  */
  122:   char * radiustimeout_orig;	/**< @brief Retry timeout in seconds original value given at command line.  */
  123:   const char *radiustimeout_help; /**< @brief Retry timeout in seconds help description.  */
  124:   int radiusretry_arg;	/**< @brief Total number of retries (default='6').  */
  125:   char * radiusretry_orig;	/**< @brief Total number of retries original value given at command line.  */
  126:   const char *radiusretry_help; /**< @brief Total number of retries help description.  */
  127:   int radiusretrysec_arg;	/**< @brief Number of retries before using secondary (default='3').  */
  128:   char * radiusretrysec_orig;	/**< @brief Number of retries before using secondary original value given at command line.  */
  129:   const char *radiusretrysec_help; /**< @brief Number of retries before using secondary help description.  */
  130:   char * radiusnasid_arg;	/**< @brief Radius NAS-Identifier (default='nas01').  */
  131:   char * radiusnasid_orig;	/**< @brief Radius NAS-Identifier original value given at command line.  */
  132:   const char *radiusnasid_help; /**< @brief Radius NAS-Identifier help description.  */
  133:   char * radiuslocationid_arg;	/**< @brief WISPr Location ID.  */
  134:   char * radiuslocationid_orig;	/**< @brief WISPr Location ID original value given at command line.  */
  135:   const char *radiuslocationid_help; /**< @brief WISPr Location ID help description.  */
  136:   char * radiuslocationname_arg;	/**< @brief WISPr Location Name.  */
  137:   char * radiuslocationname_orig;	/**< @brief WISPr Location Name original value given at command line.  */
  138:   const char *radiuslocationname_help; /**< @brief WISPr Location Name help description.  */
  139:   char * locationname_arg;	/**< @brief Location Name.  */
  140:   char * locationname_orig;	/**< @brief Location Name original value given at command line.  */
  141:   const char *locationname_help; /**< @brief Location Name help description.  */
  142:   int radiusnasporttype_arg;	/**< @brief Radius NAS-Port-Type (default='19').  */
  143:   char * radiusnasporttype_orig;	/**< @brief Radius NAS-Port-Type original value given at command line.  */
  144:   const char *radiusnasporttype_help; /**< @brief Radius NAS-Port-Type help description.  */
  145:   int coaport_arg;	/**< @brief Radius disconnect port to listen to (default='0').  */
  146:   char * coaport_orig;	/**< @brief Radius disconnect port to listen to original value given at command line.  */
  147:   const char *coaport_help; /**< @brief Radius disconnect port to listen to help description.  */
  148:   int coanoipcheck_flag;	/**< @brief Allow radius disconnect from any IP (default=off).  */
  149:   const char *coanoipcheck_help; /**< @brief Allow radius disconnect from any IP help description.  */
  150:   char * proxylisten_arg;	/**< @brief IP address to listen to.  */
  151:   char * proxylisten_orig;	/**< @brief IP address to listen to original value given at command line.  */
  152:   const char *proxylisten_help; /**< @brief IP address to listen to help description.  */
  153:   int proxyport_arg;	/**< @brief UDP port to listen to (default='0').  */
  154:   char * proxyport_orig;	/**< @brief UDP port to listen to original value given at command line.  */
  155:   const char *proxyport_help; /**< @brief UDP port to listen to help description.  */
  156:   char * proxyclient_arg;	/**< @brief IP address of proxy client(s).  */
  157:   char * proxyclient_orig;	/**< @brief IP address of proxy client(s) original value given at command line.  */
  158:   const char *proxyclient_help; /**< @brief IP address of proxy client(s) help description.  */
  159:   char * proxysecret_arg;	/**< @brief Radius proxy shared secret.  */
  160:   char * proxysecret_orig;	/**< @brief Radius proxy shared secret original value given at command line.  */
  161:   const char *proxysecret_help; /**< @brief Radius proxy shared secret help description.  */
  162:   char * dhcpif_arg;	/**< @brief Local Ethernet interface.  */
  163:   char * dhcpif_orig;	/**< @brief Local Ethernet interface original value given at command line.  */
  164:   const char *dhcpif_help; /**< @brief Local Ethernet interface help description.  */
  165:   char * dhcpmac_arg;	/**< @brief Interface MAC address.  */
  166:   char * dhcpmac_orig;	/**< @brief Interface MAC address original value given at command line.  */
  167:   const char *dhcpmac_help; /**< @brief Interface MAC address help description.  */
  168:   int dhcpradius_flag;	/**< @brief Map certain DHCP options to RADIUS attributes (default=off).  */
  169:   const char *dhcpradius_help; /**< @brief Map certain DHCP options to RADIUS attributes help description.  */
  170:   char * dhcpgateway_arg;	/**< @brief DHCP gateway addresss for relay.  */
  171:   char * dhcpgateway_orig;	/**< @brief DHCP gateway addresss for relay original value given at command line.  */
  172:   const char *dhcpgateway_help; /**< @brief DHCP gateway addresss for relay help description.  */
  173:   int dhcpgatewayport_arg;	/**< @brief DHCP gateway port for relay (default='67').  */
  174:   char * dhcpgatewayport_orig;	/**< @brief DHCP gateway port for relay original value given at command line.  */
  175:   const char *dhcpgatewayport_help; /**< @brief DHCP gateway port for relay help description.  */
  176:   char * dhcprelayagent_arg;	/**< @brief DHCP relay agent IP addresss (default uamlisten).  */
  177:   char * dhcprelayagent_orig;	/**< @brief DHCP relay agent IP addresss (default uamlisten) original value given at command line.  */
  178:   const char *dhcprelayagent_help; /**< @brief DHCP relay agent IP addresss (default uamlisten) help description.  */
  179:   int lease_arg;	/**< @brief Lease time to allocate to clients (default='600').  */
  180:   char * lease_orig;	/**< @brief Lease time to allocate to clients original value given at command line.  */
  181:   const char *lease_help; /**< @brief Lease time to allocate to clients help description.  */
  182:   int eapolenable_flag;	/**< @brief Enable IEEE 802.1x authentication (default=off).  */
  183:   const char *eapolenable_help; /**< @brief Enable IEEE 802.1x authentication help description.  */
  184:   char * uamserver_arg;	/**< @brief URL of authentication web server.  */
  185:   char * uamserver_orig;	/**< @brief URL of authentication web server original value given at command line.  */
  186:   const char *uamserver_help; /**< @brief URL of authentication web server help description.  */
  187:   char * uamhomepage_arg;	/**< @brief URL of homepage to redirect unauthenticated users to.  */
  188:   char * uamhomepage_orig;	/**< @brief URL of homepage to redirect unauthenticated users to original value given at command line.  */
  189:   const char *uamhomepage_help; /**< @brief URL of homepage to redirect unauthenticated users to help description.  */
  190:   char * uamsecret_arg;	/**< @brief Shared secret between uamserver and chilli.  */
  191:   char * uamsecret_orig;	/**< @brief Shared secret between uamserver and chilli original value given at command line.  */
  192:   const char *uamsecret_help; /**< @brief Shared secret between uamserver and chilli help description.  */
  193:   char * uamlisten_arg;	/**< @brief IP address to listen to for authentication requests.  */
  194:   char * uamlisten_orig;	/**< @brief IP address to listen to for authentication requests original value given at command line.  */
  195:   const char *uamlisten_help; /**< @brief IP address to listen to for authentication requests help description.  */
  196:   int uamport_arg;	/**< @brief TCP port to bind to for authentication requests (default='3990').  */
  197:   char * uamport_orig;	/**< @brief TCP port to bind to for authentication requests original value given at command line.  */
  198:   const char *uamport_help; /**< @brief TCP port to bind to for authentication requests help description.  */
  199:   int uamuiport_arg;	/**< @brief TCP port to bind to for UAM UI requests (default='3991').  */
  200:   char * uamuiport_orig;	/**< @brief TCP port to bind to for UAM UI requests original value given at command line.  */
  201:   const char *uamuiport_help; /**< @brief TCP port to bind to for UAM UI requests help description.  */
  202:   char ** uamallowed_arg;	/**< @brief Domain names exempt from access check .  */
  203:   char ** uamallowed_orig;	/**< @brief Domain names exempt from access check  original value given at command line.  */
  204:   int uamallowed_min; /**< @brief Domain names exempt from access check 's minimum occurreces */
  205:   int uamallowed_max; /**< @brief Domain names exempt from access check 's maximum occurreces */
  206:   const char *uamallowed_help; /**< @brief Domain names exempt from access check  help description.  */
  207:   char ** uamdomain_arg;	/**< @brief Domain name allowed (active dns filtering; one per line!) .  */
  208:   char ** uamdomain_orig;	/**< @brief Domain name allowed (active dns filtering; one per line!)  original value given at command line.  */
  209:   int uamdomain_min; /**< @brief Domain name allowed (active dns filtering; one per line!) 's minimum occurreces */
  210:   int uamdomain_max; /**< @brief Domain name allowed (active dns filtering; one per line!) 's maximum occurreces */
  211:   const char *uamdomain_help; /**< @brief Domain name allowed (active dns filtering; one per line!)  help description.  */
  212:   int uamanydns_flag;	/**< @brief Allow client to use any DNS server (default=off).  */
  213:   const char *uamanydns_help; /**< @brief Allow client to use any DNS server help description.  */
  214:   int uamanyip_flag;	/**< @brief Allow client to use any IP Address (default=off).  */
  215:   const char *uamanyip_help; /**< @brief Allow client to use any IP Address help description.  */
  216:   char * wisprlogin_arg;	/**< @brief A specific WISPr login url to be used.  */
  217:   char * wisprlogin_orig;	/**< @brief A specific WISPr login url to be used original value given at command line.  */
  218:   const char *wisprlogin_help; /**< @brief A specific WISPr login url to be used help description.  */
  219:   int nouamsuccess_flag;	/**< @brief Do not return to the UAM server on success, original url instead (default=off).  */
  220:   const char *nouamsuccess_help; /**< @brief Do not return to the UAM server on success, original url instead help description.  */
  221:   int nouamwispr_flag;	/**< @brief Do not send WISPr XML from ChilliSpot, assume back-end does (default=off).  */
  222:   const char *nouamwispr_help; /**< @brief Do not send WISPr XML from ChilliSpot, assume back-end does help description.  */
  223:   char * uamlogoutip_arg;	/**< @brief HTTP Auto-Logout IP Address (default='1.1.1.1').  */
  224:   char * uamlogoutip_orig;	/**< @brief HTTP Auto-Logout IP Address original value given at command line.  */
  225:   const char *uamlogoutip_help; /**< @brief HTTP Auto-Logout IP Address help description.  */
  226:   long defsessiontimeout_arg;	/**< @brief Default session-timeout if not returned by RADIUS (default='0').  */
  227:   char * defsessiontimeout_orig;	/**< @brief Default session-timeout if not returned by RADIUS original value given at command line.  */
  228:   const char *defsessiontimeout_help; /**< @brief Default session-timeout if not returned by RADIUS help description.  */
  229:   int defidletimeout_arg;	/**< @brief Default idle-timeout if not returned by RADIUS (default='0').  */
  230:   char * defidletimeout_orig;	/**< @brief Default idle-timeout if not returned by RADIUS original value given at command line.  */
  231:   const char *defidletimeout_help; /**< @brief Default idle-timeout if not returned by RADIUS help description.  */
  232:   long defbandwidthmaxdown_arg;	/**< @brief Default WISPr-Bandwidth-Max-Down if not returned by RADIUS (default='0').  */
  233:   char * defbandwidthmaxdown_orig;	/**< @brief Default WISPr-Bandwidth-Max-Down if not returned by RADIUS original value given at command line.  */
  234:   const char *defbandwidthmaxdown_help; /**< @brief Default WISPr-Bandwidth-Max-Down if not returned by RADIUS help description.  */
  235:   long defbandwidthmaxup_arg;	/**< @brief Default WISPr-Bandwidth-Max-Up if not returned by RADIUS (default='0').  */
  236:   char * defbandwidthmaxup_orig;	/**< @brief Default WISPr-Bandwidth-Max-Up if not returned by RADIUS original value given at command line.  */
  237:   const char *defbandwidthmaxup_help; /**< @brief Default WISPr-Bandwidth-Max-Up if not returned by RADIUS help description.  */
  238:   int definteriminterval_arg;	/**< @brief Default interim-interval for accounting if not returned by RADIUS (default='300').  */
  239:   char * definteriminterval_orig;	/**< @brief Default interim-interval for accounting if not returned by RADIUS original value given at command line.  */
  240:   const char *definteriminterval_help; /**< @brief Default interim-interval for accounting if not returned by RADIUS help description.  */
  241:   int macauth_flag;	/**< @brief Authenticate based on MAC address (default=off).  */
  242:   const char *macauth_help; /**< @brief Authenticate based on MAC address help description.  */
  243:   int macauthdeny_flag;	/**< @brief Deny access (even UAM) to MAC addresses given Access-Reject (default=off).  */
  244:   const char *macauthdeny_help; /**< @brief Deny access (even UAM) to MAC addresses given Access-Reject help description.  */
  245:   char ** macallowed_arg;	/**< @brief List of allowed MAC addresses.  */
  246:   char ** macallowed_orig;	/**< @brief List of allowed MAC addresses original value given at command line.  */
  247:   int macallowed_min; /**< @brief List of allowed MAC addresses's minimum occurreces */
  248:   int macallowed_max; /**< @brief List of allowed MAC addresses's maximum occurreces */
  249:   const char *macallowed_help; /**< @brief List of allowed MAC addresses help description.  */
  250:   char * macsuffix_arg;	/**< @brief Suffix to add to the MAC address.  */
  251:   char * macsuffix_orig;	/**< @brief Suffix to add to the MAC address original value given at command line.  */
  252:   const char *macsuffix_help; /**< @brief Suffix to add to the MAC address help description.  */
  253:   char * macpasswd_arg;	/**< @brief Password used when performing MAC authentication.  */
  254:   char * macpasswd_orig;	/**< @brief Password used when performing MAC authentication original value given at command line.  */
  255:   const char *macpasswd_help; /**< @brief Password used when performing MAC authentication help description.  */
  256:   int macallowlocal_flag;	/**< @brief Do not use RADIUS for authenticating the macallowed (default=off).  */
  257:   const char *macallowlocal_help; /**< @brief Do not use RADIUS for authenticating the macallowed help description.  */
  258:   char * wwwdir_arg;	/**< @brief Local content served by chilli (for splash page, etc).  */
  259:   char * wwwdir_orig;	/**< @brief Local content served by chilli (for splash page, etc) original value given at command line.  */
  260:   const char *wwwdir_help; /**< @brief Local content served by chilli (for splash page, etc) help description.  */
  261:   char * wwwbin_arg;	/**< @brief Script binary (such as haserl) for simple web programming.  */
  262:   char * wwwbin_orig;	/**< @brief Script binary (such as haserl) for simple web programming original value given at command line.  */
  263:   const char *wwwbin_help; /**< @brief Script binary (such as haserl) for simple web programming help description.  */
  264:   char * uamui_arg;	/**< @brief Program in inetd style to handle all uam requests.  */
  265:   char * uamui_orig;	/**< @brief Program in inetd style to handle all uam requests original value given at command line.  */
  266:   const char *uamui_help; /**< @brief Program in inetd style to handle all uam requests help description.  */
  267:   char * adminuser_arg;	/**< @brief RADIUS administrative user login username (default='chillispot').  */
  268:   char * adminuser_orig;	/**< @brief RADIUS administrative user login username original value given at command line.  */
  269:   const char *adminuser_help; /**< @brief RADIUS administrative user login username help description.  */
  270:   char * adminpasswd_arg;	/**< @brief RADIUS administrative user login password (default='chillispot').  */
  271:   char * adminpasswd_orig;	/**< @brief RADIUS administrative user login password original value given at command line.  */
  272:   const char *adminpasswd_help; /**< @brief RADIUS administrative user login password help description.  */
  273:   char * nasmac_arg;	/**< @brief Unique MAC address of the NAS (called-station-id).  */
  274:   char * nasmac_orig;	/**< @brief Unique MAC address of the NAS (called-station-id) original value given at command line.  */
  275:   const char *nasmac_help; /**< @brief Unique MAC address of the NAS (called-station-id) help description.  */
  276:   char * nasip_arg;	/**< @brief Unique IP address of the NAS (nas-ip-address).  */
  277:   char * nasip_orig;	/**< @brief Unique IP address of the NAS (nas-ip-address) original value given at command line.  */
  278:   const char *nasip_help; /**< @brief Unique IP address of the NAS (nas-ip-address) help description.  */
  279:   char * ssid_arg;	/**< @brief SSID of the session.  */
  280:   char * ssid_orig;	/**< @brief SSID of the session original value given at command line.  */
  281:   const char *ssid_help; /**< @brief SSID of the session help description.  */
  282:   char * vlan_arg;	/**< @brief VLAN of the session.  */
  283:   char * vlan_orig;	/**< @brief VLAN of the session original value given at command line.  */
  284:   const char *vlan_help; /**< @brief VLAN of the session help description.  */
  285:   char * cmdsocket_arg;	/**< @brief path to the command unix socket.  */
  286:   char * cmdsocket_orig;	/**< @brief path to the command unix socket original value given at command line.  */
  287:   const char *cmdsocket_help; /**< @brief path to the command unix socket help description.  */
  288:   int radiusoriginalurl_flag;	/**< @brief Turn on the sending of ChilliSpot-OriginalURL in Access-Request (default=off).  */
  289:   const char *radiusoriginalurl_help; /**< @brief Turn on the sending of ChilliSpot-OriginalURL in Access-Request help description.  */
  290:   int swapoctets_flag;	/**< @brief Swap the meaning of input/output octets/packets (default=off).  */
  291:   const char *swapoctets_help; /**< @brief Swap the meaning of input/output octets/packets help description.  */
  292:   int usestatusfile_flag;	/**< @brief Use the status file to keep track of sessions (default=off).  */
  293:   const char *usestatusfile_help; /**< @brief Use the status file to keep track of sessions help description.  */
  294:   char * localusers_arg;	/**< @brief File keep 'Local' usernames and passwords.  */
  295:   char * localusers_orig;	/**< @brief File keep 'Local' usernames and passwords original value given at command line.  */
  296:   const char *localusers_help; /**< @brief File keep 'Local' usernames and passwords help description.  */
  297:   char * postauthproxy_arg;	/**< @brief IP of an upstream transparent proxy.  */
  298:   char * postauthproxy_orig;	/**< @brief IP of an upstream transparent proxy original value given at command line.  */
  299:   const char *postauthproxy_help; /**< @brief IP of an upstream transparent proxy help description.  */
  300:   int postauthproxyport_arg;	/**< @brief Port of an upstream transparent proxy (default='0').  */
  301:   char * postauthproxyport_orig;	/**< @brief Port of an upstream transparent proxy original value given at command line.  */
  302:   const char *postauthproxyport_help; /**< @brief Port of an upstream transparent proxy help description.  */
  303:   int wpaguests_flag;	/**< @brief Allow WPA 'Guest' access (default=off).  */
  304:   const char *wpaguests_help; /**< @brief Allow WPA 'Guest' access help description.  */
  305:   int openidauth_flag;	/**< @brief Allow OpenID authentication (default=off).  */
  306:   const char *openidauth_help; /**< @brief Allow OpenID authentication help description.  */
  307:   int papalwaysok_flag;	/**< @brief Always allow 'PAP' authentication (depreciated; always on) (default=off).  */
  308:   const char *papalwaysok_help; /**< @brief Always allow 'PAP' authentication (depreciated; always on) help description.  */
  309:   int chillixml_flag;	/**< @brief Use ChilliSpot XML in WISPr blocks (default=off).  */
  310:   const char *chillixml_help; /**< @brief Use ChilliSpot XML in WISPr blocks help description.  */
  311:   int acctupdate_flag;	/**< @brief Allow updating of session attributes in Accounting-Response (default=off).  */
  312:   const char *acctupdate_help; /**< @brief Allow updating of session attributes in Accounting-Response help description.  */
  313:   int dnsparanoia_flag;	/**< @brief Inspect DNS packets and drop responses with any non- A, CNAME, SOA, or MX records (to prevent dns tunnels) (default=off).  */
  314:   const char *dnsparanoia_help; /**< @brief Inspect DNS packets and drop responses with any non- A, CNAME, SOA, or MX records (to prevent dns tunnels) help description.  */
  315:   int usetap_flag;	/**< @brief Use a TAP instead of TUN (linux only) (default=off).  */
  316:   const char *usetap_help; /**< @brief Use a TAP instead of TUN (linux only) help description.  */
  317:   char * routeif_arg;	/**< @brief Interface to use as default route; turns on 'manual' routing.  */
  318:   char * routeif_orig;	/**< @brief Interface to use as default route; turns on 'manual' routing original value given at command line.  */
  319:   const char *routeif_help; /**< @brief Interface to use as default route; turns on 'manual' routing help description.  */
  320:   
  321:   unsigned int help_given ;	/**< @brief Whether help was given.  */
  322:   unsigned int version_given ;	/**< @brief Whether version was given.  */
  323:   unsigned int fg_given ;	/**< @brief Whether fg was given.  */
  324:   unsigned int debug_given ;	/**< @brief Whether debug was given.  */
  325:   unsigned int debugfacility_given ;	/**< @brief Whether debugfacility was given.  */
  326:   unsigned int logfacility_given ;	/**< @brief Whether logfacility was given.  */
  327:   unsigned int conf_given ;	/**< @brief Whether conf was given.  */
  328:   unsigned int interval_given ;	/**< @brief Whether interval was given.  */
  329:   unsigned int pidfile_given ;	/**< @brief Whether pidfile was given.  */
  330:   unsigned int statedir_given ;	/**< @brief Whether statedir was given.  */
  331:   unsigned int net_given ;	/**< @brief Whether net was given.  */
  332:   unsigned int dhcpstart_given ;	/**< @brief Whether dhcpstart was given.  */
  333:   unsigned int dhcpend_given ;	/**< @brief Whether dhcpend was given.  */
  334:   unsigned int dynip_given ;	/**< @brief Whether dynip was given.  */
  335:   unsigned int nodynip_given ;	/**< @brief Whether nodynip was given.  */
  336:   unsigned int statip_given ;	/**< @brief Whether statip was given.  */
  337:   unsigned int dns1_given ;	/**< @brief Whether dns1 was given.  */
  338:   unsigned int dns2_given ;	/**< @brief Whether dns2 was given.  */
  339:   unsigned int domain_given ;	/**< @brief Whether domain was given.  */
  340:   unsigned int ipup_given ;	/**< @brief Whether ipup was given.  */
  341:   unsigned int ipdown_given ;	/**< @brief Whether ipdown was given.  */
  342:   unsigned int conup_given ;	/**< @brief Whether conup was given.  */
  343:   unsigned int condown_given ;	/**< @brief Whether condown was given.  */
  344:   unsigned int txqlen_given ;	/**< @brief Whether txqlen was given.  */
  345:   unsigned int tundev_given ;	/**< @brief Whether tundev was given.  */
  346:   unsigned int radiuslisten_given ;	/**< @brief Whether radiuslisten was given.  */
  347:   unsigned int radiusserver1_given ;	/**< @brief Whether radiusserver1 was given.  */
  348:   unsigned int radiusserver2_given ;	/**< @brief Whether radiusserver2 was given.  */
  349:   unsigned int radiusauthport_given ;	/**< @brief Whether radiusauthport was given.  */
  350:   unsigned int radiusacctport_given ;	/**< @brief Whether radiusacctport was given.  */
  351:   unsigned int radiussecret_given ;	/**< @brief Whether radiussecret was given.  */
  352:   unsigned int radiustimeout_given ;	/**< @brief Whether radiustimeout was given.  */
  353:   unsigned int radiusretry_given ;	/**< @brief Whether radiusretry was given.  */
  354:   unsigned int radiusretrysec_given ;	/**< @brief Whether radiusretrysec was given.  */
  355:   unsigned int radiusnasid_given ;	/**< @brief Whether radiusnasid was given.  */
  356:   unsigned int radiuslocationid_given ;	/**< @brief Whether radiuslocationid was given.  */
  357:   unsigned int radiuslocationname_given ;	/**< @brief Whether radiuslocationname was given.  */
  358:   unsigned int locationname_given ;	/**< @brief Whether locationname was given.  */
  359:   unsigned int radiusnasporttype_given ;	/**< @brief Whether radiusnasporttype was given.  */
  360:   unsigned int coaport_given ;	/**< @brief Whether coaport was given.  */
  361:   unsigned int coanoipcheck_given ;	/**< @brief Whether coanoipcheck was given.  */
  362:   unsigned int proxylisten_given ;	/**< @brief Whether proxylisten was given.  */
  363:   unsigned int proxyport_given ;	/**< @brief Whether proxyport was given.  */
  364:   unsigned int proxyclient_given ;	/**< @brief Whether proxyclient was given.  */
  365:   unsigned int proxysecret_given ;	/**< @brief Whether proxysecret was given.  */
  366:   unsigned int dhcpif_given ;	/**< @brief Whether dhcpif was given.  */
  367:   unsigned int dhcpmac_given ;	/**< @brief Whether dhcpmac was given.  */
  368:   unsigned int dhcpradius_given ;	/**< @brief Whether dhcpradius was given.  */
  369:   unsigned int dhcpgateway_given ;	/**< @brief Whether dhcpgateway was given.  */
  370:   unsigned int dhcpgatewayport_given ;	/**< @brief Whether dhcpgatewayport was given.  */
  371:   unsigned int dhcprelayagent_given ;	/**< @brief Whether dhcprelayagent was given.  */
  372:   unsigned int lease_given ;	/**< @brief Whether lease was given.  */
  373:   unsigned int eapolenable_given ;	/**< @brief Whether eapolenable was given.  */
  374:   unsigned int uamserver_given ;	/**< @brief Whether uamserver was given.  */
  375:   unsigned int uamhomepage_given ;	/**< @brief Whether uamhomepage was given.  */
  376:   unsigned int uamsecret_given ;	/**< @brief Whether uamsecret was given.  */
  377:   unsigned int uamlisten_given ;	/**< @brief Whether uamlisten was given.  */
  378:   unsigned int uamport_given ;	/**< @brief Whether uamport was given.  */
  379:   unsigned int uamuiport_given ;	/**< @brief Whether uamuiport was given.  */
  380:   unsigned int uamallowed_given ;	/**< @brief Whether uamallowed was given.  */
  381:   unsigned int uamdomain_given ;	/**< @brief Whether uamdomain was given.  */
  382:   unsigned int uamanydns_given ;	/**< @brief Whether uamanydns was given.  */
  383:   unsigned int uamanyip_given ;	/**< @brief Whether uamanyip was given.  */
  384:   unsigned int wisprlogin_given ;	/**< @brief Whether wisprlogin was given.  */
  385:   unsigned int nouamsuccess_given ;	/**< @brief Whether nouamsuccess was given.  */
  386:   unsigned int nouamwispr_given ;	/**< @brief Whether nouamwispr was given.  */
  387:   unsigned int uamlogoutip_given ;	/**< @brief Whether uamlogoutip was given.  */
  388:   unsigned int defsessiontimeout_given ;	/**< @brief Whether defsessiontimeout was given.  */
  389:   unsigned int defidletimeout_given ;	/**< @brief Whether defidletimeout was given.  */
  390:   unsigned int defbandwidthmaxdown_given ;	/**< @brief Whether defbandwidthmaxdown was given.  */
  391:   unsigned int defbandwidthmaxup_given ;	/**< @brief Whether defbandwidthmaxup was given.  */
  392:   unsigned int definteriminterval_given ;	/**< @brief Whether definteriminterval was given.  */
  393:   unsigned int macauth_given ;	/**< @brief Whether macauth was given.  */
  394:   unsigned int macauthdeny_given ;	/**< @brief Whether macauthdeny was given.  */
  395:   unsigned int macallowed_given ;	/**< @brief Whether macallowed was given.  */
  396:   unsigned int macsuffix_given ;	/**< @brief Whether macsuffix was given.  */
  397:   unsigned int macpasswd_given ;	/**< @brief Whether macpasswd was given.  */
  398:   unsigned int macallowlocal_given ;	/**< @brief Whether macallowlocal was given.  */
  399:   unsigned int wwwdir_given ;	/**< @brief Whether wwwdir was given.  */
  400:   unsigned int wwwbin_given ;	/**< @brief Whether wwwbin was given.  */
  401:   unsigned int uamui_given ;	/**< @brief Whether uamui was given.  */
  402:   unsigned int adminuser_given ;	/**< @brief Whether adminuser was given.  */
  403:   unsigned int adminpasswd_given ;	/**< @brief Whether adminpasswd was given.  */
  404:   unsigned int nasmac_given ;	/**< @brief Whether nasmac was given.  */
  405:   unsigned int nasip_given ;	/**< @brief Whether nasip was given.  */
  406:   unsigned int ssid_given ;	/**< @brief Whether ssid was given.  */
  407:   unsigned int vlan_given ;	/**< @brief Whether vlan was given.  */
  408:   unsigned int cmdsocket_given ;	/**< @brief Whether cmdsocket was given.  */
  409:   unsigned int radiusoriginalurl_given ;	/**< @brief Whether radiusoriginalurl was given.  */
  410:   unsigned int swapoctets_given ;	/**< @brief Whether swapoctets was given.  */
  411:   unsigned int usestatusfile_given ;	/**< @brief Whether usestatusfile was given.  */
  412:   unsigned int localusers_given ;	/**< @brief Whether localusers was given.  */
  413:   unsigned int postauthproxy_given ;	/**< @brief Whether postauthproxy was given.  */
  414:   unsigned int postauthproxyport_given ;	/**< @brief Whether postauthproxyport was given.  */
  415:   unsigned int wpaguests_given ;	/**< @brief Whether wpaguests was given.  */
  416:   unsigned int openidauth_given ;	/**< @brief Whether openidauth was given.  */
  417:   unsigned int papalwaysok_given ;	/**< @brief Whether papalwaysok was given.  */
  418:   unsigned int chillixml_given ;	/**< @brief Whether chillixml was given.  */
  419:   unsigned int acctupdate_given ;	/**< @brief Whether acctupdate was given.  */
  420:   unsigned int dnsparanoia_given ;	/**< @brief Whether dnsparanoia was given.  */
  421:   unsigned int usetap_given ;	/**< @brief Whether usetap was given.  */
  422:   unsigned int routeif_given ;	/**< @brief Whether routeif was given.  */
  423: 
  424: } ;
  425: 
  426: /** @brief The additional parameters to pass to parser functions */
  427: struct cmdline_parser_params
  428: {
  429:   int override; /**< @brief whether to override possibly already present options (default 0) */
  430:   int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */
  431:   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
  432:   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
  433:   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
  434: } ;
  435: 
  436: /** @brief the purpose string of the program */
  437: extern const char *gengetopt_args_info_purpose;
  438: /** @brief the usage string of the program */
  439: extern const char *gengetopt_args_info_usage;
  440: /** @brief all the lines making the help output */
  441: extern const char *gengetopt_args_info_help[];
  442: 
  443: /**
  444:  * The command line parser
  445:  * @param argc the number of command line options
  446:  * @param argv the command line options
  447:  * @param args_info the structure where option information will be stored
  448:  * @return 0 if everything went fine, NON 0 if an error took place
  449:  */
  450: int cmdline_parser (int argc, char * const *argv,
  451:   struct gengetopt_args_info *args_info);
  452: 
  453: /**
  454:  * The command line parser (version with additional parameters - deprecated)
  455:  * @param argc the number of command line options
  456:  * @param argv the command line options
  457:  * @param args_info the structure where option information will be stored
  458:  * @param override whether to override possibly already present options
  459:  * @param initialize whether to initialize the option structure my_args_info
  460:  * @param check_required whether to check that all required options were provided
  461:  * @return 0 if everything went fine, NON 0 if an error took place
  462:  * @deprecated use cmdline_parser_ext() instead
  463:  */
  464: int cmdline_parser2 (int argc, char * const *argv,
  465:   struct gengetopt_args_info *args_info,
  466:   int override, int initialize, int check_required);
  467: 
  468: /**
  469:  * The command line parser (version with additional parameters)
  470:  * @param argc the number of command line options
  471:  * @param argv the command line options
  472:  * @param args_info the structure where option information will be stored
  473:  * @param params additional parameters for the parser
  474:  * @return 0 if everything went fine, NON 0 if an error took place
  475:  */
  476: int cmdline_parser_ext (int argc, char * const *argv,
  477:   struct gengetopt_args_info *args_info,
  478:   struct cmdline_parser_params *params);
  479: 
  480: /**
  481:  * Save the contents of the option struct into an already open FILE stream.
  482:  * @param outfile the stream where to dump options
  483:  * @param args_info the option struct to dump
  484:  * @return 0 if everything went fine, NON 0 if an error took place
  485:  */
  486: int cmdline_parser_dump(FILE *outfile,
  487:   struct gengetopt_args_info *args_info);
  488: 
  489: /**
  490:  * Save the contents of the option struct into a (text) file.
  491:  * This file can be read by the config file parser (if generated by gengetopt)
  492:  * @param filename the file where to save
  493:  * @param args_info the option struct to save
  494:  * @return 0 if everything went fine, NON 0 if an error took place
  495:  */
  496: int cmdline_parser_file_save(const char *filename,
  497:   struct gengetopt_args_info *args_info);
  498: 
  499: /**
  500:  * Print the help
  501:  */
  502: void cmdline_parser_print_help(void);
  503: /**
  504:  * Print the version
  505:  */
  506: void cmdline_parser_print_version(void);
  507: 
  508: /**
  509:  * Initializes all the fields a cmdline_parser_params structure 
  510:  * to their default values
  511:  * @param params the structure to initialize
  512:  */
  513: void cmdline_parser_params_init(struct cmdline_parser_params *params);
  514: 
  515: /**
  516:  * Allocates dynamically a cmdline_parser_params structure and initializes
  517:  * all its fields to their default values
  518:  * @return the created and initialized cmdline_parser_params structure
  519:  */
  520: struct cmdline_parser_params *cmdline_parser_params_create(void);
  521: 
  522: /**
  523:  * Initializes the passed gengetopt_args_info structure's fields
  524:  * (also set default values for options that have a default)
  525:  * @param args_info the structure to initialize
  526:  */
  527: void cmdline_parser_init (struct gengetopt_args_info *args_info);
  528: /**
  529:  * Deallocates the string fields of the gengetopt_args_info structure
  530:  * (but does not deallocate the structure itself)
  531:  * @param args_info the structure to deallocate
  532:  */
  533: void cmdline_parser_free (struct gengetopt_args_info *args_info);
  534: 
  535: /**
  536:  * The config file parser (deprecated version)
  537:  * @param filename the name of the config file
  538:  * @param args_info the structure where option information will be stored
  539:  * @param override whether to override possibly already present options
  540:  * @param initialize whether to initialize the option structure my_args_info
  541:  * @param check_required whether to check that all required options were provided
  542:  * @return 0 if everything went fine, NON 0 if an error took place
  543:  * @deprecated use cmdline_parser_config_file() instead
  544:  */
  545: int cmdline_parser_configfile (char * const filename,
  546:   struct gengetopt_args_info *args_info,
  547:   int override, int initialize, int check_required);
  548: 
  549: /**
  550:  * The config file parser
  551:  * @param filename the name of the config file
  552:  * @param args_info the structure where option information will be stored
  553:  * @param params additional parameters for the parser
  554:  * @return 0 if everything went fine, NON 0 if an error took place
  555:  */
  556: int cmdline_parser_config_file (char * const filename,
  557:   struct gengetopt_args_info *args_info,
  558:   struct cmdline_parser_params *params);
  559: 
  560: /**
  561:  * Checks that all the required options were specified
  562:  * @param args_info the structure to check
  563:  * @param prog_name the name of the program that will be used to print
  564:  *   possible errors
  565:  * @return
  566:  */
  567: int cmdline_parser_required (struct gengetopt_args_info *args_info,
  568:   const char *prog_name);
  569: 
  570: 
  571: #ifdef __cplusplus
  572: }
  573: #endif /* __cplusplus */
  574: #endif /* CMDLINE_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>