barebox/include/dhcp.h
Wadim Egorov e9bd26c7a7 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>
2015-06-05 13:32:39 +02:00

26 lines
541 B
C

/*
* 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