~ubuntu-branches/ubuntu/natty/curl/natty-proposed

« back to all changes in this revision

Viewing changes to lib/ssh.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-05-24 21:12:19 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20090524211219-7jgcwuhl04ixuqsm
Tags: upstream-7.19.5
ImportĀ upstreamĀ versionĀ 7.19.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __SSH_H
2
 
#define __SSH_H
3
 
 
 
1
#ifndef HEADER_CURL_SSH_H
 
2
#define HEADER_CURL_SSH_H
4
3
/***************************************************************************
5
4
 *                                  _   _ ____  _
6
5
 *  Project                     ___| | | |  _ \| |
8
7
 *                            | (__| |_| |  _ <| |___
9
8
 *                             \___|\___/|_| \_\_____|
10
9
 *
11
 
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 
10
 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
12
11
 *
13
12
 * This software is licensed as described in the file COPYING, which
14
13
 * you should have received as part of this distribution. The terms
21
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22
21
 * KIND, either express or implied.
23
22
 *
24
 
 * $Id: ssh.h,v 1.10 2008-05-09 11:27:55 mmarek Exp $
 
23
 * $Id: ssh.h,v 1.18 2009-05-09 15:32:59 yangtse Exp $
25
24
 ***************************************************************************/
26
25
 
27
26
#ifdef USE_LIBSSH2
 
27
 
 
28
#if !defined(LIBSSH2_VERSION_NUM) || (LIBSSH2_VERSION_NUM < 0x001000)
 
29
#  error "SCP/SFTP protocols require libssh2 0.16 or later"
 
30
#endif
 
31
 
 
32
#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x001300)
 
33
/* libssh2 0.19 was the planned release version for a while before it was
 
34
   decided to instead become 1.0. Thus >= 0x001300 should still work fine
 
35
   for snapshots done during the 0.19 days as well as things released once
 
36
   it was bumped to 1.0 */
 
37
#  define HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS 1
 
38
#else
 
39
#  undef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTIONS
 
40
#endif
 
41
 
 
42
#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010000)
 
43
/* libssh2_sftp_seek64() has only ever been provided by libssh2 1.0 or
 
44
   later */
 
45
#  define HAVE_LIBSSH2_SFTP_SEEK64 1
 
46
#else
 
47
#  undef HAVE_LIBSSH2_SFTP_SEEK64
 
48
#endif
 
49
 
 
50
 
28
51
extern const struct Curl_handler Curl_handler_scp;
29
52
extern const struct Curl_handler Curl_handler_sftp;
30
53
 
38
61
ssize_t Curl_sftp_recv(struct connectdata *conn, int sockindex,
39
62
                       char *mem, size_t len);
40
63
 
 
64
#define Curl_ssh_enabled(conn,prot) (conn->protocol & prot)
 
65
 
 
66
#else /* USE_LIBSSH2 */
 
67
 
 
68
#define Curl_ssh_enabled(x,y) 0
 
69
#define Curl_scp_send(a,b,c,d) 0
 
70
#define Curl_sftp_send(a,b,c,d) 0
 
71
#define Curl_scp_recv(a,b,c,d) 0
 
72
#define Curl_sftp_recv(a,b,c,d) 0
 
73
 
41
74
#endif /* USE_LIBSSH2 */
42
75
 
43
 
#endif /* __SSH_H */
 
76
#endif /* HEADER_CURL_SSH_H */