2 * Copyright (C) 2013 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
5 * Copyright (C) 2013 Martin Willi
6 * Copyright (C) 2013 revosec AG
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>.
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
19 #include "cmd_options.h"
26 cmd_option_t cmd_options
[CMD_OPT_COUNT
] = {
27 { CMD_OPT_HELP
, "help", no_argument
, "",
28 "print this usage information and exit", {}},
29 { CMD_OPT_VERSION
, "version", no_argument
, "",
30 "show version information and exit", {}},
31 { CMD_OPT_DEBUG
, "debug", required_argument
, "level",
32 "set the default log level (-1..4, default: 1)", {}},
33 { CMD_OPT_HOST
, "host", required_argument
, "hostname",
34 "DNS name or address to connect to", {}},
35 { CMD_OPT_IDENTITY
, "identity", required_argument
, "identity",
36 "identity the client uses for the IKE exchange", {}},
37 { CMD_OPT_EAP_IDENTITY
, "eap-identity", required_argument
, "eap-identity",
38 "identity the client uses for EAP authentication", {}},
39 { CMD_OPT_XAUTH_USER
, "xauth-username", required_argument
, "xauth-username",
40 "username the client uses for XAuth authentication", {}},
41 { CMD_OPT_REMOTE_IDENTITY
, "remote-identity", required_argument
, "identity",
42 "server identity to expect, defaults to host", {}},
43 { CMD_OPT_CERT
, "cert", required_argument
, "path",
44 "certificate for authentication or trust chain validation", {}},
45 { CMD_OPT_RSA
, "rsa", required_argument
, "path",
46 "RSA private key to use for authentication", {}},
47 { CMD_OPT_PKCS12
, "p12", required_argument
, "path",
48 "PKCS#12 file with private key and certificates to use for ", {
49 "authentication and trust chain validation"
51 { CMD_OPT_AGENT
, "agent", optional_argument
, "socket",
52 "use SSH agent for authentication. If socket is not specified", {
53 "it is read from the SSH_AUTH_SOCK environment variable",
55 { CMD_OPT_LOCAL_TS
, "local-ts", required_argument
, "subnet",
56 "additional traffic selector to propose for our side", {}},
57 { CMD_OPT_REMOTE_TS
, "remote-ts", required_argument
, "subnet",
58 "traffic selector to propose for remote side", {}},
59 { CMD_OPT_IKE_PROPOSAL
, "ike-proposal", required_argument
, "proposal",
60 "a single IKE proposal to offer instead of the default", {}},
61 { CMD_OPT_PROFILE
, "profile", required_argument
, "name",
62 "authentication profile to use, where name is one of:", {
63 " ikev2-pub, ikev2-eap, ikev2-pub-eap",
64 " ikev1-pub[-am], ikev1-xauth[-am],",
65 " ikev1-xauth-psk[-am], ikev1-hybrid[-am]",