Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

374 lines
5.6 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name :
  4. ftpcmd.hxx
  5. Abstract:
  6. This module declares the data type and functions required for various
  7. FTP commands supported by this FTP server.
  8. Author:
  9. Murali R. Krishnan ( MuraliK ) 28-Mar-1995
  10. Environment:
  11. User Mode -- Win32
  12. Project:
  13. FTP Server DLL
  14. Revision History:
  15. --*/
  16. # ifndef _FTPCMD_HXX_
  17. # define _FTPCMD_HXX_
  18. /************************************************************
  19. * Include Headers
  20. ************************************************************/
  21. /************************************************************
  22. * Type Definitions
  23. ************************************************************/
  24. //
  25. // Pointer to an implemention of a server-side command.
  26. //
  27. typedef BOOL (* LPFN_COMMAND)( USER_DATA * pUserData, CHAR * pszArg );
  28. //
  29. // This enumerator indicates the type of argument accepted by a
  30. // command. This is used in the command table to do some
  31. // preliminary argument validation.
  32. //
  33. typedef enum _ARG_TYPE
  34. {
  35. ArgTypeFirst = -1, // Must be first argument type!
  36. ArgTypeNone, // Command cannot have arguments.
  37. ArgTypeOptional, // Command may have arguments.
  38. ArgTypeRequired, // Command must have arguments.
  39. ArgTypeLast // Must be last argument type!
  40. } ARG_TYPE;
  41. #define IS_VALID_ARG_TYPE(x) (((x) > ArgTypeFirst) && ((x) < ArgTypeLast))
  42. //
  43. // This structure represents an FTP server command. There is at
  44. // least one instance of this structure for each FTP command.
  45. // In some cases (for example, CWD and XCWD) multiple commands are
  46. // mapped to the same command token.
  47. //
  48. typedef struct _FTPD_COMMAND
  49. {
  50. //
  51. // Name of the command, in UPPER case.
  52. //
  53. LPSTR CommandName;
  54. //
  55. // Help text for this command.
  56. //
  57. LPSTR HelpText;
  58. //
  59. // Pointer to the function that implements this command.
  60. //
  61. LPFN_COMMAND Implementation;
  62. //
  63. // Argument type for this command.
  64. //
  65. ARG_TYPE ArgumentType;
  66. //
  67. // Valid User state for a command to be accepted.
  68. //
  69. DWORD dwUserState; // bitflag consisting of user state.
  70. #ifdef KEEP_COMMAND_STATS
  71. //
  72. // Usage statistics for this command.
  73. //
  74. DWORD UsageCount;
  75. #endif // KEEP_COMMAND_STATS
  76. } FTPD_COMMAND, * LPFTPD_COMMAND;
  77. /************************************************************
  78. * Prototypes for functions
  79. ************************************************************/
  80. BOOL
  81. MainUSER(
  82. LPUSER_DATA pUserData,
  83. LPSTR pszArg
  84. );
  85. BOOL
  86. MainPASS(
  87. LPUSER_DATA pUserData,
  88. LPSTR pszArg
  89. );
  90. BOOL
  91. MainACCT(
  92. LPUSER_DATA pUserData,
  93. LPSTR pszArg
  94. );
  95. BOOL
  96. MainCWD(
  97. LPUSER_DATA pUserData,
  98. LPSTR pszArg
  99. );
  100. BOOL
  101. MainCDUP(
  102. LPUSER_DATA pUserData,
  103. LPSTR pszArg
  104. );
  105. BOOL
  106. MainSIZE(
  107. LPUSER_DATA pUserData,
  108. LPSTR pszArg
  109. );
  110. BOOL
  111. MainMDTM(
  112. LPUSER_DATA pUserData,
  113. LPSTR pszArg
  114. );
  115. BOOL
  116. MainSMNT(
  117. LPUSER_DATA pUserData,
  118. LPSTR pszArg
  119. );
  120. BOOL
  121. MainQUIT(
  122. LPUSER_DATA pUserData,
  123. LPSTR pszArg
  124. );
  125. BOOL
  126. MainREIN(
  127. LPUSER_DATA pUserData,
  128. LPSTR pszArg
  129. );
  130. BOOL
  131. MainPORT(
  132. LPUSER_DATA pUserData,
  133. LPSTR pszArg
  134. );
  135. BOOL
  136. MainPASV(
  137. LPUSER_DATA pUserData,
  138. LPSTR pszArg
  139. );
  140. BOOL
  141. MainTYPE(
  142. LPUSER_DATA pUserData,
  143. LPSTR pszArg
  144. );
  145. BOOL
  146. MainSTRU(
  147. LPUSER_DATA pUserData,
  148. LPSTR pszArg
  149. );
  150. BOOL
  151. MainMODE(
  152. LPUSER_DATA pUserData,
  153. LPSTR pszArg
  154. );
  155. BOOL
  156. MainRETR(
  157. LPUSER_DATA pUserData,
  158. LPSTR pszArg
  159. );
  160. BOOL
  161. MainSTOR(
  162. LPUSER_DATA pUserData,
  163. LPSTR pszArg
  164. );
  165. BOOL
  166. MainSTOU(
  167. LPUSER_DATA pUserData,
  168. LPSTR pszArg
  169. );
  170. BOOL
  171. MainAPPE(
  172. LPUSER_DATA pUserData,
  173. LPSTR pszArg
  174. );
  175. BOOL
  176. MainALLO(
  177. LPUSER_DATA pUserData,
  178. LPSTR pszArg
  179. );
  180. BOOL
  181. MainREST(
  182. LPUSER_DATA pUserData,
  183. LPSTR pszArg
  184. );
  185. BOOL
  186. MainRNFR(
  187. LPUSER_DATA pUserData,
  188. LPSTR pszArg
  189. );
  190. BOOL
  191. MainRNTO(
  192. LPUSER_DATA pUserData,
  193. LPSTR pszArg
  194. );
  195. BOOL
  196. MainABOR(
  197. LPUSER_DATA pUserData,
  198. LPSTR pszArg
  199. );
  200. BOOL
  201. MainDELE(
  202. LPUSER_DATA pUserData,
  203. LPSTR pszArg
  204. );
  205. BOOL
  206. MainRMD(
  207. LPUSER_DATA pUserData,
  208. LPSTR pszArg
  209. );
  210. BOOL
  211. MainMKD(
  212. LPUSER_DATA pUserData,
  213. LPSTR pszArg
  214. );
  215. BOOL
  216. MainPWD(
  217. LPUSER_DATA pUserData,
  218. LPSTR pszArg
  219. );
  220. BOOL
  221. MainLIST(
  222. LPUSER_DATA pUserData,
  223. LPSTR pszArg
  224. );
  225. BOOL
  226. MainNLST(
  227. LPUSER_DATA pUserData,
  228. LPSTR pszArg
  229. );
  230. BOOL
  231. MainSITE(
  232. LPUSER_DATA pUserData,
  233. LPSTR pszArg
  234. );
  235. BOOL
  236. MainSYST(
  237. LPUSER_DATA pUserData,
  238. LPSTR pszArg
  239. );
  240. BOOL
  241. MainSTAT(
  242. LPUSER_DATA pUserData,
  243. LPSTR pszArg
  244. );
  245. BOOL
  246. MainHELP(
  247. LPUSER_DATA pUserData,
  248. LPSTR pszArg
  249. );
  250. BOOL
  251. MainNOOP(
  252. LPUSER_DATA pUserData,
  253. LPSTR pszArg
  254. );
  255. BOOL
  256. SiteDIRSTYLE(
  257. LPUSER_DATA pUserData,
  258. LPSTR pszArg
  259. );
  260. BOOL
  261. SiteCKM(
  262. LPUSER_DATA pUserData,
  263. LPSTR pszArg
  264. );
  265. BOOL
  266. SiteHELP(
  267. LPUSER_DATA pUserData,
  268. LPSTR pszArg
  269. );
  270. #ifdef KEEP_COMMAND_STATS
  271. BOOL
  272. SiteSTATS(
  273. LPUSER_DATA pUserData,
  274. LPSTR pszArg
  275. );
  276. #endif // KEEP_COMMAND_STATS
  277. # endif // _FTPCMD_HXX_
  278. /************************ End of File ***********************/
  279.