aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-11-02 21:56:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-11-02 21:56:40 +0000
commit2147284cad624325f5b0034c2f394db62086d9e6 (patch)
tree4a874303150609f63388ada95e308f79c023519d /lib/urldata.h
parent7f1870da5f5fa114c461bc8d4651961ad0d370f0 (diff)
James Housley brought support for SCP transfers
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index c93b46dff..a42b09c76 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -35,6 +35,7 @@
#define PORT_DICT 2628
#define PORT_LDAP 389
#define PORT_TFTP 69
+#define PORT_SSH 22
#define DICT_MATCH "/MATCH:"
#define DICT_MATCH2 "/M:"
@@ -109,6 +110,11 @@
# endif
#endif
+#ifdef HAVE_LIBSSH2_H
+#include <libssh2.h>
+#include <libssh2_sftp.h>
+#endif /* HAVE_LIBSSH2_H */
+
/* Download buffer size, keep it fairly big for speed reasons */
#undef BUFSIZE
#define BUFSIZE CURL_MAX_WRITE_SIZE
@@ -392,6 +398,22 @@ struct ftp_conn {
ftpstate state; /* always use ftp.c:state() to change state! */
};
+struct SCPPROTO {
+ curl_off_t *bytecountp;
+ char *user;
+ char *passwd;
+ char *path; /* the path we operate on */
+ char *freepath; /* pointer to the allocated block we must
+ free, this might differ from the 'path'
+ pointer */
+ char *errorstr;
+#ifdef USE_LIBSSH2
+ LIBSSH2_SESSION *scpSession; /* Secure Shell session */
+ LIBSSH2_CHANNEL *scpChannel; /* SCP channel handle */
+#endif /* USE_LIBSSH2 */
+};
+
+
/****************************************************************************
* FILE unique setup
***************************************************************************/
@@ -647,6 +669,7 @@ struct HandleData {
struct FILEPROTO *file;
void *telnet; /* private for telnet.c-eyes only */
void *generic;
+ struct SCPPROTO *scp;
} proto;
};
@@ -681,6 +704,7 @@ struct connectdata {
#define PROT_FTPS (1<<9)
#define PROT_SSL (1<<10) /* protocol requires SSL */
#define PROT_TFTP (1<<11)
+#define PROT_SCP (1<<12)
/* 'dns_entry' is the particular host we use. This points to an entry in the
DNS cache and it will not get pruned while locked. It gets unlocked in
@@ -1250,6 +1274,11 @@ struct UserDefined {
bool ftp_skip_ip; /* skip the IP address the FTP server passes on to
us */
bool connect_only; /* make connection, let application use the socket */
+ long ssh_auth_types; /* allowed SSH auth types */
+ char *ssh_public_key; /* the path to the public key file for
+ authentication */
+ char *ssh_private_key; /* the path to the private key file for
+ authentication */
};
struct Names {