1 /* netrc.h -- declarations for netrc.c
2 * For license terms, see the file COPYING in this directory.
11 # define __BEGIN_DECLS extern "C" {
12 # define __END_DECLS }
14 # define __BEGIN_DECLS /* empty */
15 # define __END_DECLS /* empty */
18 /* The structure used to return account information from the .netrc. */
19 typedef struct _netrc_entry {
20 /* The exact host name given in the .netrc, NULL if default. */
23 /* The login name of the user. */
26 /* Password for the account (NULL, if none). */
29 /* Pointer to the next entry in the list. */
30 struct _netrc_entry *next;
34 /* Parse FILE as a .netrc file (as described in ftp(1)), and return a
35 list of entries. NULL is returned if the file could not be
37 netrc_entry *parse_netrc (char *file);
39 /* Return the netrc entry from LIST corresponding to HOST. NULL is
40 returned if no such entry exists. */
41 netrc_entry *search_netrc (netrc_entry *list, char *host, char *account);
43 /* Free the netrc list structure */
44 void free_netrc (netrc_entry *list);
47 #endif /* _NETRC_H_ */