diff options
Diffstat (limited to 'extras/emacs/dual-loop-skel.el')
-rw-r--r-- | extras/emacs/dual-loop-skel.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/extras/emacs/dual-loop-skel.el b/extras/emacs/dual-loop-skel.el index 97d63e01b38..583a2da52d8 100644 --- a/extras/emacs/dual-loop-skel.el +++ b/extras/emacs/dual-loop-skel.el @@ -20,6 +20,7 @@ nil '(setq node-name (skeleton-read "Node Name: ")) '(setq uc-node-name (upcase node-name)) +'(setq main-p (concat (substring plugin-name 0 1) "mp")) " #include <vlib/vlib.h> #include <vnet/vnet.h> @@ -300,12 +301,12 @@ VLIB_REGISTER_NODE (" node-name "_node) = { clib_error_t *" node-name "_init (vlib_main_t *vm) { - " node-name "_main_t *msm = &" node-name "_main; + " node-name "_main_t *" main-p " = &" node-name "_main; /* $$$$$ Initialize " node-name "_main_t structure here. $$$$$ */ - msm->vlib_main = vm; - msm->vnet_main = vnet_get_main(); - msm->ethernet_main = ethernet_get_main(vm); + " main-p "->vlib_main = vm; + " main-p "->vnet_main = vnet_get_main(); + " main-p "->ethernet_main = ethernet_get_main(vm); return 0; } |