aboutsummaryrefslogtreecommitdiffstats
path: root/extras/libmemif/examples/README.md
diff options
context:
space:
mode:
authorJakub Grajciar <grajciar.jakub@gmail.com>2017-08-30 10:13:25 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-13 20:12:54 +0000
commit7c5c40db2a8d71a857ae63b6238cfac6e257da6d (patch)
treef0c01c2087ffd67e770d6f7932849ba13f44f12f /extras/libmemif/examples/README.md
parenta4393be1a03f6a8f8da5d53c22b8dca52fed6f51 (diff)
Shared memory packet interface (memif) library
Change-Id: I5097462ae85acd705f19e92517c01094dba7565f Signed-off-by: Jakub Grajciar <grajciar.jakub@gmail.com>
Diffstat (limited to 'extras/libmemif/examples/README.md')
-rw-r--r--extras/libmemif/examples/README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/extras/libmemif/examples/README.md b/extras/libmemif/examples/README.md
new file mode 100644
index 00000000000..bbd663b99e2
--- /dev/null
+++ b/extras/libmemif/examples/README.md
@@ -0,0 +1,16 @@
+## Examples
+
+After build, root folder will contain scripts linking binary examples with library (same name as example apps). These scripts can be executed to run example apps without installing the library. Example apps binaries can be found in _libs_ filder. To run binaries directly, make sure that libmemif library is installed.
+
+#### Run in container
+ligato/libmemif-sample-service image contains built and installed libmemf. To run different examples, override docker CMD to start container in bash:
+```
+# docker run -it --entrypoint=/bin/bash -i --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
+```
+Current WORKDIR is set to root repository directory. Example apps can be run from this directory (a script linking binary with library), or browse to ./.libs folder and execute binary directly.
+
+Example app | Description
+------------|------------
+[icmpr](../examples/icmp_responder/main.c) | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app.
+[icmpr-epoll](../examples/icmp_responder-epoll/main.c) (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. [Example setup](ExampleSetup.md) contains instructions on basic connection use cases setups.
+[icmpr-mt](../examples/icmp_responder-mt/main.c) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only.