summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib/ftp.h
blob: 176069bc272176445210b86d338d580a25d2cc94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*     $OpenBSD: ftp.h,v 1.2 1996/06/04 08:43:43 niklas Exp $	*/

#ifndef _FTP_H_INCLUDE
#define _FTP_H_INCLUDE

typedef struct {
    enum {init, isopen, xfer} state;
    int		fd_ctrl;
    int		fd_xfer;
    int		fd_debug;
    int		binary;
    int		passive;
    int		addrtype;
    char	*host;
    char	*file;
} *FTP_t;

FTP_t		FtpInit();
int		FtpOpen(FTP_t, char *host, char *user, char *passwd);
#define 	FtpBinary(ftp,bool)	{ (ftp)->binary = (bool); }
#define 	FtpPassive(ftp,bool)	{ (ftp)->passive = (bool); }
int		FtpChdir(FTP_t, char *);
int		FtpGet(FTP_t, char *);
int		FtpEOF(FTP_t);
void		FtpClose(FTP_t);

#endif
/* _FTP_H_INCLUDE */