M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/pppoe/
+Plugin - Ping
+I: ping
+M: Andrew Yourtchenko <ayourtch@gmail.com>
+F: src/plugins/ping
+
Plugin - IPv6 Segment Routing Dynamic Proxy
I: srv6-ad
M: Francois Clad <fclad@cisco.com>
--- /dev/null
+# Copyright (c) 2018 Cisco and/or its affiliates.
+# 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.
+
+add_vpp_plugin(ping
+ SOURCES
+ ping.c
+)
*/
#include <stddef.h>
-#include <vnet/ip/ping.h>
+
+#include <vlib/vlib.h>
#include <vnet/fib/ip6_fib.h>
#include <vnet/fib/ip4_fib.h>
#include <vnet/fib/fib_entry.h>
-#include <vlib/vlib.h>
+#include <vnet/plugin/plugin.h>
+#include <vpp/app/version.h>
+
+#include <vnet/ip/icmp4.h>
+#include <ping/ping.h>
ping_main_t ping_main;
VLIB_INIT_FUNCTION (ping_cli_init);
+/* *INDENT-OFF* */
+VLIB_PLUGIN_REGISTER () = {
+ .version = VPP_BUILD_VER,
+ .description = "Ping (ping)",
+};
+/* *INDENT-ON* */
+
/*
* fd.io coding-style-patch-verification: ON
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef included_vnet_ping_h
-#define included_vnet_ping_h
+#ifndef included_ping_ping_h
+#define included_ping_ping_h
#include <vnet/ip/ip.h>
ICMP46_ECHO_REPLY_N_NEXT,
} icmp46_echo_reply_next_t;
-#endif /* included_vnet_ping_h */
+#endif /* included_ping_ping_h */
ip/ip_in_out_acl.c
ip/ip_punt_drop.c
ip/lookup.c
- ip/ping.c
ip/punt_api.c
ip/punt.c
ip/punt_node.c
#include <vnet/ip/ip.h>
#include <vnet/pg/pg.h>
-
static char *icmp_error_strings[] = {
#define _(f,s) s,
foreach_icmp4_error
IP4_ICMP_ERROR_N_NEXT,
} ip4_icmp_error_next_t;
-void
-icmp4_error_set_vnet_buffer (vlib_buffer_t * b, u8 type, u8 code, u32 data)
-{
- vnet_buffer (b)->ip.icmp.type = type;
- vnet_buffer (b)->ip.icmp.code = code;
- vnet_buffer (b)->ip.icmp.data = data;
-}
-
static u8
icmp4_icmp_type_to_error (u8 type)
{
_ (OPTION_WITH_ZERO_LENGTH, "option has zero length") \
_ (ECHO_REPLIES_SENT, "echo replies sent") \
_ (DST_LOOKUP_MISS, "icmp6 dst address lookup misses") \
- _ (DEST_UNREACH_SENT, "destination unreachable response sent") \
- _ (TTL_EXPIRE_SENT, "hop limit exceeded response sent") \
- _ (PARAM_PROBLEM_SENT, "parameter problem response sent") \
+ _ (DEST_UNREACH_SENT, "destination unreachable response sent") \
+ _ (TTL_EXPIRE_SENT, "hop limit exceeded response sent") \
+ _ (PARAM_PROBLEM_SENT, "parameter problem response sent") \
_ (DROP, "error message dropped")
typedef enum
format_function_t format_icmp4_input_trace;
void ip4_icmp_register_type (vlib_main_t * vm, icmp4_type_t type,
u32 node_index);
-void icmp4_error_set_vnet_buffer (vlib_buffer_t * b, u8 type, u8 code,
- u32 data);
+
+static_always_inline void
+icmp4_error_set_vnet_buffer (vlib_buffer_t * b, u8 type, u8 code, u32 data)
+{
+ vnet_buffer (b)->ip.icmp.type = type;
+ vnet_buffer (b)->ip.icmp.code = code;
+ vnet_buffer (b)->ip.icmp.data = data;
+}
#endif /* included_vnet_icmp4_h */
ip4_udp_register_listener (vlib_main_t * vm,
u16 dst_port, u32 next_node_index);
-void
-ip4_icmp_register_type (vlib_main_t * vm, icmp4_type_t type, u32 node_index);
-
u16 ip4_tcp_udp_compute_checksum (vlib_main_t * vm, vlib_buffer_t * p0,
ip4_header_t * ip0);