extern vlib_node_registration_t syn_filter4_node;
-#define foreach_syn_filter_error \
-_(THROTTLED, "TCP SYN packet throttle drops") \
-_(OK, "TCP SYN packets passed")
+#define foreach_syn_filter_error \
+ _ (THROTTLED, throttled, ERROR, "TCP SYN packet throttle drops") \
+ _ (OK, ok, INFO, "TCP SYN packets passed")
typedef enum
{
-#define _(sym,str) SYN_FILTER_ERROR_##sym,
+#define _(f, n, s, d) SYN_FILTER_ERROR_##f,
foreach_syn_filter_error
#undef _
SYN_FILTER_N_ERROR,
} syn_filter_error_t;
-static char *syn_filter4_error_strings[] = {
-#define _(sym,string) string,
+static vlib_error_desc_t tcp_syn_error_counters[] = {
+#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
foreach_syn_filter_error
#undef _
};
.type = VLIB_NODE_TYPE_INTERNAL,
.runtime_data_bytes = sizeof (syn_filter4_runtime_t),
- .n_errors = ARRAY_LEN(syn_filter4_error_strings),
- .error_strings = syn_filter4_error_strings,
+ .n_errors = SYN_FILTER_N_ERROR,
+ .error_counters = tcp_syn_error_counters,
.n_next_nodes = SYN_FILTER_N_NEXT,