diff options
author | Wadim Egorov <w.egorov@phytec.de> | 2015-06-03 11:19:02 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-05 13:32:39 +0200 |
commit | e9bd26c7a7167b5e36696373ef8381a2caaff4a6 (patch) | |
tree | 421b58ffa1705d7e392c2706f9fab8b6bca3c597 /include | |
parent | f6c5578eaf42eab8c6723ee9a25aa38dab651ff9 (diff) | |
download | barebox-e9bd26c7a7167b5e36696373ef8381a2caaff4a6.tar.gz barebox-e9bd26c7a7167b5e36696373ef8381a2caaff4a6.tar.xz |
net: dhcp: Split dhcp funcionality & add dhcp command
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/dhcp.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/dhcp.h b/include/dhcp.h new file mode 100644 index 0000000000..0796b30cf1 --- /dev/null +++ b/include/dhcp.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2015 PHYTEC Messtechnik GmbH, + * Author: Wadim Egorov <w.egorov@phytec.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __DHCP_H__ +#define __DHCP_H__ + +#define DHCP_DEFAULT_RETRY 20 + +struct dhcp_req_param { + char *hostname; + char *vendor_id; + char *client_id; + char *user_class; + char *client_uuid; +}; + +int dhcp(int retries, struct dhcp_req_param *param); + +#endif |