Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
tftp_context Struct Reference
[TFTP server]
TFTP context containing callback functions for TFTP transfers. More...
#include <tftp_server.h>
Data Fields | |
void *(* | open )(const char *fname, const char *mode, u8_t write) |
Open file for read/write. | |
void(* | close )(void *handle) |
Close file handle. | |
int(* | read )(void *handle, void *buf, int bytes) |
Read from file. | |
int(* | write )(void *handle, struct pbuf *p) |
Write to file. |
Detailed Description
TFTP context containing callback functions for TFTP transfers.
Definition at line 55 of file tftp_server.h.
Field Documentation
void(* close)(void *handle) |
Close file handle.
- Parameters:
-
handle File handle returned by open()
Definition at line 68 of file tftp_server.h.
Open file for read/write.
- Parameters:
-
fname Filename mode Mode string from TFTP RFC 1350 (netascii, octet, mail) write Flag indicating read (0) or write (!= 0) access
- Returns:
- File handle supplied to other functions
Definition at line 63 of file tftp_server.h.
int(* read)(void *handle, void *buf, int bytes) |
Read from file.
- Parameters:
-
handle File handle returned by open() buf Target buffer to copy read data to bytes Number of bytes to copy to buf
- Returns:
- >= 0: Success; < 0: Error
Definition at line 76 of file tftp_server.h.
Write to file.
- Parameters:
-
handle File handle returned by open() pbuf PBUF adjusted such that payload pointer points to the beginning of write data. In other words, TFTP headers are stripped off.
- Returns:
- >= 0: Success; < 0: Error
Definition at line 85 of file tftp_server.h.
Generated on Tue Jul 12 2022 12:22:51 by
