Jump to main content

##

# TCPIP_TFTPC_SetCommand Function

## C

    TCPIP_TFTPC_OPERATION_RESULT TCPIP_TFTPC_SetCommand(
        IP_MULTI_ADDRESS* mAddr,
        IP_ADDRESS_TYPE ipType,
        TCPIP_TFTP_CMD_TYPE cmdType,
        const char * fileName
    );

## Description

This function is used to set the client mode, server, and file name. The file name is accessed as per the TFTP command mode.

## Preconditions

The TCP/IP stack should have been initialized.

## Parameters

Parameters | Description
--- | ---
mAddr | Server address.
ipType | IP address type either IPv4 or IPv6 type.
cmdType | GET or PUT command.
fileName | File to be processed.

## Returns

- TFTPC_ERROR_BUSY - TFTP client is busy for one file processing, retry later. when there is a TFTP operation going on, the other operation has to wait until the TFTP operation is completed.
- TFTPC_ERROR_INVALID_FILE_LENGTH - File length should not be more than TCPIP_TFTPC_FILENAME_LEN.
- TFTPC_ERROR_NONE - Successful command operation.

## Remarks

None.