home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Networking / ncftp-2.4.2-MIHS / src / FTP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-18  |  1.3 KB  |  54 lines

  1. /* FTP.h */
  2.  
  3. #ifndef _ftp_h_
  4. #define _ftp_h_ 1
  5.  
  6. /* Error types from OpenControlConnection() */
  7. #define kConnectNoErr            0
  8. #define kConnectErrFatal        (-1)
  9. #define kConnectErrReTryable    (-2)
  10.  
  11. /* Types of FTP server software. */
  12. #define kUnknownFTPd 0
  13. #define kGenericFTPd    1
  14. #define kWuFTPd    2
  15. #define kNcFTPd    3
  16.  
  17. /* Parameter for OpenDataConnection() */
  18. #define kSendPortMode            0
  19. #define kPassiveMode            1
  20. #define kFallBackToSendPortMode    2
  21.  
  22. /* Parameter for AcceptDataConnection() */
  23. #define kAcceptForWriting        00100
  24. #define kAcceptForReading        00101
  25.  
  26. #define kDefaultFTPPort 21
  27.  
  28. /* To check if the user set the port. */
  29. #define kPortUnset 0
  30.  
  31. #ifndef INADDR_NONE
  32. #    define INADDR_NONE (0xffffffff)        /* <netinet/in.h> should have it. */
  33. #endif
  34.  
  35. typedef void (*HangupProc)(void);
  36.  
  37. void InitDefaultFTPPort(void);
  38. void MyInetAddr(char *dst, size_t siz, char **src, int i);
  39. int GetOurHostName(char *host, size_t siz);
  40. void CloseControlConnection(void);
  41. void SetTypeOfService(int sockfd, int tosType);
  42. void SetLinger(int sockfd);
  43. void SetInlineOutOfBandData(int sockfd);
  44. int OpenControlConnection(char *host, unsigned int port);
  45. void CloseDataConnection(int);
  46. int OpenDataConnection(int mode);
  47. int AcceptDataConnection(void);
  48. void SetPostHangupOnServerProc(HangupProc proc);
  49. void HangupOnServer(void);
  50. void SendTelnetInterrupt(void);
  51. int SetStartOffset(long);
  52.  
  53. #endif    /* _ftp_h_ */
  54.