ftp_site man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

ftp_site(3)			C Library Calls			   ftp_site(3)

NAME
       ftp_site, ftp_site_open - perform a site-specific FTP operation

SYNOPSIS
       #include <libfget.h>

       int ftp_site(FTP *ftp, char *fmt, ...);

       int  ftp_site_open(FTPFILE  **ftpfile,  FTP  *ftp, int mode, char *fmt,
       ...);

VERSION
       This man page documents version 1.3 of libfget.

DESCRIPTION
       The ftp_site() function executes an  FTP	 "SITE"	 command  on  the  FTP
       server associated with ftp.

       The  ftp_site_open()  function is used to execute a "SITE" command that
       opens a data connection.	 It creates a new FTPFILE handle for  the  new
       data  connection and sets ftpfile to point to the newly created handle.
       The mode argument must be one of the following values:

       O_RDONLY
	      The data connection is opened in read-only mode.

       O_WRONLY
	      The data connection is opened in write-only mode.

       The FTPFILE handle returned in ftpfile may be used the same way	as  an
       FTPFILE	handle	returned  by  ftp_open(3).   In other words, it can be
       passed to ftp_read(3) or ftp_write(3) to read or	 write	data,  and  it
       must  be	 freed	by  calling ftp_close(3) before another FTPFILE may be
       opened.

       For both functions,  the	 fmt  argument	is  a  printf(3)-style	format
       string.	 It,  along  with  any	optional arguments that may follow it,
       specifies the site command to be executed (i.e., the text sent  to  the
       FTP server after the "SITE" verb itself).

RETURN VALUE
       The ftp_site() and ftp_site_open() functions return 0 on success, or -1
       on error (and set errno).

ERRORS
       The ftp_site() and ftp_site_open() functions fail if:

       ECONNRESET
	      The server shut down the connection.  The caller is then respon‐
	      sible for calling ftp_quit() with the FTP_QUIT_FAST flag set.

       ETIMEDOUT
	      The  operation  timed out.  (The timeout interval can be set via
	      the FTP_OPT_IO_TIMEOUT option; see  the  ftp_set_options(3)  man
	      page for details.)

       EINVAL Unexpected response code received from server.

       EAGAIN An  attempt  was	made to send a request to the server while the
	      data connection is open.

       They may also fail for any of the errors specified for  the  underlying
       poll(2), read(2) or write(2) system calls.

       The ftp_site_open() function will also fail if:

       ENOSYS The mode argument was set to an unsupported value.

       It  will	 also  fail for any of the errors specified for the underlying
       socket(2), connect(2), fcntl(2) (using F_GETFL and  F_SETFL),  or  cal‐
       loc(3) system and library calls.

SEE ALSO
       libfget(3), ftp_open(3)

Feep Networks			 January 2004			   ftp_site(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net