first part of win32 patches

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@141 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Aris Adamantiadis
2008-03-07 01:45:05 +00:00
parent 5029fe9d74
commit 29997022c8
16 changed files with 98 additions and 42 deletions

View File

@@ -21,7 +21,12 @@ MA 02111-1307, USA. */
#ifndef _LIBSSH_H
#define _LIBSSH_H
#include <unistd.h>
#ifndef _WIN32
#include <sys/select.h> /* for fd_set * */
#endif
#ifdef _WIN32
#include <winsock2.h>
#endif
#include <inttypes.h>
#define LIBSSH_VERSION "libssh-0.2"
@@ -45,6 +50,13 @@ typedef uint16_t u16;
typedef uint64_t u64;
typedef uint8_t u8;
/* Socket type */
#ifdef _WIN32
#define socket_t SOCKET
#else
typedef int socket_t;
#endif
/* the offsets of methods */
#define SSH_KEX 0
#define SSH_HOSTKEYS 1
@@ -110,7 +122,7 @@ void ssh_set_verbosity(int num);
/* session.c */
SSH_SESSION *ssh_new();
void ssh_set_options(SSH_SESSION *session, SSH_OPTIONS *options);
int ssh_get_fd(SSH_SESSION *session);
socket_t ssh_get_fd(SSH_SESSION *session);
void ssh_silent_disconnect(SSH_SESSION *session);
int ssh_get_version(SSH_SESSION *session);
void ssh_set_fd_toread(SSH_SESSION *session);