blob: c9a1eb6cdb6e7634858386a48ab9cf62f129c9f4 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001;;; config-skel.el - config function command skeleton
2
3(require 'skeleton)
4
5(define-skeleton config-skel
6"Insert a vlib config skeleton "
7nil
8'(setq cfg-name (skeleton-read "Config Class Name: "))
9
10"
11static clib_error_t *
12" cfg-name "_config (vlib_main_t * vm, unformat_input_t * input)
13{
14 u32 whatever;
15
16 while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
17 if (unformat (input, \"whatever %d\", &whatever))
18 ;
19 else
20 return clib_error_return (0, \"unknown input `%U'\",
21 format_unformat_error, input);
22 }
23
24 return 0;
25}
26
27VLIB_CONFIG_FUNCTION (" cfg-name "_config, \"" cfg-name "\");
28")