Grandfather Frost, this is not a request, but a real offer to earn ...
In one of the discussions, I promised to write a TFTP, so far only the server. I do not know how putting up solutions fits into the framework of this site, but let's try to find out what will come of it.
My description page: http://mikelsv.livejournal.com/7984.html , SVN svn: //svn.loglist.org: 2402 / usr / svn / opensource / msv-tftpd and code for those too lazy to climb on svn http://pastebin.com/5xgJGgpJ . Last saved in msv-tftpd.cpp and g ++ ./msv-tftpd.cpp. Test Linux tftp.
Please do not beat all the code in one file. It's easier for me to develop. If done according to the standard, there will be twenty files, headers in h, code in cpp. And the development will trivially rise.
It is worth reading the code from the bottom with the function main (), gradually getting higher. An attempt to read from above will blow up the brain as a result of a violation of logical connection.
I remember there were questions. The server is only on UDP, you have to think about TCP. For the API, I do not see the point and need. Someone said that in Linux and Windows a different format of text files. In general, they are the same, \ r \ n does not count. The problem with the transition to Linux is that you need to take into account some features and connect the necessary libraries. Advice to write on pure C, well, it's wrong to lose all power with ++.
Actually like that. Let the questions in your answers :)