1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** NetX Duo Component                                                    */
16 /**                                                                       */
17 /**   File Transfer Protocol (FTP)                                        */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 
23 /**************************************************************************/
24 /*                                                                        */
25 /*  APPLICATION INTERFACE DEFINITION                       RELEASE        */
26 /*                                                                        */
27 /*    nxd_ftp_client.h                                    PORTABLE C      */
28 /*                                                           6.1.9        */
29 /*  AUTHOR                                                                */
30 /*                                                                        */
31 /*    Yuxin Zhou, Microsoft Corporation                                   */
32 /*                                                                        */
33 /*  DESCRIPTION                                                           */
34 /*                                                                        */
35 /*    This file defines the NetX Duo File Transfer Protocol (FTP over     */
36 /*    IPv6) component, including all data types and external references.  */
37 /*    It is assumed that nx_api.h and nx_port.h have already been         */
38 /*    included, along with fx_api.h and fx_port.h.                        */
39 /*                                                                        */
40 /*  RELEASE HISTORY                                                       */
41 /*                                                                        */
42 /*    DATE              NAME                      DESCRIPTION             */
43 /*                                                                        */
44 /*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
45 /*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
46 /*                                            resulting in version 6.1    */
47 /*  10-15-2021     Yuxin Zhou               Modified comment(s), included */
48 /*                                            necessary header file,      */
49 /*                                            resulting in version 6.1.9  */
50 /*                                                                        */
51 /**************************************************************************/
52 
53 #ifndef NXD_FTP_CLIENT_H
54 #define NXD_FTP_CLIENT_H
55 
56 /* Determine if a C++ compiler is being used.  If so, ensure that standard
57    C is used to process the API information.  */
58 
59 #ifdef   __cplusplus
60 
61 /* Yes, C++ compiler is present.  Use standard C.  */
62 extern   "C" {
63 
64 #endif
65 
66 #include "nx_api.h"
67 
68 
69 /* Define the FTP Client ID.  */
70 
71 
72 #define NXD_FTP_CLIENT_ID                           0x46545200UL
73 
74 
75 /* Define the maximum number of clients the FTP Server can accommodate.  */
76 
77 #ifndef NX_FTP_MAX_CLIENTS
78 #define NX_FTP_MAX_CLIENTS                  4
79 #endif
80 
81 
82 /* Define FTP TCP socket create options.  Normally any TCP port will do but this
83    gives the application a means to specify a source port.  */
84 
85 #ifndef NX_FTP_CLIENT_SOURCE_PORT
86 #define NX_FTP_CLIENT_SOURCE_PORT           NX_ANY_PORT
87 #endif
88 
89 #ifndef NX_FTP_CONTROL_TOS
90 #define NX_FTP_CONTROL_TOS                  NX_IP_NORMAL
91 #endif
92 
93 #ifndef NX_FTP_DATA_TOS
94 #define NX_FTP_DATA_TOS                     NX_IP_NORMAL
95 #endif
96 
97 #ifndef NX_FTP_FRAGMENT_OPTION
98 #define NX_FTP_FRAGMENT_OPTION              NX_DONT_FRAGMENT
99 #endif
100 
101 #ifndef NX_FTP_CONTROL_WINDOW_SIZE
102 #define NX_FTP_CONTROL_WINDOW_SIZE          400
103 #endif
104 
105 #ifndef NX_FTP_DATA_WINDOW_SIZE
106 #define NX_FTP_DATA_WINDOW_SIZE             2048
107 #endif
108 
109 
110 #ifndef NX_FTP_TIME_TO_LIVE
111 #define NX_FTP_TIME_TO_LIVE                 0x80
112 #endif
113 
114 #ifndef NX_FTP_USERNAME_SIZE
115 #define NX_FTP_USERNAME_SIZE                20
116 #endif
117 
118 #ifndef NX_FTP_PASSWORD_SIZE
119 #define NX_FTP_PASSWORD_SIZE                20
120 #endif
121 
122 #ifndef NX_FTP_TIMEOUT_PERIOD
123 #define NX_FTP_TIMEOUT_PERIOD               60          /* Number of seconds to check                          */
124 #endif
125 
126 
127 
128 /* Define open types.  */
129 
130 #define NX_FTP_OPEN_FOR_READ                0x01        /* FTP file open for reading                           */
131 #define NX_FTP_OPEN_FOR_WRITE               0x02        /* FTP file open for writing                           */
132 
133 
134 /* Define transfer modes. Note: just support stream mode and block mode yet.  */
135 
136 #define NX_FTP_TRANSFER_MODE_STREAM         0           /* FTP stream transmission mode                        */
137 #define NX_FTP_TRANSFER_MODE_BLOCK          1           /* FTP block transmission mode                         */
138 #define NX_FTP_TRANSFER_MODE_COMPRESSED     2           /* FTP compressed transmission mode                    */
139 
140 
141 /* Define return code constants.  */
142 
143 #define NX_FTP_ERROR                        0xD0        /* Generic FTP internal error - deprecated             */
144 #define NX_FTP_TIMEOUT                      0xD1        /* FTP timeout occurred                                */
145 #define NX_FTP_FAILED                       0xD2        /* FTP error                                           */
146 #define NX_FTP_NOT_CONNECTED                0xD3        /* FTP not connected error                             */
147 #define NX_FTP_NOT_DISCONNECTED             0xD4        /* FTP not disconnected error                          */
148 #define NX_FTP_NOT_OPEN                     0xD5        /* FTP not opened error                                */
149 #define NX_FTP_NOT_CLOSED                   0xD6        /* FTP not closed error                                */
150 #define NX_FTP_END_OF_FILE                  0xD7        /* FTP end of file status                              */
151 #define NX_FTP_END_OF_LISTING               0xD8        /* FTP end of directory listing status                 */
152 #define NX_FTP_EXPECTED_1XX_CODE            0xD9        /* Expected a 1xx response from server                 */
153 #define NX_FTP_EXPECTED_2XX_CODE            0xDA        /* Expected a 2xx response from server                 */
154 #define NX_FTP_EXPECTED_22X_CODE            0xDB        /* Expected a 22x response from server                 */
155 #define NX_FTP_EXPECTED_23X_CODE            0xDC        /* Expected a 23x response from server                 */
156 #define NX_FTP_EXPECTED_3XX_CODE            0xDD        /* Expected a 3xx response from server                 */
157 #define NX_FTP_EXPECTED_33X_CODE            0xDE        /* Expected a 33x response from server                 */
158 #define NX_FTP_INVALID_NUMBER               0xDF        /* Extraced an invalid number from server response     */
159 #define NX_FTP_INVALID_ADDRESS              0x1D0       /* Invalid IP address parsed from FTP command          */
160 #define NX_FTP_INVALID_COMMAND              0x1D1       /* Invalid FTP command (bad syntax, unknown command)   */
161 #define NX_FTP_CLIENT_INVALID_SIZE          0x1D2       /* Invalid FTP file size                               */
162 #define NX_FTP_CLIENT_FILE_SIZE_ALREADY_SET 0x1D3       /* The file size is already set                        */
163 #define NX_FTP_CLIENT_NOT_BLOCK_MODE        0x1D4       /* Block mode is not enabled                           */
164 #define NX_FTP_CLIENT_END_OF_BLOCK          0x1D5       /* FTP end of block                                    */
165 
166 
167 /* Define FTP connection states.  */
168 
169 #define NX_FTP_STATE_NOT_CONNECTED          1           /* FTP not connected                                   */
170 #define NX_FTP_STATE_CONNECTED              2           /* FTP connected                                       */
171 #define NX_FTP_STATE_OPEN                   3           /* FTP file open for reading                           */
172 #define NX_FTP_STATE_WRITE_OPEN             4           /* FTP file open for writing                           */
173 
174 
175 /* Define the FTP Server TCP port numbers.  */
176 
177 #define NX_FTP_SERVER_CONTROL_PORT          21          /* Control Port for FTP server                         */
178 #define NX_FTP_SERVER_DATA_PORT             20          /* Data Port for FTP server in active transfer mode    */
179 
180 /* Define the size for buffer to store an IPv6 address represented in ASCII. */
181 #define NX_FTP_IPV6_ADDRESS_BUFSIZE         60
182 
183 /* Define the FTP basic commands.  The ASCII command will be parsed and converted to the numerical
184    representation shown below.  */
185 
186 #define NX_FTP_NOOP                         0
187 #define NX_FTP_USER                         1
188 #define NX_FTP_PASS                         2
189 #define NX_FTP_QUIT                         3
190 #define NX_FTP_RETR                         4
191 #define NX_FTP_STOR                         5
192 #define NX_FTP_RNFR                         6
193 #define NX_FTP_RNTO                         7
194 #define NX_FTP_DELE                         8
195 #define NX_FTP_RMD                          9
196 #define NX_FTP_MKD                          10
197 #define NX_FTP_NLST                         11
198 #define NX_FTP_PORT                         12
199 #define NX_FTP_CWD                          13
200 #define NX_FTP_PWD                          14
201 #define NX_FTP_TYPE                         15
202 #define NX_FTP_LIST                         16
203 #define NX_FTP_CDUP                         17
204 #define NX_FTP_INVALID                      18
205 #define NX_FTP_EPRT                         19
206 #define NX_FTP_PASV                         20
207 #define NX_FTP_EPSV                         21
208 #define NX_FTP_MODE                         22
209 
210 
211 
212 /* Define the basic FTP Client data structure.  */
213 
214 typedef struct NX_FTP_CLIENT_STRUCT
215 {
216     ULONG           nx_ftp_client_id;                               /* FTP Client ID                       */
217     CHAR           *nx_ftp_client_name;                             /* Name of this FTP client             */
218     NX_IP          *nx_ftp_client_ip_ptr;                           /* Pointer to associated IP structure  */
219     NX_PACKET_POOL *nx_ftp_client_packet_pool_ptr;                  /* Pointer to FTP client packet pool   */
220     ULONG           nx_ftp_client_server_ip;                        /* Server's IP address                 */
221     UINT            nx_ftp_client_state;                            /* State of FTP client                 */
222     NX_TCP_SOCKET   nx_ftp_client_control_socket;                   /* Client FTP control socket           */
223     NX_TCP_SOCKET   nx_ftp_client_data_socket;                      /* Client FTP data transfer socket     */
224     UINT            nx_ftp_client_data_port;                        /* Port the Client data socket binds   */
225     UINT            nx_ftp_client_passive_transfer_enabled;         /* Client enabled for passive transfer */
226     UINT            nx_ftp_client_transfer_mode;                    /* Client transfer mode                */
227     ULONG           nx_ftp_client_block_total_size;                 /* Total size of data in block mode    */
228     ULONG           nx_ftp_client_block_remaining_size;             /* Remaining size of data in block mode*/
229 } NX_FTP_CLIENT;
230 
231 
232 #ifndef NX_FTP_SOURCE_CODE
233 
234 /* Application caller is present, perform API mapping.  */
235 
236 /* Determine if error checking is desired.  If so, map API functions
237    to the appropriate error checking front-ends.  Otherwise, map API
238    functions to the core functions that actually perform the work.
239    Note: error checking is enabled by default.  */
240 
241 #ifdef NX_DISABLE_ERROR_CHECKING
242 
243 /* Services without error checking.  */
244 
245 #define nx_ftp_client_connect                       _nx_ftp_client_connect
246 #define nxd_ftp_client_connect                      _nxd_ftp_client_connect
247 #define nx_ftp_client_create                        _nx_ftp_client_create
248 #define nx_ftp_client_delete                        _nx_ftp_client_delete
249 #define nx_ftp_client_directory_create              _nx_ftp_client_directory_create
250 #define nx_ftp_client_directory_default_set         _nx_ftp_client_directory_default_set
251 #define nx_ftp_client_directory_delete              _nx_ftp_client_directory_delete
252 #define nx_ftp_client_directory_listing_get         _nx_ftp_client_directory_listing_get
253 #define nx_ftp_client_directory_listing_continue    _nx_ftp_client_directory_listing_continue
254 #define nx_ftp_client_disconnect                    _nx_ftp_client_disconnect
255 #define nx_ftp_client_file_close                    _nx_ftp_client_file_close
256 #define nx_ftp_client_file_delete                   _nx_ftp_client_file_delete
257 #define nx_ftp_client_file_open                     _nx_ftp_client_file_open
258 #define nx_ftp_client_file_read                     _nx_ftp_client_file_read
259 #define nx_ftp_client_file_rename                   _nx_ftp_client_file_rename
260 #define nx_ftp_client_file_write                    _nx_ftp_client_file_write
261 #define nx_ftp_client_file_size_set                 _nx_ftp_client_file_size_set
262 #define nx_ftp_client_passive_mode_set              _nx_ftp_client_passive_mode_set
263 #define nx_ftp_client_transfer_mode_set             _nx_ftp_client_transfer_mode_set
264 
265 #else
266 
267 /* Services with error checking.  */
268 
269 #define nx_ftp_client_connect                       _nxe_ftp_client_connect
270 #define nxd_ftp_client_connect                      _nxde_ftp_client_connect
271 #define nx_ftp_client_create                        _nxe_ftp_client_create
272 #define nx_ftp_client_delete                        _nxe_ftp_client_delete
273 #define nx_ftp_client_directory_create              _nxe_ftp_client_directory_create
274 #define nx_ftp_client_directory_default_set         _nxe_ftp_client_directory_default_set
275 #define nx_ftp_client_directory_delete              _nxe_ftp_client_directory_delete
276 #define nx_ftp_client_directory_listing_get         _nxe_ftp_client_directory_listing_get
277 #define nx_ftp_client_directory_listing_continue    _nxe_ftp_client_directory_listing_continue
278 #define nx_ftp_client_disconnect                    _nxe_ftp_client_disconnect
279 #define nx_ftp_client_file_close                    _nxe_ftp_client_file_close
280 #define nx_ftp_client_file_delete                   _nxe_ftp_client_file_delete
281 #define nx_ftp_client_file_open                     _nxe_ftp_client_file_open
282 #define nx_ftp_client_file_read                     _nxe_ftp_client_file_read
283 #define nx_ftp_client_file_rename                   _nxe_ftp_client_file_rename
284 #define nx_ftp_client_file_write                    _nxe_ftp_client_file_write
285 #define nx_ftp_client_file_size_set                 _nxe_ftp_client_file_size_set
286 #define nx_ftp_client_passive_mode_set              _nxe_ftp_client_passive_mode_set
287 #define nx_ftp_client_transfer_mode_set             _nxe_ftp_client_transfer_mode_set
288 
289 #endif
290 
291 /* Define the prototypes accessible to the application software.  */
292 
293 UINT        nx_ftp_client_connect(NX_FTP_CLIENT *ftp_client_ptr, ULONG server_ip, CHAR *username, CHAR *password, ULONG wait_option);
294 UINT        nxd_ftp_client_connect(NX_FTP_CLIENT *ftp_client_ptr, NXD_ADDRESS *server_ipduo, CHAR *username, CHAR *password, ULONG wait_option);
295 UINT        nx_ftp_client_create(NX_FTP_CLIENT *ftp_client_ptr, CHAR *ftp_client_name, NX_IP *ip_ptr, ULONG window_size, NX_PACKET_POOL *pool_ptr);
296 UINT        nx_ftp_client_delete(NX_FTP_CLIENT *ftp_client_ptr);
297 UINT        nx_ftp_client_directory_create(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_name, ULONG wait_option);
298 UINT        nx_ftp_client_directory_default_set(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_path, ULONG wait_option);
299 UINT        nx_ftp_client_directory_delete(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_name, ULONG wait_option);
300 UINT        nx_ftp_client_directory_listing_get(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_path, NX_PACKET **packet_ptr, ULONG wait_option);
301 UINT        nx_ftp_client_directory_listing_continue(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
302 UINT        nx_ftp_client_disconnect(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
303 UINT        nx_ftp_client_file_close(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
304 UINT        nx_ftp_client_file_delete(NX_FTP_CLIENT *ftp_client_ptr, CHAR *file_name, ULONG wait_option);
305 UINT        nx_ftp_client_file_open(NX_FTP_CLIENT *ftp_client_ptr, CHAR *file_name, UINT open_type, ULONG wait_option);
306 UINT        nx_ftp_client_file_read(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
307 UINT        nx_ftp_client_file_rename(NX_FTP_CLIENT *ftp_ptr, CHAR *filename, CHAR *new_filename, ULONG wait_option);
308 UINT        nx_ftp_client_file_write(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
309 UINT        nx_ftp_client_file_size_set(NX_FTP_CLIENT *ftp_client_ptr, ULONG file_size);
310 UINT        nx_ftp_client_passive_mode_set(NX_FTP_CLIENT *ftp_client_ptr, UINT passive_mode_enabled);
311 UINT        nx_ftp_client_transfer_mode_set(NX_FTP_CLIENT *ftp_client_ptr, UINT transfer_mode);
312 
313 #else
314 
315 /* FTP source code is being compiled, do not perform any API mapping.  */
316 
317 UINT        _nxe_ftp_client_connect(NX_FTP_CLIENT *ftp_client_ptr, ULONG server_ip, CHAR *username, CHAR *password, ULONG wait_option);
318 UINT        _nx_ftp_client_connect(NX_FTP_CLIENT *ftp_client_ptr, ULONG server_ip, CHAR *username, CHAR *password, ULONG wait_option);
319 UINT        _nxde_ftp_client_connect(NX_FTP_CLIENT *ftp_client_ptr, NXD_ADDRESS *server_ipduo, CHAR *username, CHAR *password, ULONG wait_option);
320 UINT        _nxd_ftp_client_connect(NX_FTP_CLIENT *ftp_client_ptr, NXD_ADDRESS *server_ipduo, CHAR *username, CHAR *password, ULONG wait_option);
321 UINT        _nxe_ftp_client_create(NX_FTP_CLIENT *ftp_client_ptr, CHAR *ftp_client_name, NX_IP *ip_ptr, ULONG window_size, NX_PACKET_POOL *pool_ptr);
322 UINT        _nx_ftp_client_create(NX_FTP_CLIENT *ftp_client_ptr, CHAR *ftp_client_name, NX_IP *ip_ptr, ULONG window_size, NX_PACKET_POOL *pool_ptr);
323 UINT        _nxe_ftp_client_delete(NX_FTP_CLIENT *ftp_client_ptr);
324 UINT        _nx_ftp_client_delete(NX_FTP_CLIENT *ftp_client_ptr);
325 UINT        _nxe_ftp_client_directory_create(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_name, ULONG wait_option);
326 UINT        _nx_ftp_client_directory_create(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_name, ULONG wait_option);
327 UINT        _nxe_ftp_client_directory_default_set(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_path, ULONG wait_option);
328 UINT        _nx_ftp_client_directory_default_set(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_path, ULONG wait_option);
329 UINT        _nxe_ftp_client_directory_delete(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_name, ULONG wait_option);
330 UINT        _nx_ftp_client_directory_delete(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_name, ULONG wait_option);
331 UINT        _nxe_ftp_client_directory_listing_get(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_path, NX_PACKET **packet_ptr, ULONG wait_option);
332 UINT        _nx_ftp_client_directory_listing_get(NX_FTP_CLIENT *ftp_client_ptr, CHAR *directory_path, NX_PACKET **packet_ptr, ULONG wait_option);
333 UINT        _nxe_ftp_client_directory_listing_continue(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
334 UINT        _nx_ftp_client_directory_listing_continue(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
335 UINT        _nxe_ftp_client_disconnect(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
336 UINT        _nx_ftp_client_disconnect(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
337 UINT        _nxe_ftp_client_file_close(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
338 UINT        _nx_ftp_client_file_close(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
339 UINT        _nxe_ftp_client_file_delete(NX_FTP_CLIENT *ftp_client_ptr, CHAR *file_name, ULONG wait_option);
340 UINT        _nx_ftp_client_file_delete(NX_FTP_CLIENT *ftp_client_ptr, CHAR *file_name, ULONG wait_option);
341 UINT        _nxe_ftp_client_file_open(NX_FTP_CLIENT *ftp_client_ptr, CHAR *file_name, UINT open_type, ULONG wait_option);
342 UINT        _nx_ftp_client_file_open(NX_FTP_CLIENT *ftp_client_ptr, CHAR *file_name, UINT open_type, ULONG wait_option);
343 UINT        _nxe_ftp_client_file_read(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
344 UINT        _nx_ftp_client_file_read(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
345 UINT        _nxe_ftp_client_file_rename(NX_FTP_CLIENT *ftp_client_ptr, CHAR *filename, CHAR *new_filename, ULONG wait_option);
346 UINT        _nx_ftp_client_file_rename(NX_FTP_CLIENT *ftp_ptr, CHAR *filename, CHAR *new_filename, ULONG wait_option);
347 UINT        _nxe_ftp_client_file_write(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
348 UINT        _nx_ftp_client_file_write(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
349 UINT        _nxe_ftp_client_file_size_set(NX_FTP_CLIENT *ftp_client_ptr, ULONG file_size);
350 UINT        _nx_ftp_client_file_size_set(NX_FTP_CLIENT *ftp_client_ptr, ULONG file_size);
351 UINT        _nxe_ftp_client_passive_mode_set(NX_FTP_CLIENT *ftp_client_ptr, UINT passive_mode_enabled);
352 UINT        _nx_ftp_client_passive_mode_set(NX_FTP_CLIENT *ftp_client_ptr, UINT passive_mode_enabled);
353 UINT        _nxe_ftp_client_transfer_mode_set(NX_FTP_CLIENT *ftp_client_ptr, UINT transfer_mode);
354 UINT        _nx_ftp_client_transfer_mode_set(NX_FTP_CLIENT *ftp_client_ptr, UINT transfer_mode);
355 
356 #endif   /* NX_FTP_SOURCE_CODE */
357 
358 /* Internal functions. */
359 VOID        _nx_ftp_client_data_disconnect(NX_TCP_SOCKET *data_socket_ptr);
360 UINT        _nx_ftp_client_packet_allocate(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
361 UINT        _nx_ftp_client_active_transfer_setup(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
362 UINT        _nx_ftp_client_passive_transfer_setup(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
363 VOID        _nx_ftp_client_data_socket_cleanup(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
364 UINT        _nx_ftp_client_block_mode_send(NX_FTP_CLIENT *ftp_client_ptr, ULONG wait_option);
365 UINT        _nx_ftp_client_block_header_send(NX_FTP_CLIENT *ftp_client_ptr, ULONG block_size);
366 UINT        _nx_ftp_client_block_header_retrieve(NX_FTP_CLIENT *ftp_client_ptr, NX_PACKET *packet_ptr);
367 UINT        _nx_ftp_client_connect_internal(NX_FTP_CLIENT *ftp_client_ptr, NXD_ADDRESS *server_ip, CHAR *username, CHAR *password, ULONG wait_option);
368 UINT        _nx_ftp_utility_convert_IPv6_to_ascii(NX_TCP_SOCKET *tcp_socket_ptr, CHAR *buffer, UINT buffer_length, UINT *size);
369 UINT        _nx_ftp_utility_convert_number_ascii(ULONG number, CHAR *numstring);
370 UINT        _nx_ftp_utility_convert_portnumber_ascii(UINT number, CHAR *numstring, UINT *numstring_length);
371 
372 
373 /* Determine if a C++ compiler is being used.  If so, complete the standard
374    C conditional started above.  */
375 #ifdef   __cplusplus
376         }
377 #endif
378 
379 #endif  /* NXD_FTP_CLIENT_H */
380