Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NetTFTPs: TFTP Server

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

Functions

__STATIC_INLINE void EvrNetTFTPs_InitServer (uint32_t num_sessions, uint16_t port, uint8_t firewall_en)
 Event on TFTP server initialize (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_ShowRootFolder (const char *root_folder, uint32_t length)
 Event on TFTP server display root folder (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_GetSocketFailed (uint8_t session)
 Event on TFTP server failed to allocate UDP socket (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_SetRootPath (const char *path, uint32_t length)
 Event on TFTP server netTFTPs_SetRootPath (API) More...
 
__STATIC_INLINE void EvrNetTFTPs_StartService (uint16_t port)
 Event on TFTP server start service (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_StopService (void)
 Event on TFTP server stop service (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_TimeoutExpiredAbort (uint8_t session)
 Event on TFTP server session timeout expired, abort transfer (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_SendBlock (uint8_t session, uint32_t block_nr, uint32_t length)
 Event on TFTP server send block (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_ReceiveFrame (int32_t socket, uint32_t length)
 Event on TFTP server receive frame (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on TFTP server receive frame too short (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_UserAccessDeniedIp4 (const void *net_addr)
 Event on TFTP server user denied access for IPv4 client (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_UserAccessDeniedIp6 (const void *net_addr)
 Event on TFTP server user denied access for IPv6 client (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_AccessDeniedNoResources (void)
 Event on TFTP server denied client access on out of resources (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_ShowClientAddressIp4 (const void *net_addr)
 Event on TFTP server display client IPv4 address and port number (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_ShowClientAddressIp6 (const void *net_addr)
 Event on TFTP server display client IPv6 address and port number (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_OperationRequest (uint8_t session, uint16_t tftp_opcode)
 Event on TFTP server process operation request (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_SessionRestart (uint8_t session)
 Event on TFTP server session restart, maybe our response was lost (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_InvalidTransferId (uint8_t session)
 Event on TFTP server invalid transfer id (TID) detected (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_ErrorCodeReceived (uint8_t session, uint16_t error_code)
 Event on TFTP server error code received from the client (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_IllegalOpcodeReceived (uint8_t session, uint16_t tftp_opcode)
 Event on TFTP server illegal operation code received from the client (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_FileRequested (const char *fname, uint32_t length)
 Event on TFTP server received file request from the client (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_TransferBlockSize (uint8_t session, uint16_t block_size)
 Event on TFTP server display transfer block size (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_TransferModeNotBinary (uint8_t session)
 Event on TFTP server transfer mode not set to binary (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_LocalFileNotFound (uint8_t session)
 Event on TFTP server error, requested file not found on server (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_LocalFileCreateFailed (uint8_t session)
 Event on TFTP server local file create failed (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_ReceiveDataFrame (uint8_t session, uint32_t length)
 Event on TFTP server receive data frame (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_DataFrameTooShort (uint8_t session, uint32_t length, uint32_t min_length)
 Event on TFTP server receive data frame too short (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_DuplicateBlockReceived (uint8_t session, uint32_t block_nr)
 Event on TFTP server duplicate block received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_TooManyRetries (uint8_t session)
 Event on TFTP server too many retransmissions (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_BlockReceived (uint8_t session, uint32_t block_nr)
 Event on TFTP server data block received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_InvalidBlockReceived (uint8_t session, uint32_t block_nr)
 Event on TFTP server invalid block received (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_WriteErrorDiskFull (uint8_t session, uint32_t length)
 Event on TFTP server write local disk failed, disk full (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_BlockAckReceived (uint8_t session, uint32_t block_nr)
 Event on TFTP server block acknowledge received (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_BlockRetransmit (uint8_t session, uint32_t block_nr)
 Event on TFTP server block retransmit (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_InvalidBlockAck (uint8_t session, uint32_t block_nr)
 Event on TFTP server invalid block acknowledge received (Error) More...
 
__STATIC_INLINE void EvrNetTFTPs_ShowRequestMode (const uint8_t *mode, uint32_t length)
 Event on TFTP server display received request mode parameter (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_SendOptionAck (uint8_t session, uint32_t block_size)
 Event on TFTP server send option acknowledgment (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_SendBlockAck (uint8_t session, uint16_t block_nr)
 Event on TFTP server send block acknowledgment (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_SendError (uint8_t session, uint16_t error_nr)
 Event on TFTP server send error code (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_AbortSession (uint8_t session)
 Event on TFTP server abnormal session close on error (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_CloseSession (uint8_t session)
 Event on TFTP server normal session close (Op) More...
 
__STATIC_INLINE void EvrNetTFTPs_UninitServer (void)
 Event on TFTP server de-initialize (Op) More...
 

Description

Events generated by the Network - TFTP Server functions.

Function Documentation

__STATIC_INLINE void EvrNetTFTPs_AbortSession ( uint8_t  session)

Event on TFTP server abnormal session close on error (Op)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_AccessDeniedNoResources ( void  )

Event on TFTP server denied client access on out of resources (Error)

__STATIC_INLINE void EvrNetTFTPs_BlockAckReceived ( uint8_t  session,
uint32_t  block_nr 
)

Event on TFTP server block acknowledge received (Op)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_BlockReceived ( uint8_t  session,
uint32_t  block_nr 
)

Event on TFTP server data block received (Op)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_BlockRetransmit ( uint8_t  session,
uint32_t  block_nr 
)

Event on TFTP server block retransmit (Op)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_CloseSession ( uint8_t  session)

Event on TFTP server normal session close (Op)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_DataFrameTooShort ( uint8_t  session,
uint32_t  length,
uint32_t  min_length 
)

Event on TFTP server receive data frame too short (Error)

Parameters
sessionsession number
lengthframe length in bytes
min_lengthminimum length of the frame
__STATIC_INLINE void EvrNetTFTPs_DuplicateBlockReceived ( uint8_t  session,
uint32_t  block_nr 
)

Event on TFTP server duplicate block received (Op)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_ErrorCodeReceived ( uint8_t  session,
uint16_t  error_code 
)

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

Parameters
sessionsession number
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
__STATIC_INLINE void EvrNetTFTPs_FileRequested ( const char *  fname,
uint32_t  length 
)

Event on TFTP server received file request from the client (Op)

Parameters
fnamename of the requested file
lengthlength of the fname string
__STATIC_INLINE void EvrNetTFTPs_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on TFTP server receive frame too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame
__STATIC_INLINE void EvrNetTFTPs_GetSocketFailed ( uint8_t  session)

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

Parameters
sessionsession number (0= control session)
__STATIC_INLINE void EvrNetTFTPs_IllegalOpcodeReceived ( uint8_t  session,
uint16_t  tftp_opcode 
)

Event on TFTP server illegal operation code received from the client (Error)

Parameters
sessionsession number
tftp_opcodeTFTP operation code
  • 1: read request
  • 2: write request
  • 3: data
  • 4: acknowledgment
  • 5: error
  • 6: option acknowledgment
__STATIC_INLINE void EvrNetTFTPs_InitServer ( uint32_t  num_sessions,
uint16_t  port,
uint8_t  firewall_en 
)

Event on TFTP server initialize (Op)

Parameters
num_sessionsnumber of available TFTP sessions
portlistening port number
firewall_enfirewall support enable
  • 0: disabled
  • 1: enabled
__STATIC_INLINE void EvrNetTFTPs_InvalidBlockAck ( uint8_t  session,
uint32_t  block_nr 
)

Event on TFTP server invalid block acknowledge received (Error)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_InvalidBlockReceived ( uint8_t  session,
uint32_t  block_nr 
)

Event on TFTP server invalid block received (Error)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_InvalidTransferId ( uint8_t  session)

Event on TFTP server invalid transfer id (TID) detected (Error)

Parameters
sessionsession number
Remarks
TID is treated in UDP socket as the source and destination port.
__STATIC_INLINE void EvrNetTFTPs_LocalFileCreateFailed ( uint8_t  session)

Event on TFTP server local file create failed (Error)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_LocalFileNotFound ( uint8_t  session)

Event on TFTP server error, requested file not found on server (Error)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_OperationRequest ( uint8_t  session,
uint16_t  tftp_opcode 
)

Event on TFTP server process operation request (Op)

Parameters
sessionsession number
tftp_opcodeTFTP operation code
  • 1: read request
  • 2: write request
  • 3: data
  • 4: acknowledgment
  • 5: error
  • 6: option acknowledgment
__STATIC_INLINE void EvrNetTFTPs_ReceiveDataFrame ( uint8_t  session,
uint32_t  length 
)

Event on TFTP server receive data frame (Op)

Parameters
sessionsession number
lengthframe length in bytes
__STATIC_INLINE void EvrNetTFTPs_ReceiveFrame ( int32_t  socket,
uint32_t  length 
)

Event on TFTP server receive frame (Op)

Parameters
socketassigned UDP socket
lengthframe length in bytes
__STATIC_INLINE void EvrNetTFTPs_SendBlock ( uint8_t  session,
uint32_t  block_nr,
uint32_t  length 
)

Event on TFTP server send block (Op)

Parameters
sessionsession number
block_nrblock number
lengthlength of a block
__STATIC_INLINE void EvrNetTFTPs_SendBlockAck ( uint8_t  session,
uint16_t  block_nr 
)

Event on TFTP server send block acknowledgment (Op)

Parameters
sessionsession number
block_nrblock number
__STATIC_INLINE void EvrNetTFTPs_SendError ( uint8_t  session,
uint16_t  error_nr 
)

Event on TFTP server send error code (Op)

Parameters
sessionsession number
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
__STATIC_INLINE void EvrNetTFTPs_SendOptionAck ( uint8_t  session,
uint32_t  block_size 
)

Event on TFTP server send option acknowledgment (Op)

Parameters
sessionsession number
block_sizeblock size
__STATIC_INLINE void EvrNetTFTPs_SessionRestart ( uint8_t  session)

Event on TFTP server session restart, maybe our response was lost (Op)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_SetRootPath ( const char *  path,
uint32_t  length 
)

Event on TFTP server netTFTPs_SetRootPath (API)

Parameters
pathpath to server root folder
lengthlength of the path string
__STATIC_INLINE void EvrNetTFTPs_ShowClientAddressIp4 ( const void *  net_addr)

Event on TFTP server display client IPv4 address and port number (Op)

Parameters
net_addrpointer to NET_ADDR4 address structure (8 bytes)
Remarks
Sends reduced size of net address structure with IPv4 address only.
__STATIC_INLINE void EvrNetTFTPs_ShowClientAddressIp6 ( const void *  net_addr)

Event on TFTP server display client IPv6 address and port number (Op)

Parameters
net_addrpointer to NET_ADDR address structure (20 bytes)
Remarks
Sends full size of net address structure with IPv6 address only.
__STATIC_INLINE void EvrNetTFTPs_ShowRequestMode ( const uint8_t *  mode,
uint32_t  length 
)

Event on TFTP server display received request mode parameter (Op)

Parameters
modemode parameter in text format
lengthlength of the mode string
__STATIC_INLINE void EvrNetTFTPs_ShowRootFolder ( const char *  root_folder,
uint32_t  length 
)

Event on TFTP server display root folder (Op)

Parameters
root_folderpath to server root folder
lengthlength of the root_folder string
__STATIC_INLINE void EvrNetTFTPs_StartService ( uint16_t  port)

Event on TFTP server start service (Op)

Parameters
portlistening port number
__STATIC_INLINE void EvrNetTFTPs_StopService ( void  )

Event on TFTP server stop service (Op)

__STATIC_INLINE void EvrNetTFTPs_TimeoutExpiredAbort ( uint8_t  session)

Event on TFTP server session timeout expired, abort transfer (Error)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_TooManyRetries ( uint8_t  session)

Event on TFTP server too many retransmissions (Error)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_TransferBlockSize ( uint8_t  session,
uint16_t  block_size 
)

Event on TFTP server display transfer block size (Op)

Parameters
sessionsession number
block_sizesize of transfer block
__STATIC_INLINE void EvrNetTFTPs_TransferModeNotBinary ( uint8_t  session)

Event on TFTP server transfer mode not set to binary (Error)

Parameters
sessionsession number
__STATIC_INLINE void EvrNetTFTPs_UninitServer ( void  )

Event on TFTP server de-initialize (Op)

__STATIC_INLINE void EvrNetTFTPs_UserAccessDeniedIp4 ( const void *  net_addr)

Event on TFTP server user denied access for IPv4 client (Error)

Parameters
net_addrpointer to NET_ADDR4 address structure (8 bytes)
Remarks
Sends reduced size of net address structure with IPv4 address only.
__STATIC_INLINE void EvrNetTFTPs_UserAccessDeniedIp6 ( const void *  net_addr)

Event on TFTP server user denied access for IPv6 client (Error)

Parameters
net_addrpointer to NET_ADDR address structure (20 bytes)
Remarks
Sends full size of net address structure with IPv6 address only.
__STATIC_INLINE void EvrNetTFTPs_WriteErrorDiskFull ( uint8_t  session,
uint32_t  length 
)

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

Parameters
sessionsession number
lengthblock data length