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