summaryrefslogtreecommitdiffstats
path: root/examples/binapi/gen.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/binapi/gen.go')
-rw-r--r--examples/binapi/gen.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/binapi/gen.go b/examples/binapi/gen.go
new file mode 100644
index 0000000..40fb25d
--- /dev/null
+++ b/examples/binapi/gen.go
@@ -0,0 +1,18 @@
+package binapi
+
+// Generate Go code from the VPP APIs located in the /usr/share/vpp/api directory.
+//go:generate -command binapigen binapi-generator --output-dir=. --include-services
+
+// Core
+//go:generate binapigen --input-file=/usr/share/vpp/api/core/af_packet.api.json
+//go:generate binapigen --input-file=/usr/share/vpp/api/core/interface.api.json
+//go:generate binapigen --input-file=/usr/share/vpp/api/core/ip.api.json
+//go:generate binapigen --input-file=/usr/share/vpp/api/core/memclnt.api.json
+//go:generate binapigen --input-file=/usr/share/vpp/api/core/vpe.api.json
+
+// Plugins
+//go:generate binapigen --input-file=/usr/share/vpp/api/plugins/acl.api.json
+//go:generate binapigen --input-file=/usr/share/vpp/api/plugins/memif.api.json
+
+// VPP version
+//go:generate sh -ec "dpkg-query -f '$DOLLAR{Version}' -W vpp > VPP_VERSION"