Network Component  Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
NetTFTPc: TFTP Client

Events generated by the Network - TFTP Client functions. More...

Functions

__STATIC_INLINE void EvrNetTFTPc_InitClient (void)
 Event on TFTP client initialize (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_GetSocketFailed (void)
 Event on TFTP client failed to allocate UDP socket (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_PutFile (const char *local_fname, uint32_t length)
 Event on TFTP client netTFTPc_Put (API) More...
 
__STATIC_INLINE void EvrNetTFTPc_PutRemoteName (const char *fname, uint32_t length)
 Event on TFTP client netTFTPc_Put remote filename (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_PutInvalidParameter (void)
 Event on netTFTPc_Put invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_PutWrongState (uint8_t state)
 Event on netTFTPc_Put wrong client state (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_ShowServerAddress (const void *net_addr)
 Event on TFTP client display server IP address (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_OpenLocalFile (void)
 Event on TFTP client open local file (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_OpenLocalFileFailed (void)
 Event on TFTP client open local file failed (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_GetFile (const char *fname, uint32_t length)
 Event on TFTP client netTFTPc_Get (API) More...
 
__STATIC_INLINE void EvrNetTFTPc_GetLocalName (const char *local_fname, uint32_t length)
 Event on TFTP client netTFTPc_Get local filename (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_GetInvalidParameter (void)
 Event on netTFTPc_Get invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_GetWrongState (uint8_t state)
 Event on netTFTPc_Get wrong client state (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_TimeoutBlockRetransmit (uint32_t block_nr)
 Event on TFTP client block retransmit on timeout (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_SendBlock (uint32_t block_nr, uint32_t length)
 Event on TFTP client send block (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_StopClient (void)
 Event on TFTP client stop operation (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_CloseLocalFile (void)
 Event on TFTP client close local file (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_WrongServerAddress (const void *net_addr)
 Event on TFTP client wrong server IP address (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_WrongServerPort (uint16_t udp_port)
 Event on TFTP client wrong server port (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_ServerTidAssigned (uint16_t tid)
 Event on TFTP client assigned transfer identifier (TID) of the server (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on TFTP client receive frame too short (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_ReceiveFrame (uint32_t length)
 Event on TFTP client receive frame (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_ErrorCodeReceived (uint16_t error_code)
 Event on TFTP client error code received from server (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_DuplicateBlockAck (uint32_t block_nr)
 Event on TFTP client duplicate block acknowledge received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_InvalidBlockAck (uint32_t block_nr)
 Event on TFTP client invalid block acknowledge received (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_BlockAckReceived (uint32_t block_nr)
 Event on TFTP client block acknowledge received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_DuplicateBlockReceived (uint32_t block_nr)
 Event on TFTP client duplicate block received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_InvalidBlockReceived (uint32_t block_nr)
 Event on TFTP client invalid block received (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_BlockReceived (uint32_t block_nr)
 Event on TFTP client block data received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_WriteErrorDiskFull (uint32_t length)
 Event on TFTP client write local disk failed, disk full (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_IllegalServerOperation (void)
 Event on TFTP client deteced illegal server operation (Error) More...
 
__STATIC_INLINE void EvrNetTFTPc_SendRequest (uint16_t tftp_opcode)
 Event on TFTP client send operation request (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_OptionBlockSize (uint16_t block_size)
 Event on TFTP client add block size option (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_SendAck (uint16_t block_nr)
 Event on TFTP client send acknowledgment (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_SendError (uint16_t error_nr)
 Event on TFTP client send error code (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_OptionAckReceived (void)
 Event on TFTP client option acknowledgment received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPc_UninitClient (void)
 Event on TFTP client de-initialize (Op) More...
 

Description

Events generated by the Network - TFTP Client functions.

The TFTP client functions generate events that make it easier to troubleshoot errors, and allow the user to understand how the TFTP client works.

Function Documentation

◆ EvrNetTFTPc_BlockAckReceived()

__STATIC_INLINE void EvrNetTFTPc_BlockAckReceived ( uint32_t  block_nr)

Event on TFTP client block acknowledge received (Op)

Parameters
block_nrblock number

The event BlockAckReceived is created when the TFTP client receives an acknowledgement of the sent data block. The client then sends the next data block.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_BlockReceived()

__STATIC_INLINE void EvrNetTFTPc_BlockReceived ( uint32_t  block_nr)

Event on TFTP client block data received (Op)

Parameters
block_nrblock number

The event BlockReceived is created when the TFTP client receives the data block on the data socket.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_CloseLocalFile()

__STATIC_INLINE void EvrNetTFTPc_CloseLocalFile ( void  )

Event on TFTP client close local file (Op)

The event CloseLocalFile is created when the TFTP client closes a local file that was previously opened for reading or writing.

◆ EvrNetTFTPc_DuplicateBlockAck()

__STATIC_INLINE void EvrNetTFTPc_DuplicateBlockAck ( uint32_t  block_nr)

Event on TFTP client duplicate block acknowledge received (Op)

Parameters
block_nrblock number

The event DuplicateBlockAck is created when the TFTP client receives an acknowledgement of a previously sent data block. This means that the last data block has been lost and is being resent.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_DuplicateBlockReceived()

__STATIC_INLINE void EvrNetTFTPc_DuplicateBlockReceived ( uint32_t  block_nr)

Event on TFTP client duplicate block received (Op)

Parameters
block_nrblock number

The event DuplicateBlockReceived is created when the TFTP client wants to inform that the received data block is a duplicate, ie that it has been received again. The data block is then discarded.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_ErrorCodeReceived()

__STATIC_INLINE void EvrNetTFTPc_ErrorCodeReceived ( uint16_t  error_code)

Event on TFTP client error code received from server (Error)

Parameters
error_codeTFTP error code
  • 0: not defined error
  • 1: file not found error
  • 2: access violation error
  • 3: disk full error
  • 4: illegal opcode error
  • 5: unknown TID error
  • 6: file already exists error
  • 7: no such user error

The event ErrorCodeReceived is created when the TFTP client receives an error code from the server. The client session then terminates.

Value in the Event Recorder shows:

  • code: error code (ERR_NOTDEF, ERR_NOTFOUND, ERR_NOACCESS, ERR_DISKFULL, ERR_ILLOPCOD, ERR_UNKNTID, ERR_FILEXIST, ERR_NOUSER).

◆ EvrNetTFTPc_FrameTooShort()

__STATIC_INLINE void EvrNetTFTPc_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on TFTP client receive frame too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame

The event FrameTooShort is created when the TFTP client receives the frame that is too short. The frame is then discarded.

Value in the Event Recorder shows:

  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.

◆ EvrNetTFTPc_GetFile()

__STATIC_INLINE void EvrNetTFTPc_GetFile ( const char *  fname,
uint32_t  length 
)

Event on TFTP client netTFTPc_Get (API)

Parameters
fnamename of the remote file
lengthlength of the fname string

The event GetFile is created when the function netTFTPc_Get is called to download a file from a TFTP server.

Value in the Event Recorder shows:

  • name: remote file name.

◆ EvrNetTFTPc_GetInvalidParameter()

__STATIC_INLINE void EvrNetTFTPc_GetInvalidParameter ( void  )

Event on netTFTPc_Get invalid parameter (Error)

The event GetInvalidParameter is created when the function netTFTPc_Get is executed, and the function input parameter is invalid.

Value in the Event Recorder shows:

  • error

◆ EvrNetTFTPc_GetLocalName()

__STATIC_INLINE void EvrNetTFTPc_GetLocalName ( const char *  local_fname,
uint32_t  length 
)

Event on TFTP client netTFTPc_Get local filename (Op)

Parameters
local_fnamename of the local file
lengthlength of the fname string

The event GetLocalName is created when the function netTFTPc_Get is called to download a file from a TFTP server. This event is created only if the local file name is specified and is different from the remote file name.

Value in the Event Recorder shows:

  • name: local file name.

◆ EvrNetTFTPc_GetSocketFailed()

__STATIC_INLINE void EvrNetTFTPc_GetSocketFailed ( void  )

Event on TFTP client failed to allocate UDP socket (Error)

The event GetSocketFailed is created when the TFTP client is initialized, that is, when the function netInitialize is executed, and the service could not assign the UDP socket. To resolve this error, you must increase the number of available UDP sockets in the UDP socket configuration.

Value in the Event Recorder shows:

  • error

◆ EvrNetTFTPc_GetWrongState()

__STATIC_INLINE void EvrNetTFTPc_GetWrongState ( uint8_t  state)

Event on netTFTPc_Get wrong client state (Error)

Parameters
stateclient state
  • 0: idle
  • 1: put file
  • 2: get file
  • 3: stop client

The event GetWrongState is created when the function netTFTPc_Get is called but the TFTP client is not idle.

Value in the Event Recorder shows:

  • state: TFTP client state (PUT, GET, STOP).

◆ EvrNetTFTPc_IllegalServerOperation()

__STATIC_INLINE void EvrNetTFTPc_IllegalServerOperation ( void  )

Event on TFTP client deteced illegal server operation (Error)

The event IllegalServerOperation is created when the TFTP client detects a server failure. The client session then terminates.

Value in the Event Recorder shows:

  • error

◆ EvrNetTFTPc_InitClient()

__STATIC_INLINE void EvrNetTFTPc_InitClient ( void  )

Event on TFTP client initialize (Op)

The event InitClient is created when the TFTP client is initialized, that is, when the function netInitialize is executed.

Value in the Event Recorder shows:

  • tftp

◆ EvrNetTFTPc_InvalidBlockAck()

__STATIC_INLINE void EvrNetTFTPc_InvalidBlockAck ( uint32_t  block_nr)

Event on TFTP client invalid block acknowledge received (Error)

Parameters
block_nrblock number

The event InvalidBlockAck is created when the TFTP client receives an acknowledgement of an invalid data block, that is, an out of order block. The client session then terminates.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_InvalidBlockReceived()

__STATIC_INLINE void EvrNetTFTPc_InvalidBlockReceived ( uint32_t  block_nr)

Event on TFTP client invalid block received (Error)

Parameters
block_nrblock number

The event InvalidBlockReceived is created when the TFTP client receives the data block with invalid sequence, that is, an out of order block. The client session then terminates.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_OpenLocalFile()

__STATIC_INLINE void EvrNetTFTPc_OpenLocalFile ( void  )

Event on TFTP client open local file (Op)

The event OpenLocalFile is created when the TFTP client has to open a local file to read or write.

◆ EvrNetTFTPc_OpenLocalFileFailed()

__STATIC_INLINE void EvrNetTFTPc_OpenLocalFileFailed ( void  )

Event on TFTP client open local file failed (Error)

The event OpenLocalFileFailed is created when the requested local file cannot be opened for reading or writing. This usually means that the file cannot be found or that the file cannot be created on the storage medium.

Value in the Event Recorder shows:

  • error

◆ EvrNetTFTPc_OptionAckReceived()

__STATIC_INLINE void EvrNetTFTPc_OptionAckReceived ( void  )

Event on TFTP client option acknowledgment received (Op)

The event OptionAckReceived is created when the TFTP client receives an acknowledgement of the proposed transfer option.

◆ EvrNetTFTPc_OptionBlockSize()

__STATIC_INLINE void EvrNetTFTPc_OptionBlockSize ( uint16_t  block_size)

Event on TFTP client add block size option (Op)

Parameters
block_sizesize of transfer block

The event OptionBlockSize is created when the TFTP client wants to display the block size option it sends to the server in the request. This event is only created if the block size is different from the default, which is 512 bytes.

Value in the Event Recorder shows:

  • size: block size in bytes.

◆ EvrNetTFTPc_PutFile()

__STATIC_INLINE void EvrNetTFTPc_PutFile ( const char *  local_fname,
uint32_t  length 
)

Event on TFTP client netTFTPc_Put (API)

Parameters
local_fnamename of the local file
lengthlength of the local_fname string

The event PutFile is created when the function netTFTPc_Put is called to upload a file to a TFTP server.

Value in the Event Recorder shows:

  • name: local file name.

◆ EvrNetTFTPc_PutInvalidParameter()

__STATIC_INLINE void EvrNetTFTPc_PutInvalidParameter ( void  )

Event on netTFTPc_Put invalid parameter (Error)

The event PutInvalidParameter is created when the function netTFTPc_Put is executed, and the function input parameter is invalid.

Value in the Event Recorder shows:

  • error

◆ EvrNetTFTPc_PutRemoteName()

__STATIC_INLINE void EvrNetTFTPc_PutRemoteName ( const char *  fname,
uint32_t  length 
)

Event on TFTP client netTFTPc_Put remote filename (Op)

Parameters
fnamename of the remote file
lengthlength of the fname string

The event PutFile is created when the function netTFTPc_Put is called to upload a file to a TFTP server. This event is created only if the remote file name is specified and is different from the local file name.

Value in the Event Recorder shows:

  • name: remote file name.

◆ EvrNetTFTPc_PutWrongState()

__STATIC_INLINE void EvrNetTFTPc_PutWrongState ( uint8_t  state)

Event on netTFTPc_Put wrong client state (Error)

Parameters
stateclient state
  • 0: idle
  • 1: put file
  • 2: get file
  • 3: stop client

The event PutWrongState is created when the function netTFTPc_Put is called but the TFTP client is not idle.

Value in the Event Recorder shows:

  • state: TFTP client state (PUT, GET, STOP).

◆ EvrNetTFTPc_ReceiveFrame()

__STATIC_INLINE void EvrNetTFTPc_ReceiveFrame ( uint32_t  length)

Event on TFTP client receive frame (Op)

Parameters
lengthframe length in bytes

The event ReceiveFrame is created when the TFTP client receives the frame.

Value in the Event Recorder shows:

  • len: length of the received frame in bytes.

◆ EvrNetTFTPc_SendAck()

__STATIC_INLINE void EvrNetTFTPc_SendAck ( uint16_t  block_nr)

Event on TFTP client send acknowledgment (Op)

Parameters
block_nrblock number

The event SendAck is created when the TFTP client sends an acknowledgement of the received data block. The transfer then continues with the download of the next block.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_SendBlock()

__STATIC_INLINE void EvrNetTFTPc_SendBlock ( uint32_t  block_nr,
uint32_t  length 
)

Event on TFTP client send block (Op)

Parameters
block_nrblock number
lengthlength of a block

The event SendBlock is created when the TFTP header is constructed and the data block is sent to the UDP socket for transmitting.

Value in the Event Recorder shows:

  • block: block sequence number.
  • len: length of the data block.

◆ EvrNetTFTPc_SendError()

__STATIC_INLINE void EvrNetTFTPc_SendError ( uint16_t  error_nr)

Event on TFTP client send error code (Op)

Parameters
error_nrTFTP error number
  • 0: not defined error
  • 1: file not found error
  • 2: access violation error
  • 3: disk full error
  • 4: illegal opcode error
  • 5: unknown TID error
  • 6: file already exists error
  • 7: no such user error

The event SendError is created when the TFTP client sends an error message to the client. The client session then terminates.

Value in the Event Recorder shows:

  • code: error code (ERR_NOTDEF, ERR_NOTFOUND, ERR_NOACCESS, ERR_DISKFULL, ERR_ILLOPCOD, ERR_UNKNTID, ERR_FILEXIST, ERR_NOUSER).

◆ EvrNetTFTPc_SendRequest()

__STATIC_INLINE void EvrNetTFTPc_SendRequest ( uint16_t  tftp_opcode)

Event on TFTP client send operation request (Op)

Parameters
tftp_opcodeTFTP operation code
  • 1: read request
  • 2: write request
  • 3: data
  • 4: acknowledgment
  • 5: error
  • 6: option acknowledgment

The event SendRequest is created when the TFTP client wants to display the operation code it sends to the server.

Value in the Event Recorder shows:

  • opcode: operation code (RRQ, WRQ, DATA, ACK, ERR, OACK).

◆ EvrNetTFTPc_ServerTidAssigned()

__STATIC_INLINE void EvrNetTFTPc_ServerTidAssigned ( uint16_t  tid)

Event on TFTP client assigned transfer identifier (TID) of the server (Op)

Parameters
tidserver transfer identifier
Remarks
Transfer identifier is used as UDP port number.

The event ServerTidAssigned is created when the TFTP client assigns the Transfer Identifier value (TID) to a session. This is actually the new source port number assigned by the TFTP server.

Value in the Event Recorder shows:

  • tid: transfer identifier value.

◆ EvrNetTFTPc_ShowServerAddress()

__STATIC_INLINE void EvrNetTFTPc_ShowServerAddress ( const void *  net_addr)

Event on TFTP client display server IP address (Op)

Parameters
net_addrpointer to NET_ADDR server address structure

The event ShowServerAddress is created when the TFTP client wants to display the contents of the network address structure, that is, the IP address and the port number of the server.

Value in the Event Recorder shows:

  • ip: IPv4 or IPv6 address.
  • port: port number.

◆ EvrNetTFTPc_StopClient()

__STATIC_INLINE void EvrNetTFTPc_StopClient ( void  )

Event on TFTP client stop operation (Op)

The event StopClient is created when the TFTP client operation is complete and the client session ends.

◆ EvrNetTFTPc_TimeoutBlockRetransmit()

__STATIC_INLINE void EvrNetTFTPc_TimeoutBlockRetransmit ( uint32_t  block_nr)

Event on TFTP client block retransmit on timeout (Op)

Parameters
block_nrblock number

The event TimeoutBlockRetransmit is created when the acknowledgement timeout expires, so the TFTP client resends the data block.

Value in the Event Recorder shows:

  • block: block sequence number.

◆ EvrNetTFTPc_UninitClient()

__STATIC_INLINE void EvrNetTFTPc_UninitClient ( void  )

Event on TFTP client de-initialize (Op)

The event UninitClient is created when the function netUninitialize is executed.

Value in the Event Recorder shows:

  • tftp

◆ EvrNetTFTPc_WriteErrorDiskFull()

__STATIC_INLINE void EvrNetTFTPc_WriteErrorDiskFull ( uint32_t  length)

Event on TFTP client write local disk failed, disk full (Error)

Parameters
lengthblock data length

The event WriteErrorDiskFull is created when the TFTP client failed to write data to a local file. This usually happens when the storage medium is full or when a write error occurs in netTFTPc_fwrite. The client session then terminates.

Value in the Event Recorder shows:

  • len: length of data to write.

◆ EvrNetTFTPc_WrongServerAddress()

__STATIC_INLINE void EvrNetTFTPc_WrongServerAddress ( const void *  net_addr)

Event on TFTP client wrong server IP address (Error)

Parameters
net_addrpointer to NET_ADDR address structure

The event WrongServerAddress is created when the TFTP client receives the TFTP frame from an invalid TFTP server. The frame is discarded.

Value in the Event Recorder shows:

  • ip: IPv4 or IPv6 address of the server.

◆ EvrNetTFTPc_WrongServerPort()

__STATIC_INLINE void EvrNetTFTPc_WrongServerPort ( uint16_t  udp_port)

Event on TFTP client wrong server port (Error)

Parameters
udp_portwrong UDP port number

The event WrongServerPort is created when the TFTP client receives the TFTP frame from invalid UDP server source port. The frame is discarded.

Value in the Event Recorder shows:

  • port: UDP source port of the server.