aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/.gitignore5
-rw-r--r--extras/Makefile17
-rw-r--r--extras/go.mod8
-rw-r--r--extras/go.sum20
-rw-r--r--extras/libmemif/adapter.go2
5 files changed, 51 insertions, 1 deletions
diff --git a/extras/.gitignore b/extras/.gitignore
new file mode 100644
index 0000000..0647c0e
--- /dev/null
+++ b/extras/.gitignore
@@ -0,0 +1,5 @@
+# libmemif
+libmemif/examples/gopacket/gopacket
+libmemif/examples/icmp-responder/icmp-responder
+libmemif/examples/jumbo-frames/jumbo-frames
+libmemif/examples/raw-data/raw-data
diff --git a/extras/Makefile b/extras/Makefile
new file mode 100644
index 0000000..eae5627
--- /dev/null
+++ b/extras/Makefile
@@ -0,0 +1,17 @@
+GO ?= GO111MODULE=on go
+
+build: extras
+
+extras:
+ @echo "=> building extras"
+ cd libmemif/examples/gopacket && $(GO) build -v
+ cd libmemif/examples/icmp-responder && $(GO) build -v
+ cd libmemif/examples/jumbo-frames && $(GO) build -v
+ cd libmemif/examples/raw-data && $(GO) build -v
+
+clean:
+ @echo "=> cleaning extras"
+ go clean -v ./...
+
+
+.PHONY: build extras clean \ No newline at end of file
diff --git a/extras/go.mod b/extras/go.mod
new file mode 100644
index 0000000..482a429
--- /dev/null
+++ b/extras/go.mod
@@ -0,0 +1,8 @@
+module git.fd.io/govpp.git/extras
+
+go 1.12
+
+require (
+ github.com/google/gopacket v1.1.17
+ github.com/sirupsen/logrus v1.4.2
+)
diff --git a/extras/go.sum b/extras/go.sum
new file mode 100644
index 0000000..2bbea85
--- /dev/null
+++ b/extras/go.sum
@@ -0,0 +1,20 @@
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/gopacket v1.1.17 h1:rMrlX2ZY2UbvT+sdz3+6J+pp2z+msCq9MxTU6ymxbBY=
+github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/extras/libmemif/adapter.go b/extras/libmemif/adapter.go
index d238df6..1bb9229 100644
--- a/extras/libmemif/adapter.go
+++ b/extras/libmemif/adapter.go
@@ -34,7 +34,7 @@ import (
#include <stdint.h>
#include <string.h>
#include <sys/eventfd.h>
-#include <libmemif.h>
+#include <libmemif.h> // <-- VPP must be installed!
// Feature tests.
#ifndef MEMIF_HAVE_CANCEL_POLL_EVENT