1 / 12

FTP Client API

FTP Client API. FTP in embedded devices Implementing an FTP Client FTP Command APIs Other FTP Client APIs. Uses for FTP in Embedded Devices. User Upgrades the Master with new File. USER. MASTER. FTP Connection. FTP. FTP. FTP. Master then Upgrades all Devices on Network.

kyne
Download Presentation

FTP Client API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 User Upgrades the Master with new File USER MASTER FTP Connection FTP FTP FTP Master then Upgrades all Devices on Network

  3. APIs provided for… • put • get • mkdir • bye • rmdir • del • dir • others Integrating an FTP Client FCConnect(char server, char username, char password) Application Entry

  4. Connection Establishment Setup for FTP put Command Sample FTP Client Implementation Declarations #include fcIntapi.h

  5. Sample FTP Client Implementation (2) #include fcIntapi.h FTP put Command

  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

More Related