blob: d980166e6b32c2bb8e9d6d0a8082672f86a796d5 [file] [log] [blame]
Kristian Monsen5ab50182010-05-14 18:53:44 +01001#ifndef HEADER_CURL_NETRC_H
2#define HEADER_CURL_NETRC_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070010 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
Kristian Monsen5ab50182010-05-14 18:53:44 +010011 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
Alex Deymo8f1a2142016-06-28 14:49:26 -070014 * are also available at https://curl.haxx.se/docs/copyright.html.
Kristian Monsen5ab50182010-05-14 18:53:44 +010015 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ***************************************************************************/
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070024
25/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */
Kristian Monsen5ab50182010-05-14 18:53:44 +010026int Curl_parsenetrc(const char *host,
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070027 char **loginp,
28 char **passwordp,
Kristian Monsen5ab50182010-05-14 18:53:44 +010029 char *filename);
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070030 /* Assume: (*passwordp)[0]=0, host[0] != 0.
31 * If (*loginp)[0] = 0, search for login and password within a machine
32 * section in the netrc.
33 * If (*loginp)[0] != 0, search for password within machine and login.
Kristian Monsen5ab50182010-05-14 18:53:44 +010034 */
35
36#endif /* HEADER_CURL_NETRC_H */