blob: 7dac8a0948786f65c4b3c20b11f7ff8412cfebcb [file] [log] [blame]
Dave Barachb852bfa2016-01-04 15:27:42 -05001How to construct a complete plugin using the emacs skeletons
2
30. Install open-vpp, including the development package.
4
51. Load emacs skeletons
6
7 M-x find-file all-skel.el
8 M-x eval-buffer
9
102. Pick a single-word, lower-case name for your plugin. For example: macswap.
11Hereafter, we'll refer to the selected name as <plugin-name>.
12
133. Generate the entire plugin:
14
15 M-x make-plugin
16 Plugin-name: <plugin-name>
17
18Or, generate each file individually:
19
203. Create the required directories, e.g. under .../vpp
21
22 $ mkdir -p <plugin-name>-plugin/<plugin-name>
23
244. Create <plugin-name>-plugin/{configure.ac,Makefile.am}
25
26 M-x find-file <plugin-name>-plugin/configure.ac
27 M-x plugin-configure-skel
28
29 M-x find-file <plugin-name>-plugin/Makefile.am
30 M-x plugin-makefile.skel
31
325. Create the api skeleton
33 M-x find-file <plugin-name>-plugin/<plugin-name>/<plugin-name>.api
34 M-x plugin-api-skel
35
366. Create the api message enumeration header file
37 M-x find-file <plugin-name>-plugin/<plugin-name>/<plugin-name>_msg_enum.h
38 M-x plugin-msg-enum-skel
39
407. Create the "all-api" header file
41 M-x find-file <plugin-name>-plugin/<plugin-name>/<plugin-name>_all_api_h.h
42 M-x plugin-all-apih-skel
43
448. Create the main data structure definition header file
45 M-x find-file <plugin-name>-plugin/<plugin-name>/<plugin-name>.h
46 M-x plugin-h-skel
47
489. Create the plugin main C file
49 M-x find-file <plugin-name>-plugin/<plugin-name>/<plugin-name>.c
50 M-x plugin-main-skel
51
5210. Create the vpp-api-test plugin main C file
53 M-x find-file <plugin-name>-plugin/<plugin-name>/<plugin-name>_test.c
54 M-x plugin-test-skel
55
5611. Create the data plane packet processing node
57 M-x find-file <plugin-name>-plugin/<plugin-name>/node.c
58 M-x plugin-node-skel
59
6012. Process autotools input files
61
62 $ cd <plugin-name>-plugin
63 $ autoreconf -i -f
64
6513. Build the plugin skeleton
66
67 $ mkdir build
68 $ cd build
Dave Barach66cc1812016-01-04 18:21:48 -050069 $ ../configure --with-plugin-toolkit
Dave Barachb852bfa2016-01-04 15:27:42 -050070 $ make
71 $ sudo make install
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86