[syslinux] tftp-hpa server hooks to external programs

Pierre Neyron pierre.neyron at imag.fr
Thu Aug 12 04:59:05 PDT 2004


> Martin Sunstrum wrote:
> I am trying to locate a tftp server that I can integrate with an external
> program/database application, and was wondering if tftp-hpa might have the
> capability I am looking for.

Hi Martin,

I wrote a patch to tftp-hpa which provides the functionality you need: I
added a -g switch which define a script to be run if the requested file
is not found. The output of this script is then sent to the tftp client.
I also patched tftpd man, so you should find all the documentation needed.

This patch was actually developped against tftpd-hpa debian source
package (unstable 0.36-1), but it should work out of the box with
tftp-hpa 0.36 sources. You can download it there:
http://npf.free.fr/tftpd-hpa/tftp-hpa-0.36-1_0.36-1cm.patch

NB:
- I use the -g switch to activate the functionality, but I am wondering
if using a new remap action instead may be a better way to handle it.
- I also added a -f switch to run the server in the foreground (a la
named or dhcpd) for debugging purposes.
- some read and write were replaced with fread ant fwrite as it was bug
prone.

PS:
HPA, It's been 3 times I tried to send this message with the patch to 
the mailing list unsuccessfully, because of a "suspicious header" (?). 
Messages were told to be waiting for moderation, but they seem to simply 
be dropped. I don't understant where I was wrong, it was just normal 
replies with an attachment.

Regards,

-- 
Pierre NEYRON




More information about the Syslinux mailing list