|
| enum | ftp_reply_code {
FTP_CODE_110_RESTART_MARKER_REPLAY = 110
, FTP_CODE_120_SERVICE_READY_IN_NNN_MINUTES = 120
, FTP_CODE_125_DATA_CONN_ALREADY_OPEN = 125
, FTP_CODE_150_FILE_STATUS_OK = 150
,
FTP_CODE_200_OK = 200
, FTP_CODE_202_NOT_IMPLEMENTED = 202
, FTP_CODE_211_SYSTEM_STATUS = 211
, FTP_CODE_212_DIR_STATUS = 212
,
FTP_CODE_213_FILE_STATUS = 213
, FTP_CODE_214_HELP_MSG = 214
, FTP_CODE_215_NAME_SYSTEM_TYPE = 215
, FTP_CODE_220_SERVICE_READY = 220
,
FTP_CODE_221_SERVICE_CLOSING_CONN = 221
, FTP_CODE_225_DATA_CONN_OPEN = 225
, FTP_CODE_226_CLOSING_DATA_CONN_SUCCESS = 226
, FTP_CODE_227_ENTERING_PASSIVE_MODE = 227
,
FTP_CODE_228_ENTERING_LONG_PASSIVE_MODE = 228
, FTP_CODE_229_ENTERING_EXT_PASSIVE_MODE = 229
, FTP_CODE_230_USER_LOGGED_IN = 230
, FTP_CODE_231_USER_LOGGED_OUT = 231
,
FTP_CODE_233_LOGOUT_COMMAND_NOTED = 233
, FTP_CODE_234_SECURITY_ACCEPTED = 234
, FTP_CODE_250_FILE_ACTION_COMPLETED = 250
, FTP_CODE_257_PATHNAME_CREATED = 257
,
FTP_CODE_331_USERNAME_OK_NEED_PASSWORD = 331
, FTP_CODE_332_NEED_ACCOUNT = 332
, FTP_CODE_350_FILE_ACTION_PENDING = 350
, FTP_CODE_421_SERVICE_UNAVAILABLE = 421
,
FTP_CODE_425_CANNOT_OPEN_DATA_CONN = 425
, FTP_CODE_426_CONN_CLOSED = 426
, FTP_CODE_430_INVALID_USERNAME_OR_PASSWORD = 430
, FTP_CODE_434_HOST_UNAVAILABLE = 434
,
FTP_CODE_450_FILE_ACTION_NOT_TAKEN = 450
, FTP_CODE_451_ACTION_ABORTED = 451
, FTP_CODE_452_ACTION_NOT_TAKEN = 452
, FTP_CODE_500_GENERAL_ERROR = 500
,
FTP_CODE_501_SYNTAX_ERROR = 501
, FTP_CODE_502_COMMAND_NOT_COMPLETED = 502
, FTP_CODE_503_BAD_SEQUENCE_OF_COMMANDS = 503
, FTP_CODE_504_COMMAND_NOT_IMPLEMENTED = 504
,
FTP_CODE_530_NOT_LOGGED_IN = 530
, FTP_CODE_532_NEED_ACCOUNT = 532
, FTP_CODE_534_CANNOT_CONNECT_SSL_REQUIRED = 534
, FTP_CODE_550_FILE_UNAVAILABLE = 550
,
FTP_CODE_551_PAGE_TYPE_UNKNOWN = 551
, FTP_CODE_552_FILE_EXCEEDED_STORAGE_LOCATION = 552
, FTP_CODE_553_FILE_NAME_NOT_ALLOWED = 553
, FTP_CODE_631_INTEGRITY_PROTECTED_REPLY = 631
,
FTP_CODE_632_INT_AND_CONF_PROTECTED_REPLY = 632
, FTP_CODE_633_CONFIDENTIALITY_PROTECTED_REPLY = 633
, FTP_CODE_900_UNKNOWN_ERROR = 900
, FTP_CODE_901_DISCONNECTED_BY_REMOTE = 901
,
FTP_CODE_902_CONNECTION_ABORTED = 902
, FTP_CODE_903_SOCKET_POLL_ERROR = 903
, FTP_CODE_904_UNEXPECTED_POLL_EVENT = 904
, FTP_CODE_905_NETWORK_DOWN = 905
,
FTP_CODE_909_UNEXPECTED_ERROR = 909
, FTP_CODE_910_DATA_TRANSFER_TIMEOUT = 910
, FTP_CODE_10054_CONNECTION_RESET_BY_PEER = 10054
, FTP_CODE_10060_CANNOT_CONNECT = 10060
,
FTP_CODE_10061_CONNECTION_REFUSED = 10061
, FTP_CODE_10066_DIRECTORY_NOT_EMPTY = 10066
, FTP_CODE_10068_TOO_MANY_USERS = 10068
} |
| | List of FTP server reply codes Reference RFC959 FTP Transfer Protocol. More...
|
| enum | ftp_transfer_type { FTP_TYPE_ASCII
, FTP_TYPE_BINARY
} |
| | FTP transfer mode. More...
|
| enum | ftp_put_type { FTP_PUT_NORMAL
, FTP_PUT_UNIQUE
, FTP_PUT_APPEND
} |
| | FTP file write mode. More...
|
|
| int | ftp_init (struct ftp_client *client, ftp_client_callback_t ctrl_callback, ftp_client_callback_t data_callback) |
| | Initialize the FTP client context.
|
| int | ftp_uninit (struct ftp_client *client) |
| | Uninitialize the FTP client context.
|
| int | ftp_open (struct ftp_client *client, const char *hostname, uint16_t port, int sec_tag) |
| | Open FTP connection.
|
| int | ftp_login (struct ftp_client *client, const char *username, const char *password) |
| | FTP server login.
|
| int | ftp_close (struct ftp_client *client) |
| | Close FTP connection.
|
| int | ftp_status (struct ftp_client *client) |
| | Get FTP server and connection status Also returns server system type.
|
| int | ftp_type (struct ftp_client *client, enum ftp_transfer_type type) |
| | Set FTP transfer type.
|
| int | ftp_pwd (struct ftp_client *client) |
| | Print working directory.
|
| int | ftp_list (struct ftp_client *client, const char *options, const char *target) |
| | List information of folder or file.
|
| int | ftp_cwd (struct ftp_client *client, const char *folder) |
| | Change working directory.
|
| int | ftp_mkd (struct ftp_client *client, const char *folder) |
| | Make directory.
|
| int | ftp_rmd (struct ftp_client *client, const char *folder) |
| | Remove directory.
|
| int | ftp_rename (struct ftp_client *client, const char *old_name, const char *new_name) |
| | Rename a file.
|
| int | ftp_delete (struct ftp_client *client, const char *file) |
| | Delete a file.
|
| int | ftp_get (struct ftp_client *client, const char *file) |
| | Get a file.
|
| int | ftp_put (struct ftp_client *client, const char *file, const uint8_t *data, uint16_t length, int type) |
| | Put data to a file If file does not exist, create the file.
|
| int | ftp_keepalive (struct ftp_client *client) |
| | Exchange keep-alive commands with the server.
|
FTP client library.
Provide selected FTP client functionality