Annotation of embedaddon/strongswan/src/charon-cmd/cmd/cmd_options.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (C) 2013 Tobias Brunner
        !             3:  * HSR Hochschule fuer Technik Rapperswil
        !             4:  *
        !             5:  * Copyright (C) 2013 Martin Willi
        !             6:  * Copyright (C) 2013 revosec AG
        !             7:  *
        !             8:  * This program is free software; you can redistribute it and/or modify it
        !             9:  * under the terms of the GNU General Public License as published by the
        !            10:  * Free Software Foundation; either version 2 of the License, or (at your
        !            11:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
        !            12:  *
        !            13:  * This program is distributed in the hope that it will be useful, but
        !            14:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
        !            15:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        !            16:  * for more details.
        !            17:  */
        !            18: 
        !            19: /**
        !            20:  * @defgroup cmd_option cmd_option
        !            21:  * @{ @ingroup cmd
        !            22:  */
        !            23: 
        !            24: #ifndef CMD_OPTION_H_
        !            25: #define CMD_OPTION_H_
        !            26: 
        !            27: typedef struct cmd_option_t cmd_option_t;
        !            28: typedef enum cmd_option_type_t cmd_option_type_t;
        !            29: 
        !            30: /**
        !            31:  * Command line options
        !            32:  */
        !            33: enum cmd_option_type_t {
        !            34:        CMD_OPT_HELP,
        !            35:        CMD_OPT_VERSION,
        !            36:        CMD_OPT_DEBUG,
        !            37:        CMD_OPT_HOST,
        !            38:        CMD_OPT_IDENTITY,
        !            39:        CMD_OPT_EAP_IDENTITY,
        !            40:        CMD_OPT_XAUTH_USER,
        !            41:        CMD_OPT_REMOTE_IDENTITY,
        !            42:        CMD_OPT_CERT,
        !            43:        CMD_OPT_RSA,
        !            44:        CMD_OPT_PKCS12,
        !            45:        CMD_OPT_AGENT,
        !            46:        CMD_OPT_LOCAL_TS,
        !            47:        CMD_OPT_REMOTE_TS,
        !            48:        CMD_OPT_IKE_PROPOSAL,
        !            49:        CMD_OPT_AH_PROPOSAL,
        !            50:        CMD_OPT_ESP_PROPOSAL,
        !            51:        CMD_OPT_PROFILE,
        !            52: 
        !            53:        CMD_OPT_COUNT
        !            54: };
        !            55: 
        !            56: /**
        !            57:  * Command line arguments, similar to "struct option", but with descriptions
        !            58:  */
        !            59: struct cmd_option_t {
        !            60:        /** option identifier */
        !            61:        cmd_option_type_t id;
        !            62:        /** long option name */
        !            63:        const char *name;
        !            64:        /** takes argument */
        !            65:        int has_arg;
        !            66:        /** description of argument */
        !            67:        const char *arg;
        !            68:        /** short description to option */
        !            69:        const char *desc;
        !            70:        /** additional description lines */
        !            71:        const char *lines[12];
        !            72: };
        !            73: 
        !            74: /**
        !            75:  * Registered CMD options.
        !            76:  */
        !            77: extern cmd_option_t cmd_options[CMD_OPT_COUNT];
        !            78: 
        !            79: #endif /** CMD_OPTION_H_ @}*/

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