mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-13 18:56:59 +02:00
Make the do_ping() function in cmd/net.c a global one by getting rid of the static qualifier, and move the prototype declaration from net-lwip.h to net-common.h. This makes the function available to other parts of U-Boot when CONFIG_NET=y, as was already the case when CONFIG_NET_LWIP=y. This is a peparation step to make the sandbox tests use a common API between NET and NET_LWIP. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
40 lines
1023 B
C
40 lines
1023 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
#ifndef __NET_LWIP_H__
|
|
#define __NET_LWIP_H__
|
|
|
|
#include <lwip/ip4.h>
|
|
#include <lwip/netif.h>
|
|
|
|
enum proto_t {
|
|
TFTPGET
|
|
};
|
|
|
|
static inline int eth_is_on_demand_init(void)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
int eth_init_state_only(void); /* Set active state */
|
|
|
|
int net_lwip_eth_start(void);
|
|
struct netif *net_lwip_new_netif(struct udevice *udev);
|
|
struct netif *net_lwip_new_netif_noip(struct udevice *udev);
|
|
void net_lwip_remove_netif(struct netif *netif);
|
|
struct netif *net_lwip_get_netif(void);
|
|
int net_lwip_rx(struct udevice *udev, struct netif *netif);
|
|
|
|
/**
|
|
* wget_validate_uri() - varidate the uri
|
|
*
|
|
* @uri: uri string of target file of wget
|
|
* Return: true if uri is valid, false if uri is invalid
|
|
*/
|
|
bool wget_validate_uri(char *uri);
|
|
|
|
int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
|
|
int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
|
|
int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
|
|
|
|
#endif /* __NET_LWIP_H__ */
|