mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
priv: Move options and config prototypes to own header.
This commit is contained in:
29
include/libssh/options.h
Normal file
29
include/libssh/options.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the SSH Library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
*
|
||||||
|
* The SSH Library is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2.1 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* The SSH Library is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||||
|
* License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with the SSH Library; see the file COPYING. If not, write to
|
||||||
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
|
* MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _OPTIONS_H
|
||||||
|
#define _OPTIONS_H
|
||||||
|
|
||||||
|
int ssh_config_parse_file(ssh_session session, const char *filename);
|
||||||
|
int ssh_options_set_algo(ssh_session session, int algo, const char *list);
|
||||||
|
int ssh_options_apply(ssh_session session);
|
||||||
|
|
||||||
|
#endif /* _OPTIONS_H */
|
@@ -152,9 +152,6 @@ SSH_PACKET_CALLBACK(ssh_packet_dh_reply);
|
|||||||
SSH_PACKET_CALLBACK(ssh_packet_newkeys);
|
SSH_PACKET_CALLBACK(ssh_packet_newkeys);
|
||||||
SSH_PACKET_CALLBACK(ssh_packet_service_accept);
|
SSH_PACKET_CALLBACK(ssh_packet_service_accept);
|
||||||
|
|
||||||
/* config.c */
|
|
||||||
int ssh_config_parse_file(ssh_session session, const char *filename);
|
|
||||||
|
|
||||||
/* errors.c */
|
/* errors.c */
|
||||||
#define ssh_set_error(error, code, ...) \
|
#define ssh_set_error(error, code, ...) \
|
||||||
_ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
|
_ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
|
||||||
@@ -248,10 +245,6 @@ int message_handle(ssh_session session, void *user, uint8_t type, ssh_buffer pac
|
|||||||
#define leave_function() (void)session
|
#define leave_function() (void)session
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* options.c */
|
|
||||||
|
|
||||||
int ssh_options_set_algo(ssh_session session, int algo, const char *list);
|
|
||||||
int ssh_options_apply(ssh_session session);
|
|
||||||
|
|
||||||
/* server.c */
|
/* server.c */
|
||||||
SSH_PACKET_CALLBACK(ssh_packet_kexdh_init);
|
SSH_PACKET_CALLBACK(ssh_packet_kexdh_init);
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "libssh/ssh2.h"
|
#include "libssh/ssh2.h"
|
||||||
#include "libssh/buffer.h"
|
#include "libssh/buffer.h"
|
||||||
#include "libssh/packet.h"
|
#include "libssh/packet.h"
|
||||||
|
#include "libssh/options.h"
|
||||||
#include "libssh/socket.h"
|
#include "libssh/socket.h"
|
||||||
#include "libssh/session.h"
|
#include "libssh/session.h"
|
||||||
#include "libssh/dh.h"
|
#include "libssh/dh.h"
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "libssh/priv.h"
|
#include "libssh/priv.h"
|
||||||
#include "libssh/session.h"
|
#include "libssh/session.h"
|
||||||
#include "libssh/misc.h"
|
#include "libssh/misc.h"
|
||||||
|
#include "libssh/options.h"
|
||||||
|
|
||||||
enum ssh_config_opcode_e {
|
enum ssh_config_opcode_e {
|
||||||
SOC_UNSUPPORTED = -1,
|
SOC_UNSUPPORTED = -1,
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "libssh/buffer.h"
|
#include "libssh/buffer.h"
|
||||||
#include "libssh/misc.h"
|
#include "libssh/misc.h"
|
||||||
#include "libssh/pki.h"
|
#include "libssh/pki.h"
|
||||||
|
#include "libssh/options.h"
|
||||||
|
|
||||||
/*todo: remove this include */
|
/*todo: remove this include */
|
||||||
#include "libssh/string.h"
|
#include "libssh/string.h"
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
#include "libssh/pki_priv.h"
|
#include "libssh/pki_priv.h"
|
||||||
#include <libssh/misc.h>
|
#include <libssh/misc.h>
|
||||||
#include <libssh/keys.h>
|
#include <libssh/keys.h>
|
||||||
|
#include "libssh/options.h"
|
||||||
|
|
||||||
/* AUTH FUNCTIONS */
|
/* AUTH FUNCTIONS */
|
||||||
int ssh_auth_list(ssh_session session) {
|
int ssh_auth_list(ssh_session session) {
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "libssh/priv.h"
|
#include "libssh/priv.h"
|
||||||
#include "libssh/session.h"
|
#include "libssh/session.h"
|
||||||
#include "libssh/misc.h"
|
#include "libssh/misc.h"
|
||||||
|
#include "libssh/options.h"
|
||||||
#ifdef WITH_SERVER
|
#ifdef WITH_SERVER
|
||||||
#include "libssh/server.h"
|
#include "libssh/server.h"
|
||||||
#include "libssh/bind.h"
|
#include "libssh/bind.h"
|
||||||
|
@@ -56,6 +56,7 @@
|
|||||||
#include "libssh/pki.h"
|
#include "libssh/pki.h"
|
||||||
#include "libssh/dh.h"
|
#include "libssh/dh.h"
|
||||||
#include "libssh/messages.h"
|
#include "libssh/messages.h"
|
||||||
|
#include "libssh/options.h"
|
||||||
|
|
||||||
#define set_status(session, status) do {\
|
#define set_status(session, status) do {\
|
||||||
if (session->common.callbacks && session->common.callbacks->connect_status_function) \
|
if (session->common.callbacks && session->common.callbacks->connect_status_function) \
|
||||||
|
Reference in New Issue
Block a user