Leaked source code of windows server 2003
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.

386 lines
6.1 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. MainFEAT(
  92. LPUSER_DATA pUserData,
  93. LPSTR pszArg
  94. );
  95. BOOL
  96. MainOPTS(
  97. LPUSER_DATA pUserData,
  98. LPSTR pszArg
  99. );
  100. BOOL
  101. MainACCT(
  102. LPUSER_DATA pUserData,
  103. LPSTR pszArg
  104. );
  105. BOOL
  106. MainCWD(
  107. LPUSER_DATA pUserData,
  108. LPSTR pszArg
  109. );
  110. BOOL
  111. MainCDUP(
  112. LPUSER_DATA pUserData,
  113. LPSTR pszArg
  114. );
  115. BOOL
  116. MainSIZE(
  117. LPUSER_DATA pUserData,
  118. LPSTR pszArg
  119. );
  120. BOOL
  121. MainMDTM(
  122. LPUSER_DATA pUserData,
  123. LPSTR pszArg
  124. );
  125. BOOL
  126. MainSMNT(
  127. LPUSER_DATA pUserData,
  128. LPSTR pszArg
  129. );
  130. BOOL
  131. MainQUIT(
  132. LPUSER_DATA pUserData,
  133. LPSTR pszArg
  134. );
  135. BOOL
  136. MainREIN(
  137. LPUSER_DATA pUserData,
  138. LPSTR pszArg
  139. );
  140. BOOL
  141. MainPORT(
  142. LPUSER_DATA pUserData,
  143. LPSTR pszArg
  144. );
  145. BOOL
  146. MainPASV(
  147. LPUSER_DATA pUserData,
  148. LPSTR pszArg
  149. );
  150. BOOL
  151. MainTYPE(
  152. LPUSER_DATA pUserData,
  153. LPSTR pszArg
  154. );
  155. BOOL
  156. MainSTRU(
  157. LPUSER_DATA pUserData,
  158. LPSTR pszArg
  159. );
  160. BOOL
  161. MainMODE(
  162. LPUSER_DATA pUserData,
  163. LPSTR pszArg
  164. );
  165. BOOL
  166. MainRETR(
  167. LPUSER_DATA pUserData,
  168. LPSTR pszArg
  169. );
  170. BOOL
  171. MainSTOR(
  172. LPUSER_DATA pUserData,
  173. LPSTR pszArg
  174. );
  175. BOOL
  176. MainSTOU(
  177. LPUSER_DATA pUserData,
  178. LPSTR pszArg
  179. );
  180. BOOL
  181. MainAPPE(
  182. LPUSER_DATA pUserData,
  183. LPSTR pszArg
  184. );
  185. BOOL
  186. MainALLO(
  187. LPUSER_DATA pUserData,
  188. LPSTR pszArg
  189. );
  190. BOOL
  191. MainREST(
  192. LPUSER_DATA pUserData,
  193. LPSTR pszArg
  194. );
  195. BOOL
  196. MainRNFR(
  197. LPUSER_DATA pUserData,
  198. LPSTR pszArg
  199. );
  200. BOOL
  201. MainRNTO(
  202. LPUSER_DATA pUserData,
  203. LPSTR pszArg
  204. );
  205. BOOL
  206. MainABOR(
  207. LPUSER_DATA pUserData,
  208. LPSTR pszArg
  209. );
  210. BOOL
  211. MainDELE(
  212. LPUSER_DATA pUserData,
  213. LPSTR pszArg
  214. );
  215. BOOL
  216. MainRMD(
  217. LPUSER_DATA pUserData,
  218. LPSTR pszArg
  219. );
  220. BOOL
  221. MainMKD(
  222. LPUSER_DATA pUserData,
  223. LPSTR pszArg
  224. );
  225. BOOL
  226. MainPWD(
  227. LPUSER_DATA pUserData,
  228. LPSTR pszArg
  229. );
  230. BOOL
  231. MainLIST(
  232. LPUSER_DATA pUserData,
  233. LPSTR pszArg
  234. );
  235. BOOL
  236. MainNLST(
  237. LPUSER_DATA pUserData,
  238. LPSTR pszArg
  239. );
  240. BOOL
  241. MainSITE(
  242. LPUSER_DATA pUserData,
  243. LPSTR pszArg
  244. );
  245. BOOL
  246. MainSYST(
  247. LPUSER_DATA pUserData,
  248. LPSTR pszArg
  249. );
  250. BOOL
  251. MainSTAT(
  252. LPUSER_DATA pUserData,
  253. LPSTR pszArg
  254. );
  255. BOOL
  256. MainHELP(
  257. LPUSER_DATA pUserData,
  258. LPSTR pszArg
  259. );
  260. BOOL
  261. MainNOOP(
  262. LPUSER_DATA pUserData,
  263. LPSTR pszArg
  264. );
  265. BOOL
  266. SiteDIRSTYLE(
  267. LPUSER_DATA pUserData,
  268. LPSTR pszArg
  269. );
  270. BOOL
  271. SiteCKM(
  272. LPUSER_DATA pUserData,
  273. LPSTR pszArg
  274. );
  275. BOOL
  276. SiteHELP(
  277. LPUSER_DATA pUserData,
  278. LPSTR pszArg
  279. );
  280. #ifdef KEEP_COMMAND_STATS
  281. BOOL
  282. SiteSTATS(
  283. LPUSER_DATA pUserData,
  284. LPSTR pszArg
  285. );
  286. #endif // KEEP_COMMAND_STATS
  287. # endif // _FTPCMD_HXX_
  288. /************************ End of File ***********************/