K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
Loading...
Searching...
No Matches
ftp.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <kfsw/services/parameter.h>

Data Structures

struct  kfsw_ftp_entry
 
struct  kfsw_ftp_stat
 
struct  kfsw_ftp_transfer_result
 
struct  kfsw_ftp_stats
 

Macros

#define KFSW_FTP_MAX_PATH_SIZE   96U
 
#define KFSW_FTP_CHUNK_SIZE   192U
 
#define KFSW_FTP_STORAGE_ROOT   "/kfsw/ftp"
 
#define KFSW_FTP_READONLY_ROOT   "/kfsw/hk"
 
#define KFSW_FTP_HK_PATH   "hk"
 
#define KFSW_FTP_BOOT_PATH   "boot"
 
#define KFSW_FTP_TMP_PATH   "tmp"
 
#define KFSW_FTP_TIMEOUT_MIN_MS   1000U
 
#define KFSW_FTP_TIMEOUT_MAX_MS   120000U
 
#define KFSW_FTP_PARAM_TABLE_ID   29U
 
#define KFSW_FTP_PARAM_TABLE_NAME   "ftp"
 

Types

typedef bool(* kfsw_ftp_list_visitor_t) (const struct kfsw_ftp_entry *entry, void *context)
 

Enumerations

enum  kfsw_ftp_entry_type { KFSW_FTP_ENTRY_FILE = 1 , KFSW_FTP_ENTRY_DIRECTORY = 2 }
 
enum  kfsw_event_ftp_id { KFSW_EVENT_FTP_PUT_DONE = 1 , KFSW_EVENT_FTP_GET_DONE = 2 , KFSW_EVENT_FTP_TRANSFER_FAILED = 3 }
 

Functions

int kfsw_ftp_get_stats (struct kfsw_ftp_stats *stats)
 
uint32_t kfsw_ftp_get_timeout_ms (void)
 
int kfsw_ftp_set_timeout_ms (uint32_t timeout_ms)
 
int kfsw_ftp_check_timeout_ms (uint32_t timeout_ms)
 
uint16_t kfsw_ftp_get_chunk_size (void)
 
int kfsw_ftp_set_chunk_size (uint16_t chunk_size)
 
int kfsw_ftp_check_chunk_size (uint16_t chunk_size)
 
int kfsw_ftp_init (void)
 
int kfsw_ftp_start (void)
 
bool kfsw_ftp_is_started (void)
 
int kfsw_ftp_validate_path (const char *path, bool allow_root)
 
int kfsw_ftp_list (uint16_t node, const char *path, kfsw_ftp_list_visitor_t visitor, void *context)
 
int kfsw_ftp_stat (uint16_t node, const char *path, struct kfsw_ftp_stat *info)
 
int kfsw_ftp_mkdir (uint16_t node, const char *path)
 
int kfsw_ftp_remove (uint16_t node, const char *path)
 
int kfsw_ftp_put (uint16_t node, const char *local_path, const char *remote_path, struct kfsw_ftp_transfer_result *result)
 
int kfsw_ftp_get (uint16_t node, const char *remote_path, const char *local_path, struct kfsw_ftp_transfer_result *result)
 

Variables

const struct kfsw_param_definition_set kfsw_ftp_param_definitions
 

Description

Sandboxed CSP/RDP file-transfer API.