forked from wolfSSL/wolfssh
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3905a05
commit 187e7f6
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifdef WOLFSSH_FILE_STREAM | ||
|
||
WOLFSSH_FILE* wolfSSH_FILE_open(WOLFSSH_FILE* f) | ||
{ | ||
file = fopen(); | ||
} | ||
#elif WOLFSSH_FILE_FD | ||
|
||
WOLFSSH_FILE* wolfSSH_FILE_open(WOLFSSH_FILE* f) | ||
{ | ||
file = open(); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef WOLFSSH_WOLFSSH_FILE_H | ||
#define WOLFSSH_WOLFSSH_FILE_H | ||
|
||
typedef struct WOLFSSH_FILE WOLFSSH_FILE; | ||
typedef struct WOLFSSH_DIR WOLFSSH_DIR; | ||
|
||
|
||
/* | ||
1. NO_FILESYSTEM | ||
2. WOLFSSH_NUCLEUS | ||
3. FREESCALE_MQX | ||
4. WOLFSSH_FATFS | ||
5. WOLFSSH_ZEPHYR | ||
*/ | ||
|
||
|
||
WOLFSSH_API WOLFSSH_FILE* wolfSSH_FILE_open(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_close(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_read(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_write(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_seek(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_tell(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_rewind(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_flush(WOLFSSH_FILE* f); | ||
WOLFSSH_API int wolfSSH_FILE_stat(WOLFSSH_FILE* f); | ||
|
||
wolfSSH_FILE_chmod(const char* fn); | ||
#define WSETTIME(fs,f,a,m) (0) | ||
#define WFSETTIME(fs,fd,a,m) (0) | ||
|
||
/* From Zephyr */ | ||
#define WFGETS(b,s,f) NULL /* Not ported yet */ | ||
#define WFPUTS(b,s) EOF /* Not ported yet */ | ||
#define WUTIMES(a,b) (0) /* Not ported yet */ | ||
#define WCHDIR(fs,b) z_fs_chdir((b)) | ||
|
||
#define WS_DELIM '\\' | ||
#define WOLFSSH_O_RDWR | ||
#define WOLFSSH_O_RDONLY | ||
#define WOLFSSH_O_WRONLY | ||
#define WOLFSSH_O_APPEND | ||
#define WOLFSSH_O_CREAT | ||
#define WOLFSSH_O_TRUNC | ||
#define WOLFSSH_O_EXCL | ||
#define WOLFSSH_MAX_FILENAME | ||
#define WBADFILE | ||
#define WSEEK_SET 0 | ||
#define WSEEK_CUR 1 | ||
#define WSEEK_END 2 | ||
|
||
#if defined(USE_WINDOWS_API) | ||
#elif defined(POSIX) | ||
#else | ||
/* USER DEFINED */ | ||
#endif | ||
|
||
#endif /* WOLFSSH_WOLFSSH_FILE_H */ |