ftp_url_parse(3) C Library Calls ftp_url_parse(3)NAMEftp_url_parse - parse FTP URL
SYNOPSIS
#include <libfget.h>
int ftp_url_parse(char *url, struct ftp_url *ftpurl);
VERSION
This man page documents version 1.3 of libfget.
DESCRIPTION
The ftp_url_parse() function parses the URL string url and fills in the
fields of the structure pointed to by ftpurl. The structure contains
the following fields:
char fu_hostname[MAXHOSTNAMELEN];
The hostname.
char fu_login[MAXUSERNAMELEN];
The user name (if supplied).
char fu_passwd[MAXPASSLEN];
The password (if supplied).
char fu_path[MAXPATHLEN];
The path (if supplied).
char fu_type;
The RFC-1738 typecode ('i' for binary, 'a' for ascii, or 'd' for
directory), or '?' if no type was specified.
RETURN VALUES
The ftp_url_parse() function returns 0 on success or -1 on error (and
sets errno).
ERRORS
The ftp_url_parse() function fails if:
EINVAL The URL specified by url is invalid.
ENAMETOOLONG
One of the components of the URL is too long for the appropriate
field in ftpurl.
SEE ALSOlibfget(3)Feep Networks January 2004 ftp_url_parse(3)