diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-11-20 22:46:47 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-12-14 14:29:42 +0100 |
commit | ab84733e570b889324f2594685f7f5d33b3c39be (patch) | |
tree | 0a75d7c782667cefb892b8a86772875f62a879c9 /include | |
parent | 946bc95a4de8247ea884a3932470344e59618c3a (diff) | |
download | barebox-ab84733e570b889324f2594685f7f5d33b3c39be.tar.gz barebox-ab84733e570b889324f2594685f7f5d33b3c39be.tar.xz |
net: dhcp: Allow to specify network device
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/dhcp.h | 4 | ||||
-rw-r--r-- | include/net.h | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/dhcp.h b/include/dhcp.h index 0796b30cf1..20a523250f 100644 --- a/include/dhcp.h +++ b/include/dhcp.h @@ -20,6 +20,8 @@ struct dhcp_req_param { char *client_uuid; }; -int dhcp(int retries, struct dhcp_req_param *param); +struct eth_device; + +int dhcp(struct eth_device *edev, int retries, struct dhcp_req_param *param); #endif diff --git a/include/net.h b/include/net.h index 8e3b0aff5a..b7555c0de6 100644 --- a/include/net.h +++ b/include/net.h @@ -214,14 +214,14 @@ struct icmphdr { extern unsigned char *NetRxPackets[PKTBUFSRX];/* Receive packets */ -void net_set_ip(IPaddr_t ip); +void net_set_ip(struct eth_device *edev, IPaddr_t ip); void net_set_serverip(IPaddr_t ip); void net_set_serverip_empty(IPaddr_t ip); -void net_set_netmask(IPaddr_t ip); +void net_set_netmask(struct eth_device *edev, IPaddr_t ip); void net_set_gateway(IPaddr_t ip); void net_set_nameserver(IPaddr_t ip); void net_set_domainname(const char *name); -IPaddr_t net_get_ip(void); +IPaddr_t net_get_ip(struct eth_device *edev); IPaddr_t net_get_serverip(void); IPaddr_t net_get_gateway(void); IPaddr_t net_get_nameserver(void); |