6b8b04cdfea86aa353718056c44868dcf4f5dca8
[strongswan.git] / src / charon-cmd / cmd / cmd_options.h
1 /*
2 * Copyright (C) 2013 Tobias Brunner
3 * 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_PROFILE,
49
50 CMD_OPT_COUNT
51 };
52
53 /**
54 * Command line arguments, similar to "struct option", but with descriptions
55 */
56 struct cmd_option_t {
57 /** option identifier */
58 cmd_option_type_t id;
59 /** long option name */
60 const char *name;
61 /** takes argument */
62 int has_arg;
63 /** decription of argument */
64 const char *arg;
65 /** short description to option */
66 const char *desc;
67 /** additional description lines */
68 const char *lines[12];
69 };
70
71 /**
72 * Registered CMD options.
73 */
74 extern cmd_option_t cmd_options[CMD_OPT_COUNT];
75
76 #endif /** CMD_OPTION_H_ @}*/