Network Dual-Stack Component  Version 7.0 (Beta)
MDK-Professional Middleware for IP Networking
 All Data Structures Files Functions Enumerations Groups Pages
Control Interface

Functions to work with the TFTP server. More...

Functions to work with the TFTP server.

Like all services, the TFTP server is normally started automatically if Start System Service is enabled in the Net_Config.c configuration file. If it is disabled, the TFTP server needs to be started manually in the user application using netTFTPs_Start. At runtime, it is always possible to stop the TFTP server using the function netTFTPs_Stop. The user application can check for a running server using the netTFTPs_Running function.

To change the port of the TFTP server at runtime, first call netTFTPs_Stop (if the server is running) and then use the netTFTPs_SetPort function. Afterwards, the TFTP server needs to be (re-)started by the application calling netTFTPs_Start.

Code Example

void change_port (uint16_t port) {}
if (netTFTPs_Running() == true) {
netTFTPs_Stop();
}
netTFTPs_SetPort (port);
netTFTPs_Start();
}