charon-cmd: add --local/remote-ts options to set traffic selectors
[strongswan.git] / src / charon-cmd / cmd / cmd_options.h
1 /*
2 * Copyright (C) 2013 Martin Willi
3 * Copyright (C) 2013 revosec AG
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup cmd_option cmd_option
18 * @{ @ingroup cmd
19 */
20
21 #ifndef CMD_OPTION_H_
22 #define CMD_OPTION_H_
23
24 typedef struct cmd_option_t cmd_option_t;
25 typedef enum cmd_option_type_t cmd_option_type_t;
26
27 /**
28 * Command line options
29 */
30 enum cmd_option_type_t {
31 CMD_OPT_HELP,
32 CMD_OPT_VERSION,
33 CMD_OPT_HOST,
34 CMD_OPT_IDENTITY,
35 CMD_OPT_CERT,
36 CMD_OPT_RSA,
37 CMD_OPT_LOCAL_TS,
38 CMD_OPT_REMOTE_TS,
39
40 CMD_OPT_COUNT
41 };
42
43 /**
44 * Command line arguments, similar to "struct option", but with descriptions
45 */
46 struct cmd_option_t {
47 /** option identifier */
48 cmd_option_type_t id;
49 /** long option name */
50 const char *name;
51 /** takes argument */
52 int has_arg;
53 /** decription of argument */
54 const char *arg;
55 /** description to option */
56 const char *desc;
57 };
58
59 /**
60 * Registered CMD options.
61 */
62 extern cmd_option_t cmd_options[CMD_OPT_COUNT];
63
64 #endif /** CMD_OPTION_H_ @}*/