ftp_url_parse(3)

NAME
ftp_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.2 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).

RETURN VALUES
The ftp_url_parse() function returns 0 on success or -1 on error (and sets errno).

SEE ALSO
ftp_connect(3)