mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
[net][netdev] Add FINSH_USING_MSH control for netdev network commands
This commit is contained in:
@@ -132,10 +132,11 @@ struct netdev_ops
|
||||
int (*set_dns_server)(struct netdev *netdev, uint8_t dns_num, ip_addr_t *dns_server);
|
||||
int (*set_dhcp)(struct netdev *netdev, rt_bool_t is_enabled);
|
||||
|
||||
#ifdef FINSH_USING_MSH
|
||||
/* set network interface device common network interface device operations */
|
||||
int (*ping)(struct netdev *netdev, const char *host, size_t data_len, uint32_t timeout, struct netdev_ping_resp *ping_resp);
|
||||
void (*netstat)(struct netdev *netdev);
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
/* The network interface device registered and unregistered*/
|
||||
|
||||
@@ -985,7 +985,7 @@ FINSH_FUNCTION_EXPORT_ALIAS(netdev_ifconfig, __cmd_ifconfig, list the informatio
|
||||
#endif /* NETDEV_USING_IFCONFIG */
|
||||
|
||||
#ifdef NETDEV_USING_PING
|
||||
static int netdev_cmd_ping(char* target_name, rt_uint32_t times, rt_size_t size)
|
||||
int netdev_cmd_ping(char* target_name, rt_uint32_t times, rt_size_t size)
|
||||
{
|
||||
#define NETDEV_PING_DATA_SIZE 32
|
||||
/** ping receive timeout - in milliseconds */
|
||||
|
||||
Reference in New Issue
Block a user