9
0
Fork 0
barebox/net
Jean-Christophe PLAGNIOL-VILLARD f76899fa98 net: dhcp: allow to set transmitted user class
For net boot setups it is useful to submit boot params like server or
bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware,
a custom vendor id can be sent in dhcp discover/request messages.

E.g. the ISC dhcp server can be configured with

 | option client-uuid code 97 = { unsigned integer 8, string };
 | class "at91sam9x5ek" {
 |         match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek";
 |
 |         filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage";
 |         if substring (option dhcp-client-identifier,0,7) = "ser2net" {
 |                 filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
 |         }
 |         if substring (option client-uuid,0,7) = "test" {
 |                 filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
 |         }
 |         if substring (option user-class,0,4) = "toto" {
 |                 filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-toto";
 |         }
 |         option tftp-server-name "192.168.200.98";
 |         option option-150 192.168.200.98;
 |         next-server 192.168.200.98;
 |         option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target";
 | }

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-03 11:39:29 +08:00
..
Kconfig tftp: Add push support 2010-06-28 10:45:04 +02:00
Makefile net: add dns support 2010-06-17 08:28:29 +02:00
dhcp.c net: dhcp: allow to set transmitted user class 2012-04-03 11:39:29 +08:00
dns.c commands: remove struct command pointer from commands 2012-02-27 20:28:07 +01:00
eth.c net: use container_of instead of dev->type_data 2012-02-25 15:16:22 +01:00
net.c net: set enetaddr to invalid address when an invalid string is passed 2012-02-14 23:57:12 +01:00
netconsole.c net: add a context to the packet handler 2011-04-12 09:54:56 +02:00
nfs.c commands: remove struct command pointer from commands 2012-02-27 20:28:07 +01:00
nfs.h pass filename to nfs and tftp start functions 2009-10-19 10:18:51 +02:00
ping.c commands: remove struct command pointer from commands 2012-02-27 20:28:07 +01:00
rarp.h Initial revision 2002-07-20 20:14:13 +00:00
tftp.c commands: remove struct command pointer from commands 2012-02-27 20:28:07 +01:00
tftp.h net: remove switch/case in NetLoop() 2009-10-13 10:57:40 +02:00