|
|
@@ -1,16 +1,8 @@
|
|
|
-// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
|
|
-//
|
|
|
-// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
-// you may not use this file except in compliance with the License.
|
|
|
-// You may obtain a copy of the License at
|
|
|
-//
|
|
|
-// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
-//
|
|
|
-// Unless required by applicable law or agreed to in writing, software
|
|
|
-// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
-// See the License for the specific language governing permissions and
|
|
|
-// limitations under the License.
|
|
|
+/*
|
|
|
+ * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
|
|
|
+ *
|
|
|
+ * SPDX-License-Identifier: Apache-2.0
|
|
|
+ */
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
@@ -67,7 +59,8 @@ typedef struct {
|
|
|
uint32_t interval_ms; /*!< Milliseconds between each ping procedure */
|
|
|
uint32_t timeout_ms; /*!< Timeout value (in milliseconds) of each ping procedure */
|
|
|
uint32_t data_size; /*!< Size of the data next to ICMP packet header */
|
|
|
- uint8_t tos; /*!< Type of Service, a field specified in the IP header */
|
|
|
+ int tos; /*!< Type of Service, a field specified in the IP header */
|
|
|
+ int ttl; /*!< Time to Live,a field specified in the IP header */
|
|
|
ip_addr_t target_addr; /*!< Target IP address, either IPv4 or IPv6 */
|
|
|
uint32_t task_stack_size; /*!< Stack size of internal ping task */
|
|
|
uint32_t task_prio; /*!< Priority of internal ping task */
|
|
|
@@ -85,6 +78,7 @@ typedef struct {
|
|
|
.timeout_ms = 1000, \
|
|
|
.data_size = 64, \
|
|
|
.tos = 0, \
|
|
|
+ .ttl = IP_DEFAULT_TTL, \
|
|
|
.target_addr = *(IP_ANY_TYPE), \
|
|
|
.task_stack_size = 2048, \
|
|
|
.task_prio = 2, \
|
|
|
@@ -99,6 +93,7 @@ typedef struct {
|
|
|
*/
|
|
|
typedef enum {
|
|
|
ESP_PING_PROF_SEQNO, /*!< Sequence number of a ping procedure */
|
|
|
+ ESP_PING_PROF_TOS, /*!< Type of service of a ping procedure */
|
|
|
ESP_PING_PROF_TTL, /*!< Time to live of a ping procedure */
|
|
|
ESP_PING_PROF_REQUEST, /*!< Number of request packets sent out */
|
|
|
ESP_PING_PROF_REPLY, /*!< Number of reply packets received */
|