summaryrefslogtreecommitdiff
path: root/include/net-lwip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net-lwip.h')
-rw-r--r--include/net-lwip.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/net-lwip.h b/include/net-lwip.h
new file mode 100644
index 00000000000..1c3583f82a1
--- /dev/null
+++ b/include/net-lwip.h
@@ -0,0 +1,41 @@
+/* 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
+};
+
+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_with_dns() - runs dns host IP address resulution before wget
+ *
+ * @dst_addr: destination address to download the file
+ * @uri: uri string of target file of wget
+ * Return: downloaded file size, negative if failed
+ */
+
+int wget_with_dns(ulong dst_addr, char *uri);
+/**
+ * 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_ping(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__ */