2 * Dropbear - a SSH2 server
4 * Copyright (c) 2002,2003 Matt Johnston
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 typedef struct runopts {
43 int readhostkey(const char * filename, sign_key * hostkey, int *type);
45 typedef struct svr_runopts {
54 /* ports is an array of the portcount listening ports */
55 char *ports[DROPBEAR_MAX_PORTS];
56 unsigned int portcount;
60 /* Flags indicating whether to use ipv4 and ipv6 */
67 /* whether to print the MOTD */
81 extern svr_runopts svr_opts;
83 void svr_getopts(int argc, char ** argv);
86 /* Uncompleted XXX matt */
87 typedef struct cli_runopts {
97 #ifdef ENABLE_CLI_PUBKEY_AUTH
98 struct SignKeyList *privkeys; /* Keys to use for public-key auth */
100 #ifdef ENABLE_CLI_REMOTETCPFWD
101 struct TCPFwdList * remotefwds;
103 #ifdef ENABLE_CLI_LOCALTCPFWD
104 struct TCPFwdList * localfwds;
110 extern cli_runopts cli_opts;
111 void cli_getopts(int argc, char ** argv);
113 #endif /* _RUNOPTS_H_ */