[syslinux] Custom .c32 module which can send tcp or udp packets

Miller, Shao Shao.Miller at yrdsb.edu.on.ca
Fri Mar 27 12:24:16 PDT 2009


Good day Daniel,

You might be interested in the possibility of using gPXE to accomplish
your goal below.  If you boot gPXE, your DHCP filename option can be a
gPXE script, something like "boot.gpxe" which could contain:

#!gpxe
chain
http://webserver/inven.gpxe?mac=${mac}&ip=${ip}&manu=${manufacturer:uris
tring}&model=${product:uristring}&serial=${serial:uristring}&asset=${smb
ios/3.8.0:uristring}&biosrev=${smbios/0.5.0:uristring}

The "webserver" would host the "inven.gpxe" script, which would actually
be a server script.  It would collect the inventory parameters passed to
it, then return yet another gPXE script to the gPXE client.  This
returned script might contain something like:

#!gpxe
set 209:string pxelinux.cfg/default
set 210:string http://webserver/
chain http://webserver/pxelinux.0

The gPXE client would then load pxelinux.0 from the _web-server_ via
HTTP, then load your pxelinux.cfg/default file, again via HTTP, after
which point your process should resemble what you already have in place,
except that all files would be requested via HTTP and would be requested
from the web-server.

The 209 and 210 options are PXELINUX options and are documented in
syslinux/doc/rfc5071.txt.

Another thing to keep in mind is that since you can dynamically generate
the second returned script, it can be based on the client's inventory...
Which means you can return a script that points to pxelinux.cfg/foo or a
different script that points to pxelinux.cfg/bar.

If you _don't_ want to use HTTP _except_ for the inventory collection,
and wish to use TFTP for the pxelinux.0 operations in order to minimize
the change to your environment, change the 210 option line to:

set 210:string tftp://${next-server}/

And the PXELINUX operations should likely continue as normal for you.

I hope this helps!

- Shao Miller

P. S. Some folks might notice that I've cross-e-mailed this one to both
SYSLINUX and gPXE.  Maybe it could make for a handy point-to in case
this question comes up again.  I hope nobody minds.

-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of pxelinux
Sent: Friday, March 13, 2009 05:56
To: syslinux at zytor.com
Subject: [syslinux] Custom .c32 module which can send tcp or udp packets

I need to write a custom .c32 module which can send information over to
a separated service or tftp deamon. The goal is to send inventory
information gathered in pxelinux to be transfered back to the inventory
database without booting a kernel or os-image.

Is this possible and if so, can you give me a hint how to realise this?

Thanks,
Daniel
_______________________________________________
Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.




More information about the Syslinux mailing list