[syslinux] Request to an hpa-TFTP enhancement - convert '\' in filenames to '/'

G. Nau b404_r66 at yahoo.de
Wed Jul 21 10:53:19 PDT 2004


Hello,
I'm working on getting BartPE (normally a LiveCD of Windows XP) 
network booted by PXE from a Linux TFTPD server. Normally a M$ 
RIS server with Active Directory and stuff is necessary, but the basic 
filetransfers are all done by TFTP and SMB and can therefore be 
delivered by a Linux machine.

I'm referring to this documentation 
http://oss.netfarm.it/guides/pxe.php how to do that.

Most of the stuff is simple and there have to be some python based 
tools installed on the Linux machine.
BUT, to satisfy the booting XP machine, the TFTP server has to 
accept '\' in filenames and convert them to be accepted by Linux and 
the TFTP process. The above mentioned website contains a patch 
for the AFTPD server to make this conversion.
>>>
           switch (retval)
           {
           case GET_RRQ:
+	       {
+	       /* Windows client hack */
+	       char *seek = (char*) &(data-
>tftp_options[OPT_FILENAME].value);
+	       if (*seek == '\\')
+	       while (*seek)
+	       {
+	           if (*seek == '\\') *seek = '/';
+		      seek++;
+	       }
                logger(LOG_NOTICE, "Serving %s to 
%s:%d",
                       data-
>tftp_options[OPT_FILENAME].value,
                       inet_ntoa(data-
>client_info->client.sin_addr),
@@ -665,6 +674,7 @@
                     stats_send_locked();
                else
                     stats_err_locked();
+	       }
                break;
           case GET_WRQ:
                logger(LOG_NOTICE, "Fetching from 
%s to %s",
<<<

I would be very pleased to get such a '\' -> '/' conversion the the hpa-
tftpd server we are using for years now. For the experienced 
programmers here it shouldn't be a big deal if my request is 
accepted as helpful, easy to be implemented and without any side-
effects.

Thanks in advance
  Bernd



More information about the Syslinux mailing list