diff options
| author | Jerome Forissier <jerome.forissier@linaro.org> | 2025-04-15 23:17:42 +0200 |
|---|---|---|
| committer | Jerome Forissier <jerome.forissier@linaro.org> | 2025-04-23 10:02:49 +0200 |
| commit | 1f907e559d5d29f7824115e47c9771595fdf5819 (patch) | |
| tree | 59100f2bbb57239b9a0717a37179807ba568f6cb /include/net-common.h | |
| parent | 1772c85f7afe82d91306a45408fa7529b769e6cc (diff) | |
net: ping: make do_ping() available via <net.h>
Make the do_ping() function in cmd/net.c a global one by getting rid of
the static qualifier, and move the prototype declaration from net-lwip.h
to net-common.h. This makes the function available to other parts of
U-Boot when CONFIG_NET=y, as was already the case when
CONFIG_NET_LWIP=y.
This is a peparation step to make the sandbox tests use a common API
between NET and NET_LWIP.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/net-common.h')
| -rw-r--r-- | include/net-common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net-common.h b/include/net-common.h index 0b7edd7d76b..e536968a92b 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -493,6 +493,18 @@ int net_loop(enum proto_t protocol); */ int dhcp_run(ulong addr, const char *fname, bool autoload); + +/** + * do_ping - Run the ping command + * + * @cmdtp: Unused + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * Return: result (see enum command_ret_t) + */ +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); + /** * do_tftpb - Run the tftpboot command * |
