1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: shell cmds APIs implementation about ping and ping6 15 * Author: none 16 * Create: 2020 17 */ 18 19 #ifndef LWIP_PING_H 20 #define LWIP_PING_H 21 #include "lwip/opt.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 #if !defined LWIP_SHELL_CMD_PING_RETRY_TIMES || defined __DOXYGEN__ 28 #define LWIP_SHELL_CMD_PING_RETRY_TIMES 4 29 #endif 30 31 #if !defined LWIP_SHELL_CMD_PING_TIMEOUT || defined __DOXYGEN__ 32 #define LWIP_SHELL_CMD_PING_TIMEOUT 2000 33 #endif 34 35 u32_t os_shell_ping(int argc, const char **argv); 36 u32_t os_shell_ping6(int argc, const char **argv); 37 38 #ifdef CONFIG_SIGMA_SUPPORT 39 typedef void (*ping_result_callback)(u32_t succ_cnt, u32_t failed_cnt); 40 void ping_add_ext_callback(ping_result_callback func); 41 #endif 42 43 #ifdef __cplusplus 44 } 45 #endif 46 47 #endif /* LWIP_PING_H */ 48