Blame include/libssh/bind_config.h

Packit 6c0a39
/*
Packit 6c0a39
 * bind_config.h - Parse the SSH server configuration file
Packit 6c0a39
 *
Packit 6c0a39
 * This file is part of the SSH Library
Packit 6c0a39
 *
Packit 6c0a39
 * Copyright (c) 2019 by Red Hat, Inc.
Packit 6c0a39
 *
Packit 6c0a39
 * Author: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Packit 6c0a39
 *
Packit 6c0a39
 * The SSH Library is free software; you can redistribute it and/or modify
Packit 6c0a39
 * it under the terms of the GNU Lesser General Public License as published by
Packit 6c0a39
 * the Free Software Foundation; either version 2.1 of the License, or (at your
Packit 6c0a39
 * option) any later version.
Packit 6c0a39
 *
Packit 6c0a39
 * The SSH Library is distributed in the hope that it will be useful, but
Packit 6c0a39
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit 6c0a39
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
Packit 6c0a39
 * License for more details.
Packit 6c0a39
 *
Packit 6c0a39
 * You should have received a copy of the GNU Lesser General Public License
Packit 6c0a39
 * along with the SSH Library; see the file COPYING.  If not, write to
Packit 6c0a39
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
Packit 6c0a39
 * MA 02111-1307, USA.
Packit 6c0a39
 */
Packit 6c0a39
Packit 6c0a39
#ifndef BIND_CONFIG_H_
Packit 6c0a39
#define BIND_CONFIG_H_
Packit 6c0a39
Packit 6c0a39
#include "libssh/server.h"
Packit 6c0a39
Packit 6c0a39
enum ssh_bind_config_opcode_e {
Packit 6c0a39
    /* Known but not allowed in Match block */
Packit 6c0a39
    BIND_CFG_NOT_ALLOWED_IN_MATCH = -4,
Packit 6c0a39
    /* Unknown opcode */
Packit 6c0a39
    BIND_CFG_UNKNOWN = -3,
Packit 6c0a39
    /* Known and not applicable to libssh */
Packit 6c0a39
    BIND_CFG_NA = -2,
Packit 6c0a39
    /* Known but not supported by current libssh version */
Packit 6c0a39
    BIND_CFG_UNSUPPORTED = -1,
Packit 6c0a39
    BIND_CFG_INCLUDE,
Packit 6c0a39
    BIND_CFG_HOSTKEY,
Packit 6c0a39
    BIND_CFG_LISTENADDRESS,
Packit 6c0a39
    BIND_CFG_PORT,
Packit 6c0a39
    BIND_CFG_LOGLEVEL,
Packit 6c0a39
    BIND_CFG_CIPHERS,
Packit 6c0a39
    BIND_CFG_MACS,
Packit 6c0a39
    BIND_CFG_KEXALGORITHMS,
Packit 6c0a39
    BIND_CFG_MATCH,
Packit 6c0a39
    BIND_CFG_PUBKEY_ACCEPTED_KEY_TYPES,
Packit 6c0a39
    BIND_CFG_HOSTKEY_ALGORITHMS,
Packit 6c0a39
Packit 6c0a39
    BIND_CFG_MAX /* Keep this one last in the list */
Packit 6c0a39
};
Packit 6c0a39
Packit 6c0a39
/* @brief Parse configuration file and set the options to the given ssh_bind
Packit 6c0a39
 *
Packit 6c0a39
 * @params[in] sshbind   The ssh_bind context to be configured
Packit 6c0a39
 * @params[in] filename  The path to the configuration file
Packit 6c0a39
 *
Packit 6c0a39
 * @returns    0 on successful parsing the configuration file, -1 on error
Packit 6c0a39
 */
Packit 6c0a39
int ssh_bind_config_parse_file(ssh_bind sshbind, const char *filename);
Packit 6c0a39
Packit 6c0a39
#endif /* BIND_CONFIG_H_ */