Download presentation
Presentation is loading. Please wait.
Published byDerrick Sharp Modified over 8 years ago
1
FTP Client API FTP in embedded devices Implementing an FTP Client FTP Command APIs Other FTP Client APIs
2
Uses for FTP in Embedded Devices FTP Connection User Upgrades the Master with new File USERMASTER Master then Upgrades all Devices on Network FTP
3
Integrating an FTP Client APIs provided for… put get mkdir bye rmdir del dir others Application Entry FCConnect(char server, char username, char password)
4
Sample FTP Client Implementation Declarations Connection Establishment Setup for FTP put Command #include fcIntapi.h
5
Sample FTP Client Implementation (2) FTP put Command #include fcIntapi.h
6
FTP Client Command APIs int FCRetrieveFile (unsigned long h, char *pathname, int type); int FCStoreFile (unsigned long h, char *pathname, int type); int FCSetCurrentDir (unsigned long h, char* dir); int FCGetCurrentDir (unsigned long h, char* buffer, int len); int FCListDir (unsigned long h, int verbose, char *szpathname, char *buffer, int len, int *flag); int FCDisconnect (unsigned long h); int FCMakeDir (unsigned long h, char* dir); int FCRemoveDir (unsigned long h, char* dir); int FCDeleteFile (unsigned long h, char* file);
7
Other FTP Client APIs int FCGetData (unsigned long h, char *buffer, int len); // needed to actually retrieve the data after an FCRetrieveFile call int FCPutData (unsigned long h, char *buffer, int len, int flag);// needed to actually send the data after an FCStoreFile call int FCHandleToSocket (unsigned long handle); // returns the control socket for the current session
8
FTP Client Summary FCConnect – issue commands – FCDisconnect Can retrieve and store files, set or get current directory make and remove directories FCGetData and FCPutData are required to process data after retrieve and store requests.
9
Net+Os v6.0 Enhancements File System
10
FTP Client (File System) Send files from the NETOS file system to FTP server Retrieve and save files from FTP server to NETOS file system
11
FTP Client (File System) FCSaveFile –Create/save a file in the file system. –Call FCRetrieveFile to initiate file retrieval from FTP server FCSendFile –Send a file from the file system to FTP server –Call FCStoreFile to initiate file creation in FTP server
12
FTP Client (File System) FCGetFileStatus – Return the status from FCSaveFile or FCSendFile call
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.