LISP ONLY: maintain the emacs lisp plugin generator
[vpp.git] / extras / emacs / plugin-main-skel.el
index 47f030c..3ea3c12 100644 (file)
@@ -74,7 +74,7 @@ nil
 #define REPLY_MSG_ID_BASE sm->msg_id_base
 #include <vlibapi/api_helper_macros.h>
 
-extern " plugin-name "_main_t " plugin-name "_main;
+" plugin-name "_main_t " plugin-name "_main;
 
 /* List of message types that this plugin understands */
 
@@ -102,6 +102,11 @@ int " plugin-name "_enable_disable (" plugin-name "_main_t * sm, u32 sw_if_index
   vnet_feature_enable_disable (\"device-input\", \"" plugin-name "\",
                                sw_if_index, enable_disable, 0, 0);
 
+  /* Send an event to enable/disable the periodic scanner process */
+  vlib_process_signal_event (sm->vlib_main, " plugin-name"_periodic_node.index, 
+                            " PLUGIN-NAME"_EVENT_PERIODIC_ENABLE_DISABLE, 
+                            (uword)enable_disable);
+
   return rv;
 }