+#define tcp_maybe_inc_counter(node_id, err, count) \
+{ \
+ if (next0 != tcp_next_drop (is_ip4)) \
+ tcp_node_inc_counter_i (vm, tcp4_##node_id##_node.index, \
+ tcp6_##node_id##_node.index, is_ip4, err, \
+ 1); \
+}
+#define tcp_inc_counter(node_id, err, count) \
+ tcp_node_inc_counter_i (vm, tcp4_##node_id##_node.index, \
+ tcp6_##node_id##_node.index, is_ip4, \
+ err, count)
+#define tcp_maybe_inc_err_counter(cnts, err) \
+{ \
+ cnts[err] += (next0 != tcp_next_drop (is_ip4)); \
+}
+#define tcp_inc_err_counter(cnts, err, val) \
+{ \
+ cnts[err] += val; \
+}
+#define tcp_store_err_counters(node_id, cnts) \
+{ \
+ int i; \
+ for (i = 0; i < TCP_N_ERROR; i++) \
+ if (cnts[i]) \
+ tcp_inc_counter(node_id, i, cnts[i]); \
+}
+
+