Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

tftp-c.h/tftp-c.c

Prototype

Arguments

server_ip 

Server IP address.

server_port

Server port.

...

Code Block
          CPU_BOOLEAN  TFTPc_Put (const  TFTPc_CFG    *p_cfg
                                         CPU_CHAR     *p_filename_local,
                                         CPU_CHAR     *p_filename_remote,
                                         TFTPc_MODE    mode,
                                         TFTPc_ERR    *p_err);

Arguments

p_cfg

Pointer to TFTPc Configuration to use.
DEF_NULL, if default configuration must be used.

p_filename_local

Pointer to name of the file to be read from the client.

pfilenamep_filename_remote

Pointer to name of the file to be written to the server.

mode

FTP TFTP transfer mode:

FTPcTFTPc_MODE_NETASCII  ASCII mode
FTPcTFTPc_MODE_OCTET        Binary mode

...

p_err

Pointer to variable that will receive the return error code from this function :

...

TFTPc_ERR_NONE

...


TFTPC_ERR_FILE_OPEN
TFTPc_ERR_TX
...

Returned Values

DEF_OK,     if file was put on server successfully.

DEF_FAIL, otherwise


Required Configuration

None.

...