cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question on function layout, libssh2

From: James Housley <jim_at_thehousleys.net>
Date: Fri, 13 Oct 2006 20:30:00 -0400

On Oct 13, 2006, at 5:07 PM, Daniel Stenberg wrote:

> On Fri, 13 Oct 2006, James Housley wrote:
>
>> I have 3 basic functions Curl_sftp_connect(), Curl_sftp() and
>> Curl_sftp_done()
>>
>> Curl_sftp_connect() does the initial connection and authentications.
>>
>> Curl_sftp_done() does cleanup to close it down.
>>
>> Curl_sftp_connect():
>> * In here I should open the remote file with the right mode?
>> * Call Curl_Transfer()?
>
> Not exactly. See below.
>
>> To help reduce these questions, is there a document that I missed
>> the the architecture for the internals?
>
> There is one (rather outdated) in docs/INTERNALS.
>
> The basic concept is that each protocol has two pairs of functions:
>
> 1 - connect/disconnect that deal with protocol-stuff that needs to
> be done immediately after TCP connect is done and immediately
> before TCP disconnect is performed
>
> 2 - do/done, that is doing what needs to be done to set up the
> transfer of a given file and what needs to be done after the
> transfer is complete
>
> The actual tranfer is setup with Curl_Transfer(), but do note that
> this function is called Curl_setup_transfer() now in CVS and you
> really should base your work on the CVS version and not any release
> version...
>
> But as you shall see, lots of stuff within libcurl aren't as
> separated and clean as they should be. We really don't add
> protocols that often so we haven't yet learned how to make the
> architecture streamlined for it.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/
> curl.html

At least working with 7.15.5 I was able to do work. I checked out
from the CVS about an hour ago. Install automake 1.7, because it
didn't like automake 1.6. Now I am getting this error

[pied:~/work/curl] housley% ./buildconf AUTOMAKE=automake-1.7
buildconf: autoconf version 2.60 (ok)
buildconf: autoheader version 2.60 (ok)
buildconf: automake version 1.7.9 (ok)
buildconf: aclocal found
buildconf: libtool version 1.5 (ok)
buildconf: libtoolize found
buildconf: GNU m4 version 1.4.2 (ok)
buildconf: running libtoolize
buildconf: running aclocal
buildconf: running aclocal hack to convert all mv to mv -f
buildconf: running autoheader
buildconf: cp lib/config.h.in src/config.h.in
buildconf: running autoconf
configure.ac:111: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
       If this token and others are legitimate, please use
m4_pattern_allow.
       See the Autoconf documentation.
configure.ac:114: error: possibly undefined macro: AC_PROG_LIBTOOL
The autoconf command failed
[pied:~/work/curl] housley% uname -a
Darwin pied.int.thehousleys.net 8.8.0 Darwin Kernel Version 8.8.0:
Fri Sep 8 17:18:57 PDT 2006; root:xnu-792.12.6.obj~1/RELEASE_PPC
Power Macintosh powerpc

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
In theory there is no difference between theory and practice.
In practice there is no similarity.
       -- From the "I wish I'd said that" archives.
Received on 2006-10-14