libssh: bind_config.h Source File

libssh 0.9.6 The SSH library

bind_config.h
1 /*
2 * bind_config.h - Parse the SSH server configuration file
3 *
4 * This file is part of the SSH Library
5 *
6 * Copyright (c) 2019 by Red Hat, Inc.
7 *
8 * Author: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
9 *
10 * The SSH Library is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or (at your
13 * option) any later version.
14 *
15 * The SSH Library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with the SSH Library; see the file COPYING. If not, write to
22 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 * MA 02111-1307, USA.
24 */
25
26 #ifndef BIND_CONFIG_H_
27 #define BIND_CONFIG_H_
28
29 #include "libssh/server.h"
30
31 enum ssh_bind_config_opcode_e {
32 /* Known but not allowed in Match block */
33 BIND_CFG_NOT_ALLOWED_IN_MATCH = -4,
34 /* Unknown opcode */
35 BIND_CFG_UNKNOWN = -3,
36 /* Known and not applicable to libssh */
37 BIND_CFG_NA = -2,
38 /* Known but not supported by current libssh version */
39 BIND_CFG_UNSUPPORTED = -1,
40 BIND_CFG_INCLUDE,
41 BIND_CFG_HOSTKEY,
42 BIND_CFG_LISTENADDRESS,
43 BIND_CFG_PORT,
44 BIND_CFG_LOGLEVEL,
45 BIND_CFG_CIPHERS,
46 BIND_CFG_MACS,
47 BIND_CFG_KEXALGORITHMS,
48 BIND_CFG_MATCH,
49 BIND_CFG_PUBKEY_ACCEPTED_KEY_TYPES,
50 BIND_CFG_HOSTKEY_ALGORITHMS,
51
52 BIND_CFG_MAX /* Keep this one last in the list */
53 };
54
55 /* @brief Parse configuration file and set the options to the given ssh_bind
56 *
57 * @params[in] sshbind The ssh_bind context to be configured
58 * @params[in] filename The path to the configuration file
59 *
60 * @returns 0 on successful parsing the configuration file, -1 on error
61 */
62 int ssh_bind_config_parse_file(ssh_bind sshbind, const char *filename);
63
64 #endif /* BIND_CONFIG_H_ */
ssh_bind_struct
Definition: bind.h:28