Barrelfish
|
TFTP library. More...
Typedefs | |
typedef errval_t(* | tfpt_server_cb_f_t) (void) |
< server request callback function | |
Functions | |
errval_t | tftp_server_accept (char *ip, uint16_t port, tfpt_server_cb_f_t cb) |
starts the tftp server on this machine on a given port More... | |
errval_t | tftp_server_terminate (void) |
terminates the tftp server connection More... | |
errval_t | tftp_client_write_file (char *name, void *buf, size_t buflen) |
writes a file over tftp on the established connection More... | |
errval_t | tftp_client_read_file (char *path, void *buf, size_t buflen, size_t *ret_size) |
reads a file over tftp on the established connection More... | |
errval_t | tftp_client_connect (char *ip, uint16_t port) |
attempts to initialize a new TFTP connection to a server More... | |
errval_t | tftp_client_disconnect (void) |
terminates the connection to the tftp server More... | |
TFTP library.
errval_t tftp_client_connect | ( | char * | ip, |
uint16_t | port | ||
) |
attempts to initialize a new TFTP connection to a server
errval_t tftp_client_disconnect | ( | void | ) |
terminates the connection to the tftp server
errval_t tftp_client_read_file | ( | char * | path, |
void * | buf, | ||
size_t | buflen, | ||
size_t * | ret_size | ||
) |
reads a file over tftp on the established connection
path | path of the file to readf rom |
buf | buffer where to store the contents |
buflen | maximum length of the buffer |
ret_size | returns the number of bytes received |
errval_t tftp_client_write_file | ( | char * | name, |
void * | buf, | ||
size_t | buflen | ||
) |
writes a file over tftp on the established connection
name | name of the remote file to write |
buf | buffer containing the data |
buflen | length of the file to write |
errval_t tftp_server_accept | ( | char * | ip, |
uint16_t | port, | ||
tfpt_server_cb_f_t | cb | ||
) |
starts the tftp server on this machine on a given port
ip | ip address to be used |
port | port to be used |
cb | callback function called when clients connect |
errval_t tftp_server_terminate | ( | void | ) |
terminates the tftp server connection