aboutsummaryrefslogtreecommitdiffstats
path: root/extras/libmemif/docs
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2021-01-04 11:28:33 +0100
committerDamjan Marion <dmarion@me.com>2022-03-28 22:34:33 +0000
commite74c04fc9fb2600470fe79a69d3ec6b0db95faec (patch)
treecc85fb480afcbe74184a56162d3d06af67cc4eb5 /extras/libmemif/docs
parent7d6f7d0d67face9889e43bdb5f71f352294b918a (diff)
libmemif: refactor examples
- icmp_responder: responds to ICMPv4 and ARP requests - loopback: connects two interfaces and sends a verification packet from master memif to slave memif where it is looped back - loopback (reverse path): reverses direction of packet in loopback application (slave memif to master memif) Type: refactor Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ie90aaa3367269408efb6c5d538ad5aa827432238 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'extras/libmemif/docs')
-rw-r--r--extras/libmemif/docs/buildinstructions_doc.rst74
1 files changed, 35 insertions, 39 deletions
diff --git a/extras/libmemif/docs/buildinstructions_doc.rst b/extras/libmemif/docs/buildinstructions_doc.rst
index 090b9d6ff75..f7770fc7fa4 100644
--- a/extras/libmemif/docs/buildinstructions_doc.rst
+++ b/extras/libmemif/docs/buildinstructions_doc.rst
@@ -8,54 +8,50 @@ Install dependencies
::
- # sudo apt-get install -y git cmake autoconf pkg_config libtool
+ sudo apt-get install -y git cmake autoconf pkg_config libtool
Libmemif is now part of VPP repository. Follow fd.io wiki to pull source
code from VPP repository.
https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Pushing_Patches
-Libmemif is located under extras/libmemif. From extras/libmemif:
+Libmemif is located under extras/libmemif. From the vpp workspace root directory::
-::
-
- # mkdir build
- # cd build
- # cmake ..
- # make install
+ mkdir -p extras/libmemif/build
+ cd extras/libmemif/build
+ cmake ..
+ make install
Verify installation:
--------------------
::
- build# ./examples/icmp_responder -?
-
-Use ``-?`` flag to display help:
-
-::
-
- LIBMEMIF EXAMPLE APP: icmp_responder_example
- ==============================
- libmemif version: 4.0, memif version: 2.0
- ==============================
- In this example, memif endpoint connects to an external application.
- The example application can resolve ARP and reply to ICMPv4 packets.
- The program will exit once the interface is disconnected.
- ==============================
- Usage: icmp_responder [OPTIONS]
-
- Options:
- -r Interface role <slave|master>. Default: slave
- -s Socket path. Supports abstract socket using @ before the path. Default: /run/vpp/memif.sock
- -i Interface id. Default: 0
- -a IPv4 address. Default: 192.168.1.1
- -h Mac address. Default: aa:aa:aa:aa:aa:aa
- -? Show help and exit.
- -v Show libmemif and memif version information and exit.
-
-Examples
---------
-
-Once the library is built/installed, refer to :ref:`libmemif_examples_doc`
-and :ref:`libmemif_gettingstarted_doc` for additional information on basic
-use cases and API usage.
+ ./examples/icmp_responder -?
+
+Use ``-?`` flag to display help::
+
+ LIBMEMIF EXAMPLE APP: icmp_responder_example
+ ==============================
+ libmemif version: 4.0, memif version: 2.0
+ ==============================
+ In this example, memif endpoint connects to an external application.
+ The example application can resolve ARP and reply to ICMPv4 packets.
+ The program will exit once the interface is disconnected.
+ ==============================
+ Usage: icmp_responder [OPTIONS]
+
+ Options:
+ -r Interface role <slave|master>. Default: slave
+ -s Socket path. Supports abstract socket using @ before the path. Default: /run/vpp/memif.sock
+ -i Interface id. Default: 0
+ -a IPv4 address. Default: 192.168.1.1
+ -h Mac address. Default: aa:aa:aa:aa:aa:aa
+ -? Show help and exit.
+ -v Show libmemif and memif version information and exit.
+
+Use Cases
+---------
+
+Once the library is built/installed, refer to :ref:`libmemif_gettingstarted_doc`
+and :ref:`libmemif_examples_doc` for additional information on basic use cases
+and API usage.