mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Improve TFTP comments
This commit is contained in:
parent
6c2fd2d25d
commit
5a8bd37509
@ -77,6 +77,7 @@ tftp_write(void* handle, struct pbuf* p)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For TFTP client only */
|
||||||
static int
|
static int
|
||||||
tftp_error(void* handle, int err, const char* msg, int size)
|
tftp_error(void* handle, int err, const char* msg, int size)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
struct tftp_context {
|
struct tftp_context {
|
||||||
/**
|
/**
|
||||||
* Open file for read/write.
|
* Open file for read/write (server mode only).
|
||||||
* @param fname Filename
|
* @param fname Filename
|
||||||
* @param mode Mode string from TFTP RFC 1350 (netascii, octet, mail)
|
* @param mode Mode string from TFTP RFC 1350 (netascii, octet, mail)
|
||||||
* @param write Flag indicating read (0) or write (!= 0) access
|
* @param write Flag indicating read (0) or write (!= 0) access
|
||||||
@ -64,12 +64,12 @@ struct tftp_context {
|
|||||||
void* (*open)(const char* fname, const char* mode, u8_t write);
|
void* (*open)(const char* fname, const char* mode, u8_t write);
|
||||||
/**
|
/**
|
||||||
* Close file handle
|
* Close file handle
|
||||||
* @param handle File handle returned by open()
|
* @param handle File handle returned by open()/tftp_put()/tftp_get()
|
||||||
*/
|
*/
|
||||||
void (*close)(void* handle);
|
void (*close)(void* handle);
|
||||||
/**
|
/**
|
||||||
* Read from file
|
* Read from file
|
||||||
* @param handle File handle returned by open()
|
* @param handle File handle returned by open()/tftp_put()/tftp_get()
|
||||||
* @param buf Target buffer to copy read data to
|
* @param buf Target buffer to copy read data to
|
||||||
* @param bytes Number of bytes to copy to buf
|
* @param bytes Number of bytes to copy to buf
|
||||||
* @returns >= 0: Success; < 0: Error
|
* @returns >= 0: Success; < 0: Error
|
||||||
@ -77,7 +77,7 @@ struct tftp_context {
|
|||||||
int (*read)(void* handle, void* buf, int bytes);
|
int (*read)(void* handle, void* buf, int bytes);
|
||||||
/**
|
/**
|
||||||
* Write to file
|
* Write to file
|
||||||
* @param handle File handle returned by open()
|
* @param handle File handle returned by open()/tftp_put()/tftp_get()
|
||||||
* @param pbuf PBUF adjusted such that payload pointer points
|
* @param pbuf PBUF adjusted such that payload pointer points
|
||||||
* to the beginning of write data. In other words,
|
* to the beginning of write data. In other words,
|
||||||
* TFTP headers are stripped off.
|
* TFTP headers are stripped off.
|
||||||
@ -85,8 +85,8 @@ struct tftp_context {
|
|||||||
*/
|
*/
|
||||||
int (*write)(void* handle, struct pbuf* p);
|
int (*write)(void* handle, struct pbuf* p);
|
||||||
/**
|
/**
|
||||||
* Error response
|
* Error response (client mode only)
|
||||||
* @param handle File handle set by tftp_get/tftp_put
|
* @param handle File handle set by tftp_get()/tftp_put()
|
||||||
* @param err error code from server
|
* @param err error code from server
|
||||||
* @param msg error message from server
|
* @param msg error message from server
|
||||||
* @param size size of msg
|
* @param size size of msg
|
||||||
|
Loading…
Reference in New Issue
Block a user