/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016-2019 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:
return s;
}
-static vlib_node_registration_t syn_filter4_node;
+extern vlib_node_registration_t syn_filter4_node;
#define foreach_syn_filter_error \
_(THROTTLED, "TCP SYN packet throttle drops") \
extern vnet_feature_arc_registration_t vnet_feat_arc_ip4_local;
-static uword
-syn_filter4_node_fn (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (syn_filter4_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
u32 n_left_from, *from, *to_next;
syn_filter_next_t next_index;
if (now > rt->next_reset)
{
- memset (rt->syn_counts, 0, vec_len (rt->syn_counts));
+ clib_memset (rt->syn_counts, 0, vec_len (rt->syn_counts));
rt->next_reset = now + rt->reset_interval;
}
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (syn_filter4_node, static) =
+VLIB_REGISTER_NODE (syn_filter4_node) =
{
- .function = syn_filter4_node_fn,
.name = "syn-filter-4",
.vector_size = sizeof (u32),
.format_trace = format_syn_filter4_trace,
};
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (syn_filter4_node, syn_filter4_node_fn);
-
/* *INDENT-OFF* */
VNET_FEATURE_INIT (syn_filter_4, static) =
{
};
/* *INDENT-ON* */
+#ifndef CLIB_MARCH_VARIANT
int
syn_filter_enable_disable (u32 sw_if_index, int enable_disable)
{
.function = syn_filter_enable_disable_command_fn,
};
/* *INDENT-ON* */
+#endif /* CLIB_MARCH_VARIANT */
/*
* fd.io coding-style-patch-verification: ON