Zephyr Project API
3.4.0
A Scalable Open Source RTOS
|
Zephyr TFTP Implementation. More...
Go to the source code of this file.
Data Structures | |
struct | tftp_data_param |
Parameters for data event. More... | |
struct | tftp_error_param |
Parameters for error event. More... | |
union | tftp_evt_param |
Defines event parameters notified along with asynchronous events to the application. More... | |
struct | tftp_evt |
Defines TFTP asynchronous event notified to the application. More... | |
struct | tftpc |
TFTP client definition to maintain information relevant to the client. More... | |
Macros | |
#define | TFTP_BLOCK_SIZE 512 |
#define | TFTP_HEADER_SIZE 4 |
#define | TFTPC_MAX_BUF_SIZE (TFTP_BLOCK_SIZE + TFTP_HEADER_SIZE) |
#define | TFTPC_SUCCESS 0 |
#define | TFTPC_DUPLICATE_DATA -1 |
#define | TFTPC_BUFFER_OVERFLOW -2 |
#define | TFTPC_UNKNOWN_FAILURE -3 |
#define | TFTPC_REMOTE_ERROR -4 |
#define | TFTPC_RETRIES_EXHAUSTED -5 |
Typedefs | |
typedef void(* | tftp_callback_t) (const struct tftp_evt *evt) |
TFTP event notification callback registered by the application. More... | |
Enumerations | |
enum | tftp_evt_type { TFTP_EVT_DATA , TFTP_EVT_ERROR } |
TFTP Asynchronous Events notified to the application from the module through the callback registered by the application. More... | |
Functions | |
int | tftp_get (struct tftpc *client, const char *remote_file, const char *mode) |
int | tftp_put (struct tftpc *client, const char *remote_file, const char *mode, const uint8_t *user_buf, uint32_t user_buf_size) |
Zephyr TFTP Implementation.
#define TFTP_BLOCK_SIZE 512 |
RFC1350: the file is sent in fixed length blocks of 512 bytes. Each data packet contains one block of data, and must be acknowledged by an acknowledgment packet before the next packet can be sent. A data packet of less than 512 bytes signals termination of a transfer.
#define TFTP_HEADER_SIZE 4 |
RFC1350: For non-request TFTP message, the header contains 2-byte operation code plus 2-byte block number or error code.
#define TFTPC_BUFFER_OVERFLOW -2 |
#define TFTPC_DUPLICATE_DATA -1 |
#define TFTPC_MAX_BUF_SIZE (TFTP_BLOCK_SIZE + TFTP_HEADER_SIZE) |
#define TFTPC_REMOTE_ERROR -4 |
#define TFTPC_RETRIES_EXHAUSTED -5 |
#define TFTPC_SUCCESS 0 |
#define TFTPC_UNKNOWN_FAILURE -3 |
tftp_callback_t |
TFTP event notification callback registered by the application.
[in] | evt | Event description along with result and associated parameters (if any). |
enum tftp_evt_type |
TFTP Asynchronous Events notified to the application from the module through the callback registered by the application.
int tftp_get | ( | struct tftpc * | client, |
const char * | remote_file, | ||
const char * | mode | ||
) |