2 * Copyright (c) 2017 Cisco and/or its affiliates.
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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef PLUGINS_IOAM_PLUGIN_IOAM_UDP_PING_UDP_PING_H_
17 #define PLUGINS_IOAM_PLUGIN_IOAM_UDP_PING_UDP_PING_H_
19 #include <ioam/analyse/ioam_analyse.h>
21 #define MAX_PING_RETRIES 5
23 #define EVENT_SIG_RECHECK 2
25 /** @brief udp-ping session data.
30 /** UDP ping packet */
33 /** Ping packet rewrite string len. */
36 /** Number of times ping response was dropped.
37 * If retry > MAX_PING_RETRIES then declare connectivity as down.
44 ioam_analyser_data_t analyse_data;
46 /** This is used by ioam e2e for identifying flow and add seq number. */
49 /** No of packets sent for this flow. */
53 /** @brief udp-ping flow data.
58 /** Time at which next udp-ping probe has to be sent out. */
61 /** Interval for which ping packet to be sent. */
66 /** Defines start port of the src port range. */
69 /** Defines end port of the src port range. */
72 /** Defines start port of the dest port range. */
75 /** Defines end port of the dest port range. */
78 /** Ping statistics. */
79 udp_ping_flow_data *stats;
83 /** @brief udp-ping data.
87 /** Local source IPv4/6 address to be used. */
90 /** Remote destination IPv4/6 address to be used. */
94 udp_ping_flow udp_data;
96 /** To enable fault detection/isolation in network. */
100 /** @brief udp-ping main data-structure.
104 /** Vector od udp-ping data */
105 ip46_udp_ping_flow *ip46_flow;
107 /** Stores the time interval at which process node has to wake up. */
110 /** Pointer to VLib main for the node - ipfix-collector. */
111 vlib_main_t *vlib_main;
113 /** Pointer to vnet main for convenience. */
114 vnet_main_t *vnet_main;
116 /** API message ID base */
120 extern udp_ping_main_t udp_ping_main;
123 ip46_udp_ping_set_flow (ip46_address_t src, ip46_address_t dst,
124 u16 start_src_port, u16 end_src_port,
125 u16 start_dst_port, u16 end_dst_port,
126 u16 interval, u8 fault_det, u8 is_disable);
128 clib_error_t *udp_ping_flow_create (u8 del);
130 #endif /* PLUGINS_IOAM_PLUGIN_IOAM_UDP_PING_UDP_PING_H_ */
133 * fd.io coding-style-patch-verification: ON
136 * eval: (c-set-style "gnu")