Home |
Function tftpcli_sendfile |
Function tftpcli_sendfileFunction tftpcli_sendfile sends a file to a TFTP server. int tftpcli_sendfile(SOCKET sock, char * localname, char * name, char * mode); ParameterssockSocket returned from tftpcli_connect. localnameLocal name of the file to send. nameName for the file on the remote host. modeTransfer mode string; must be "octet" for binary. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. In addition to the error values listed below, all errors returned by recvfrom and sendto may also be set. Error Codes further describes each error. Possible values for this function are:
This routine is non-reentrant and cannot be called if the TFTP Server or any other TFTP client routine is running. vf_init must be called before tftpcli_sendfile can be used.
|