include/libssh/server.h: Remove struct definitions
include/libssh/priv.h: Add struct definitions that previously were in include/libssh/server.h libssh/server.c: Include libssh/priv.h git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@109 7dcaeef0-15fb-0310-b436-a5af3365683c
Этот коммит содержится в:
родитель
28eaaa537b
Коммит
6a655edebd
@ -365,6 +365,63 @@ struct ssh_kbdint {
|
|||||||
unsigned char *echo; /* bool array */
|
unsigned char *echo; /* bool array */
|
||||||
char **answers;
|
char **answers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* server data */
|
||||||
|
|
||||||
|
struct ssh_bind_struct {
|
||||||
|
struct error_struct error;
|
||||||
|
int bindfd;
|
||||||
|
SSH_OPTIONS *options;
|
||||||
|
int blocking;
|
||||||
|
int toaccept;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ssh_auth_request {
|
||||||
|
char *username;
|
||||||
|
int method;
|
||||||
|
char *password;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ssh_channel_request_open {
|
||||||
|
int type;
|
||||||
|
u32 sender;
|
||||||
|
u32 window;
|
||||||
|
u32 packet_size;
|
||||||
|
char *originator;
|
||||||
|
u16 orignator_port;
|
||||||
|
char *destination;
|
||||||
|
u16 destination_port;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ssh_channel_request {
|
||||||
|
int type;
|
||||||
|
CHANNEL *channel;
|
||||||
|
u8 want_reply;
|
||||||
|
/* pty-req type specifics */
|
||||||
|
char *TERM;
|
||||||
|
u32 width;
|
||||||
|
u32 height;
|
||||||
|
u32 pxwidth;
|
||||||
|
u32 pxheight;
|
||||||
|
STRING *modes;
|
||||||
|
|
||||||
|
/* env type request */
|
||||||
|
char *var_name;
|
||||||
|
char *var_value;
|
||||||
|
/* exec type request */
|
||||||
|
char *command;
|
||||||
|
/* subsystem */
|
||||||
|
char *subsystem;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ssh_message {
|
||||||
|
SSH_SESSION *session;
|
||||||
|
int type;
|
||||||
|
struct ssh_auth_request auth_request;
|
||||||
|
struct ssh_channel_request_open channel_request_open;
|
||||||
|
struct ssh_channel_request channel_request;
|
||||||
|
};
|
||||||
|
|
||||||
/* session.c */
|
/* session.c */
|
||||||
|
|
||||||
void ssh_cleanup(SSH_SESSION *session);
|
void ssh_cleanup(SSH_SESSION *session);
|
||||||
|
@ -22,17 +22,8 @@ MA 02111-1307, USA. */
|
|||||||
#define SERVER_H
|
#define SERVER_H
|
||||||
|
|
||||||
#include "libssh/libssh.h"
|
#include "libssh/libssh.h"
|
||||||
#include "libssh/priv.h"
|
|
||||||
#define SERVERBANNER CLIENTBANNER
|
#define SERVERBANNER CLIENTBANNER
|
||||||
|
|
||||||
struct ssh_bind_struct {
|
|
||||||
struct error_struct error;
|
|
||||||
int bindfd;
|
|
||||||
SSH_OPTIONS *options;
|
|
||||||
int blocking;
|
|
||||||
int toaccept;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct ssh_bind_struct SSH_BIND;
|
typedef struct ssh_bind_struct SSH_BIND;
|
||||||
|
|
||||||
SSH_BIND *ssh_bind_new();
|
SSH_BIND *ssh_bind_new();
|
||||||
@ -58,27 +49,10 @@ int ssh_accept(SSH_SESSION *session);
|
|||||||
#define SSH_AUTH_KEYBINT (1<<4)
|
#define SSH_AUTH_KEYBINT (1<<4)
|
||||||
#define SSH_AUTH_UNKNOWN 0
|
#define SSH_AUTH_UNKNOWN 0
|
||||||
|
|
||||||
struct ssh_auth_request {
|
|
||||||
char *username;
|
|
||||||
int method;
|
|
||||||
char *password;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#define SSH_CHANNEL_SESSION 1
|
#define SSH_CHANNEL_SESSION 1
|
||||||
#define SSH_CHANNEL_TCPIP 2
|
#define SSH_CHANNEL_TCPIP 2
|
||||||
#define SSH_CHANNEL_X11 3
|
#define SSH_CHANNEL_X11 3
|
||||||
#define SSH_CHANNEL_UNKNOWN 4
|
#define SSH_CHANNEL_UNKNOWN 4
|
||||||
struct ssh_channel_request_open {
|
|
||||||
int type;
|
|
||||||
u32 sender;
|
|
||||||
u32 window;
|
|
||||||
u32 packet_size;
|
|
||||||
char *originator;
|
|
||||||
u16 orignator_port;
|
|
||||||
char *destination;
|
|
||||||
u16 destination_port;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define SSH_CHANNEL_REQUEST_PTY 1
|
#define SSH_CHANNEL_REQUEST_PTY 1
|
||||||
#define SSH_CHANNEL_REQUEST_EXEC 2
|
#define SSH_CHANNEL_REQUEST_EXEC 2
|
||||||
@ -88,35 +62,6 @@ struct ssh_channel_request_open {
|
|||||||
#define SSH_CHANNEL_REQUEST_WINDOW_CHANGE 6
|
#define SSH_CHANNEL_REQUEST_WINDOW_CHANGE 6
|
||||||
#define SSH_CHANNEL_REQUEST_UNKNOWN 7
|
#define SSH_CHANNEL_REQUEST_UNKNOWN 7
|
||||||
|
|
||||||
struct ssh_channel_request {
|
|
||||||
int type;
|
|
||||||
CHANNEL *channel;
|
|
||||||
u8 want_reply;
|
|
||||||
/* pty-req type specifics */
|
|
||||||
char *TERM;
|
|
||||||
u32 width;
|
|
||||||
u32 height;
|
|
||||||
u32 pxwidth;
|
|
||||||
u32 pxheight;
|
|
||||||
STRING *modes;
|
|
||||||
|
|
||||||
/* env type request */
|
|
||||||
char *var_name;
|
|
||||||
char *var_value;
|
|
||||||
/* exec type request */
|
|
||||||
char *command;
|
|
||||||
/* subsystem */
|
|
||||||
char *subsystem;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ssh_message {
|
|
||||||
SSH_SESSION *session;
|
|
||||||
int type;
|
|
||||||
struct ssh_auth_request auth_request;
|
|
||||||
struct ssh_channel_request_open channel_request_open;
|
|
||||||
struct ssh_channel_request channel_request;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct ssh_message SSH_MESSAGE;
|
typedef struct ssh_message SSH_MESSAGE;
|
||||||
|
|
||||||
SSH_MESSAGE *ssh_message_get(SSH_SESSION *session);
|
SSH_MESSAGE *ssh_message_get(SSH_SESSION *session);
|
||||||
|
@ -32,6 +32,7 @@ MA 02111-1307, USA. */
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "libssh/priv.h"
|
||||||
#include "libssh/libssh.h"
|
#include "libssh/libssh.h"
|
||||||
#include "libssh/server.h"
|
#include "libssh/server.h"
|
||||||
#include "libssh/ssh2.h"
|
#include "libssh/ssh2.h"
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user