a226856b2b6eb8559b090b8a6f2da6e7dc103224
[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 autoconf pkg_config libtool check
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.
12 For debug build:
13 ```
14 # ./bootstrap
15 # ./configure
16 # make
17 # make install
18 ```
19
20 For release build:
21 ```
22 # ./bootstrap
23 # ./configure
24 # make release
25 # make install
26 ```
27 Verify installation:
28 ```
29 # ./.libs/icmpr-epoll
30 ```
31 > Make sure to run the binary file from ./.libs. File ./icmp\_responder in libmemif root directory is script that links the library, so it only verifies successful build. Default install path is /usr/lib.
32 Use _help_ command to display build information and commands:
33 ```
34 ICMP_Responder:add_epoll_fd:233: fd 0 added to epoll
35 ICMP_Responder:add_epoll_fd:233: fd 5 added to epoll
36 LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
37 ==============================
38 libmemif version: 2.0 (debug)
39 memif version: 512
40 commands:
41         help - prints this help
42         exit - exit app
43         conn <index> <mode> [<interrupt-desc>] - create memif. index is also used as interface id, mode 0 = slave 1 = master, interrupt-desc none = default 0 = if ring is full wait 1 = handle only ARP requests
44         del  <index> - delete memif
45         show - show connection details
46         ip-set <index> <ip-addr> - set interface ip address
47         rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
48         sh-count - print counters
49         cl-count - clear counters
50         send <index> <tx> <ip> <mac> - send icmp
51 ```
52
53 #### Examples
54
55 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.