Jerome Forissier | 64abd78 | 2024-10-16 12:04:00 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | |
| 3 | #ifndef __NET_LWIP_H__ |
| 4 | #define __NET_LWIP_H__ |
| 5 | |
| 6 | #include <lwip/ip4.h> |
| 7 | #include <lwip/netif.h> |
| 8 | |
Jerome Forissier | 6a78e96 | 2024-10-16 12:04:05 +0200 | [diff] [blame] | 9 | enum proto_t { |
| 10 | TFTPGET |
| 11 | }; |
| 12 | |
Jerome Forissier | 86378a5 | 2025-04-15 23:17:36 +0200 | [diff] [blame] | 13 | static inline int eth_is_on_demand_init(void) |
| 14 | { |
| 15 | return 1; |
| 16 | } |
| 17 | |
| 18 | int eth_init_state_only(void); /* Set active state */ |
| 19 | |
| 20 | int net_lwip_eth_start(void); |
Jerome Forissier | 64abd78 | 2024-10-16 12:04:00 +0200 | [diff] [blame] | 21 | struct netif *net_lwip_new_netif(struct udevice *udev); |
| 22 | struct netif *net_lwip_new_netif_noip(struct udevice *udev); |
| 23 | void net_lwip_remove_netif(struct netif *netif); |
| 24 | struct netif *net_lwip_get_netif(void); |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 25 | int net_lwip_rx(struct udevice *udev, struct netif *netif); |
| 26 | |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 27 | /** |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 28 | * wget_validate_uri() - varidate the uri |
| 29 | * |
| 30 | * @uri: uri string of target file of wget |
| 31 | * Return: true if uri is valid, false if uri is invalid |
| 32 | */ |
| 33 | bool wget_validate_uri(char *uri); |
| 34 | |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 35 | int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Jerome Forissier | bc4d882 | 2024-10-16 12:04:07 +0200 | [diff] [blame] | 36 | int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Jerome Forissier | 8f29e00 | 2024-10-16 12:04:06 +0200 | [diff] [blame] | 37 | int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 38 | int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); |
Jerome Forissier | 64abd78 | 2024-10-16 12:04:00 +0200 | [diff] [blame] | 39 | |
| 40 | #endif /* __NET_LWIP_H__ */ |