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 | 64abd78 | 2024-10-16 12:04:00 +0200 | [diff] [blame] | 13 | struct netif *net_lwip_new_netif(struct udevice *udev); |
| 14 | struct netif *net_lwip_new_netif_noip(struct udevice *udev); |
| 15 | void net_lwip_remove_netif(struct netif *netif); |
| 16 | struct netif *net_lwip_get_netif(void); |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 17 | int net_lwip_rx(struct udevice *udev, struct netif *netif); |
| 18 | |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 19 | /** |
| 20 | * wget_with_dns() - runs dns host IP address resulution before wget |
| 21 | * |
| 22 | * @dst_addr: destination address to download the file |
| 23 | * @uri: uri string of target file of wget |
| 24 | * Return: downloaded file size, negative if failed |
| 25 | */ |
| 26 | |
| 27 | int wget_with_dns(ulong dst_addr, char *uri); |
| 28 | /** |
| 29 | * wget_validate_uri() - varidate the uri |
| 30 | * |
| 31 | * @uri: uri string of target file of wget |
| 32 | * Return: true if uri is valid, false if uri is invalid |
| 33 | */ |
| 34 | bool wget_validate_uri(char *uri); |
| 35 | |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 36 | 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] | 37 | 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] | 38 | 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] | 39 | 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] | 40 | |
| 41 | #endif /* __NET_LWIP_H__ */ |