home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ncftp-2.3.0-base.tgz / ncftp-2.3.0-base.tar / contrib / ncftp / FTP.h < prev    next >
C/C++ Source or Header  |  1995-04-03  |  1KB  |  48 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. /* Parameter for OpenDataConnection() */
  12. #define kSendPortMode            0
  13. #define kPassiveMode            1
  14. #define kFallBackToSendPortMode    2
  15.  
  16. /* Parameter for AcceptDataConnection() */
  17. #define kAcceptForWriting        00100
  18. #define kAcceptForReading        00101
  19.  
  20. #define kDefaultFTPPort 21
  21.  
  22. /* To check if the user set the port. */
  23. #define kPortUnset 0
  24.  
  25. #ifndef INADDR_NONE
  26. #    define INADDR_NONE (0xffffffff)        /* <netinet/in.h> should have it. */
  27. #endif
  28.  
  29. typedef void (*HangupProc)(void);
  30.  
  31. void InitDefaultFTPPort(void);
  32. void MyInetAddr(char *dst, size_t siz, char **src, int i);
  33. int GetOurHostName(char *host, size_t siz);
  34. void CloseControlConnection(void);
  35. void SetTypeOfService(int sockfd, int tosType);
  36. void SetLinger(int sockfd);
  37. void SetInlineOutOfBandData(int sockfd);
  38. int OpenControlConnection(char *host, unsigned int port);
  39. void CloseDataConnection(void);
  40. int OpenDataConnection(int mode);
  41. int AcceptDataConnection(int mode);
  42. void SetPostHangupOnServerProc(HangupProc proc);
  43. void HangupOnServer(void);
  44. void SendTelnetInterrupt(void);
  45. int SetStartOffset(long);
  46.  
  47. #endif    /* _ftp_h_ */
  48.