File: FTP.h

package info (click to toggle)
ncftp2 1%3A2.4.3-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 872 kB
  • ctags: 1,231
  • sloc: ansic: 13,766; makefile: 176; sh: 9
file content (53 lines) | stat: -rw-r--r-- 1,366 bytes parent folder | download | duplicates (6)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* FTP.h */

#ifndef _ftp_h_
#define _ftp_h_ 1

/* Error types from OpenControlConnection() */
#define kConnectNoErr			0
#define kConnectErrFatal		(-1)
#define kConnectErrReTryable	(-2)

/* Types of FTP server software. */
#define kUnknownFTPd 0
#define kGenericFTPd	1
#define kWuFTPd	2
#define kNcFTPd	3

/* Parameter for OpenDataConnection() */
#define kSendPortMode			0
#define kPassiveMode			1
#define kFallBackToSendPortMode	2

/* Parameter for AcceptDataConnection() */
#define kAcceptForWriting		00100
#define kAcceptForReading		00101

#define kDefaultFTPPort 21

/* To check if the user set the port. */
#define kPortUnset 0

#ifndef INADDR_NONE
#	define INADDR_NONE (0xffffffff)		/* <netinet/in.h> should have it. */
#endif

typedef void (*HangupProc)(void);

void InitDefaultFTPPort(void);
void MyInetAddr(char *dst, size_t siz, char **src, int i);
int GetOurHostName(char *host, size_t siz);
void CloseControlConnection(void);
void SetTypeOfService(int sockfd, int tosType);
void SetLinger(int sockfd);
void SetInlineOutOfBandData(int sockfd);
int OpenControlConnection(char *host, unsigned int port);
void CloseDataConnection(int);
int OpenDataConnection(int mode);
int AcceptDataConnection(void);
void SetPostHangupOnServerProc(HangupProc proc);
void HangupOnServer(void);
void SendTelnetInterrupt(void);
int SetStartOffset(long);

#endif	/* _ftp_h_ */