summaryrefslogtreecommitdiffstats
path: root/commands/dhcp.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: dhcp: add parameter for private dataOleg.Karfich@wago.com2018-09-041-3/+7
| | | | | Signed-off-by: Oleg Karfich <oleg.karfich@wago.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: reworkSascha Hauer2017-12-141-12/+3
| | | | | | | | | | | | | | | The DHCP code is a mess. It is not clear which options are sent to the server and which options are returned from the server. Also environment variables are read from and written to all over the place. This patch cleans this up. There now is struct dhcp_req_param which is used for options sent to the server and struct dhcp_result which contains the values sent from the server. The values from the server are written to the barebox variables in a single place. Also it's now possible to call the dhcp code without modifying barebox variables at all, storing the result only in the dhcp result struct. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: Allow to specify network deviceSascha Hauer2017-12-141-3/+17
| | | | | | | | | Instead of allowing to DHCP only on the "current" network device, allow to specify the desired network device. This is a first step to get rid of the concept of a "current" network device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: exit on invalid optionEnrico Jorns2016-09-161-0/+2
| | | | | | | | | | Barebox commands should not perform any action and return 0 if an invalid parameter was given. This might cause undetected unintended behvaior when calling commands with wrong options, either manually or from a script. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: Split dhcp funcionality & add dhcp commandWadim Egorov2015-06-051-0/+78
dhcp/bootp was bound to the command functionality. This patch splits the dhcp command. We are now able to use bootp without a shell. This patch adds also a check for environment variables and globalvar. So only when ENVIRONMENT_VARIABLES and GLOBALVAR is set, all received dhcp data will be stored. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>