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 | 2df664a | 2025-06-25 15:19:13 +0200 | [diff] [blame] | 9 | /* HTTPS authentication mode */ |
| 10 | enum auth_mode { |
| 11 | AUTH_NONE, |
| 12 | AUTH_OPTIONAL, |
| 13 | AUTH_REQUIRED, |
| 14 | }; |
| 15 | |
| 16 | extern char *cacert; |
| 17 | extern size_t cacert_size; |
| 18 | extern enum auth_mode cacert_auth_mode; |
| 19 | extern bool cacert_initialized; |
| 20 | |
| 21 | int set_cacert_builtin(void); |
| 22 | |
Jerome Forissier | 6a78e96 | 2024-10-16 12:04:05 +0200 | [diff] [blame] | 23 | enum proto_t { |
| 24 | TFTPGET |
| 25 | }; |
| 26 | |
Jerome Forissier | 86378a5 | 2025-04-15 23:17:36 +0200 | [diff] [blame] | 27 | static inline int eth_is_on_demand_init(void) |
| 28 | { |
| 29 | return 1; |
| 30 | } |
| 31 | |
| 32 | int eth_init_state_only(void); /* Set active state */ |
| 33 | |
Tim Harvey | 680dd86 | 2025-05-30 08:38:25 -0700 | [diff] [blame] | 34 | int net_lwip_dns_init(void); |
Jerome Forissier | 86378a5 | 2025-04-15 23:17:36 +0200 | [diff] [blame] | 35 | int net_lwip_eth_start(void); |
Jerome Forissier | 64abd78 | 2024-10-16 12:04:00 +0200 | [diff] [blame] | 36 | struct netif *net_lwip_new_netif(struct udevice *udev); |
| 37 | struct netif *net_lwip_new_netif_noip(struct udevice *udev); |
| 38 | void net_lwip_remove_netif(struct netif *netif); |
| 39 | struct netif *net_lwip_get_netif(void); |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 40 | int net_lwip_rx(struct udevice *udev, struct netif *netif); |
| 41 | |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 42 | /** |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 43 | * wget_validate_uri() - varidate the uri |
| 44 | * |
| 45 | * @uri: uri string of target file of wget |
| 46 | * Return: true if uri is valid, false if uri is invalid |
| 47 | */ |
| 48 | bool wget_validate_uri(char *uri); |
| 49 | |
Jerome Forissier | 1ff0036 | 2024-10-16 12:04:03 +0200 | [diff] [blame] | 50 | 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] | 51 | int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Jerome Forissier | 359d4ed | 2024-10-16 12:04:09 +0200 | [diff] [blame] | 52 | 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] | 53 | |
| 54 | #endif /* __NET_LWIP_H__ */ |