Functions to filter access to the TFTP server. More...
Functions | |
bool | netTFTPs_AcceptClient (const NET_ADDR *addr) |
Accept or deny connection from a remote TFTP client. [user-provided]. | |
Functions to filter access to the TFTP server.
To filter the access to the TFTP server, the optional function netTFTPs_AcceptClient is used. It is part of the template file TFTP_Server_Access.c. If this template file is missing in the project, the function will not be available and thus connections from all remote clients will be accepted. You need to adapt the function to the application's needs by specifying the rules for allowed/blocked clients. The TFTP server will use the information in this function to filter the access.
bool netTFTPs_AcceptClient | ( | const NET_ADDR * | addr | ) |
Accept or deny connection from a remote TFTP client. [user-provided].
[in] | addr | structure containing IP address and port of remote TFTP client. |
The function netTFTPs_AcceptClient checks if a connection from the remote client is allowed. This enables remote client filtering to decide which clients are allowed to connect to the TFTP server.
The argument addr points to a buffer containing the IP address and port of the remote machine.
Code Example
The following example is available in the user code template file TFTP_Server_Access.c. Customize it to the application's needs.