cURL / Mailing Lists / curl-library / Single Mail

curl-library

RFC on sftp

From: James Housley <jim_at_thehousleys.net>
Date: Mon, 6 Nov 2006 19:15:20 -0500

The standard FTP/FTPS has a well defined message structure to send
commands and receive responses. For example

MKDR newdir

and

257 "/usr/home/me" is current directory.

However, the sftp interface is designed to work just like the
commands you would use to work with local files and directories. One
big example is getting a directory listing sftp uses opendir()/readdir
() compatible functions to return a DIR structure, which is basically
what I converted the text of a FTP directory listing into anyways.
HTTP has a very different interface then then FTP, but HTTP already
has a defined message structure.

Should I create an interface that uses the same basic commands, where
appropriate, for sftp? And simulate the responses? This is probably
best because it would make it easier to use a different
implementation. Mapping the FTP "MKDR" command to libssh2_sftp_mkdir
() is easy. The big question is how closely should I make the
responses match? Or should I just define the interface to be close
enough to FTP that adaptation is reasonable?

Jim

--
/"\   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
---------------------------------------------------------------------
The wise man built his network upon Un*x.
     The foolish man built his network upon Windows.
Received on 2006-11-07