File: net-lwip.h

package info (click to toggle)
u-boot 2025.01-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates
  • size: 330,740 kB
  • sloc: ansic: 2,627,855; python: 60,773; sh: 41,641; asm: 21,854; makefile: 15,048; perl: 12,447; cs: 6,763; cpp: 1,868; yacc: 1,100; lex: 747; awk: 57; tcl: 32; sed: 24
file content (41 lines) | stat: -rw-r--r-- 1,229 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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__ */