+int vlib_enable_disable_pkt_trace_filter (int enable) __attribute__ ((weak));
+
+int
+vlib_enable_disable_pkt_trace_filter (int enable)
+{
+ return 0;
+}
+
+void
+vlib_trace_stop_and_clear (void)
+{
+ vlib_enable_disable_pkt_trace_filter (0); /* disble tracing */
+ clear_trace_buffer ();
+}
+
+
+void
+trace_update_capture_options (u32 add, u32 node_index, u32 filter, u8 verbose)
+{
+ vlib_trace_main_t *tm;
+ vlib_trace_node_t *tn;
+
+ if (add == ~0)
+ add = 50;
+
+ /* *INDENT-OFF* */
+ foreach_vlib_main ((
+ {
+ tm = &this_vlib_main->trace_main;
+ tm->verbose = verbose;
+ vec_validate (tm->nodes, node_index);
+ tn = tm->nodes + node_index;
+
+ /*
+ * Adding 0 makes no real sense, and there wa no other way
+ * to explicilty zero-out the limits and count, so make
+ * an "add 0" request really be "set to 0".
+ */
+ if (add == 0)
+ tn->limit = tn->count = 0;
+ else
+ tn->limit += add;
+ }));
+
+ foreach_vlib_main ((
+ {
+ tm = &this_vlib_main->trace_main;
+ tm->trace_enable = 1;
+ }));
+ /* *INDENT-ON* */
+}
+