libmemif: docs md->rst
[vpp.git] / extras / libmemif / docs / buildinstructions_doc.rst
1 .. _libmemif_build_doc:
2
3 Build Instructions
4 ==================
5
6 Install dependencies
7 --------------------
8
9 ::
10
11    # sudo apt-get install -y git cmake autoconf pkg_config libtool
12
13 Libmemif is now part of VPP repository. Follow fd.io wiki to pull source
14 code from VPP repository.
15 https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Pushing_Patches
16
17 Libmemif is located under extras/libmemif. From extras/libmemif:
18
19 ::
20
21    # mkdir build
22    # cd build
23    # cmake ..
24    # make install
25
26 Verify installation:
27 --------------------
28
29 ::
30
31    build# ./examples/icmp_responder -?
32
33 Use ``-?`` flag to display help:
34
35 ::
36
37    LIBMEMIF EXAMPLE APP: icmp_responder_example
38    ==============================
39    libmemif version: 4.0, memif version: 2.0
40    ==============================
41    In this example, memif endpoint connects to an external application.
42    The example application can resolve ARP and reply to ICMPv4 packets.
43    The program will exit once the interface is disconnected.
44    ==============================
45    Usage: icmp_responder [OPTIONS]
46
47    Options:
48            -r      Interface role <slave|master>. Default: slave
49            -s      Socket path. Supports abstract socket using @ before the path. Default: /run/vpp/memif.sock
50            -i      Interface id. Default: 0
51            -a      IPv4 address. Default: 192.168.1.1
52            -h      Mac address. Default: aa:aa:aa:aa:aa:aa
53            -?      Show help and exit.
54            -v      Show libmemif and memif version information and exit.
55
56 Examples
57 --------
58
59 Once the library is built/installed, refer to :ref:`libmemif_examples_doc`
60 and :ref:`libmemif_gettingstarted_doc` for additional information on basic
61 use cases and API usage.