diff --git a/extras/libmemif/Makefile.am b/extras/libmemif/Makefile.am
new file mode 100644
index 0000000..48e4bb8
--- /dev/null
+++ b/extras/libmemif/Makefile.am
@@ -0,0 +1,80 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+AUTOMAKE_OPTIONS = foreign subdir-objects
+
+ACLOCAL_AMFLAGS = -I m4
+
+AM_CPPFLAGS = -g -DMEMIF_DBG -DICMP_DBG
+
+.PHONY: release
+release:
+	$(MAKE) AM_CPPFLAGS="-O3"
+
+.PHONY: doc
+doc:
+	@echo Building doxygen documentation...
+	doxygen doxygen.conf
+	@echo Doxygen documentation built in docs directory.
+
+#
+# unit_test
+#
+unit_test_SOURCES = test/unit_test.c \
+                    test/main_test.c \
+                    test/socket_test.c \
+                    src/main.c \
+                    src/socket.c
+# macro MEMIF_UNIT_TEST -> compile functions without static keyword
+# and declare them in header files, so they can be called from unit tests
+unit_test_CPPFLAGS = $(AM_CPPFLAGS) -Itest -Isrc -DMEMIF_UNIT_TEST -g $(CHECK_CFLAGS)
+unit_test_LDADD = $(CHECK_LIBS)
+
+#
+# main lib
+#
+libmemif_la_SOURCES = src/main.c src/socket.c
+libmemif_la_CPPFLAGS = $(AM_CPPFLAGS) -Isrc
+
+#
+# ICMP responder example
+#
+icmpr_SOURCES = examples/icmp_responder/main.c examples/icmp_responder/icmp_proto.c
+icmpr_LDADD = libmemif.la
+icmpr_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -Iexamples/icmp_responder
+
+#
+# ICMP responder libmemif event polling example
+#
+icmpr_epoll_SOURCES = examples/icmp_responder-epoll/main.c \
+                    examples/icmp_responder/icmp_proto.c
+icmpr_epoll_LDADD = libmemif.la
+icmpr_epoll_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -Iexamples/icmp_responder
+
+#
+# ICMP responder multi-thread example
+#
+icmpr_mt_SOURCES = examples/icmp_responder-mt/main.c \
+                      examples/icmp_responder/icmp_proto.c
+icmpr_mt_LDADD = libmemif.la -lpthread
+icmpr_mt_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -Iexamples/icmp_responder
+
+noinst_PROGRAMS = icmpr icmpr-epoll icmpr-mt
+
+check_PROGRAMS = unit_test
+
+include_HEADERS = src/libmemif.h
+
+lib_LTLIBRARIES = libmemif.la
+
+TESTS = $(check_PROGRAMS)
diff --git a/extras/libmemif/README.md b/extras/libmemif/README.md
new file mode 100644
index 0000000..0cccfb3
--- /dev/null
+++ b/extras/libmemif/README.md
@@ -0,0 +1,72 @@
+Shared Memory Packet Interface (memif) Library
+==============================================
+## Introduction
+
+Shared memory packet interface (memif) provides high performance packet transmit and receive between user application and Vector Packet Processing (VPP) or multiple user applications. Using libmemif, user application can create shared memory interface in master or slave mode and connect to VPP or another application using libmemif. Once the connection is established, user application can receive or transmit packets using libmemif API.
+
+![Architecture](docs/architecture.png)
+
+## Features
+
+- [x] Slave mode
+  - [x] Connect to VPP over memif
+  - [x] ICMP responder example app
+- [x] Transmit/receive packets
+- [x] Interrupt mode support
+- [x] File descriptor event polling in libmemif (optional)
+  - [x] Simplify file descriptor event polling (one handler for control and interrupt channel)
+- [x] Multiple connections
+- [x] Multiple queues
+  - [x] Multi-thread support
+- [x] Master mode
+	- [ ] Multiple regions (TODO)
+- [ ] Performance testing (TODO)
+
+## Quickstart
+
+This setup will run libmemif ICMP responder example app in container. Install [docker](https://docs.docker.com/engine/installation) engine.
+Useful link: [Docker documentation](https://docs.docker.com/get-started).
+
+Pull image:
+```
+# docker pull ligato/libmemif-sample-service
+```
+
+Now you should be able to see ligato/libmemif-sample-service image on your local machine (IMAGE ID in this README may be outdated):
+```
+# docker images
+REPOSITORY                       TAG                 IMAGE ID            CREATED              SIZE
+ligato/libmemif-sample-service   latest              32ecc2f9d013        About a minute ago   468MB
+...
+```
+
+Run container:
+```
+# docker run -it --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
+```
+Example application will start in debug mode. Output should look like this:
+```
+ICMP_Responder:add_epoll_fd:204: fd 0 added to epoll
+MEMIF_DEBUG:src/main.c:memif_init:383: app name: ICMP_Responder
+ICMP_Responder:add_epoll_fd:204: fd 4 added to epoll
+LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
+==============================
+libmemif version: 1.0 (debug)
+memif version: 256
+commands:
+	help - prints this help
+	exit - exit app
+	conn <index> - create memif (slave-mode)
+	del  <index> - delete memif
+	show - show connection details
+	ip-set <index> <ip-addr> - set interface ip address
+	rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
+```
+
+Continue with [Example setup](examples/ExampleSetup.md) which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
+
+#### Next steps
+
+- [Build instructions](docs/BuildInstructions.md) Instructions on how to build/install libmemif.
+- [Examples](examples/README.md) More example apps presenting different features.
+- [Getting started](docs/GettingStarted.md) Introduction to libmemif API. Explaining library usage in custom app.
diff --git a/extras/libmemif/bootstrap b/extras/libmemif/bootstrap
new file mode 100755
index 0000000..5613c2b
--- /dev/null
+++ b/extras/libmemif/bootstrap
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+autoreconf -fis
diff --git a/extras/libmemif/configure.ac b/extras/libmemif/configure.ac
new file mode 100644
index 0000000..30fd3dd
--- /dev/null
+++ b/extras/libmemif/configure.ac
@@ -0,0 +1,13 @@
+AC_INIT(libmemif, 1.0)
+LT_INIT
+AM_INIT_AUTOMAKE
+AM_SILENT_RULES([yes])
+AC_PREFIX_DEFAULT([/usr])
+
+PKG_CHECK_MODULES([CHECK], [check])
+
+AC_PROG_CC
+
+AC_OUTPUT([Makefile])
+
+AC_CONFIG_MACRO_DIR([m4])
diff --git a/extras/libmemif/dockerfile b/extras/libmemif/dockerfile
new file mode 100644
index 0000000..92b2d2a
--- /dev/null
+++ b/extras/libmemif/dockerfile
@@ -0,0 +1,19 @@
+FROM ubuntu:xenial
+
+RUN apt-get update && \
+	apt-get install -y git build-essential autoconf pkg-config libtool sudo check
+RUN rm -rf /var/lib/apt/lists/*
+
+RUN git clone https://github.com/JakubGrajciar/libmemif.git /libmemif
+WORKDIR /libmemif
+RUN git checkout dev
+RUN ./bootstrap
+RUN ./configure
+RUN make
+RUN make install
+
+RUN mkdir /var/vpp
+
+RUN ulimit -c unlimited
+
+CMD ./.libs/icmpr-epoll
diff --git a/extras/libmemif/docs/BuildInstructions.md b/extras/libmemif/docs/BuildInstructions.md
new file mode 100644
index 0000000..9bb59b9
--- /dev/null
+++ b/extras/libmemif/docs/BuildInstructions.md
@@ -0,0 +1,54 @@
+## Build Instructions
+
+Install dependencies
+```
+# sudo apt-get install -y git autoconf pkg_config libtool check
+```
+
+Clone repository to your local machine. 
+```
+# git clone https://github.com/JakubGrajciar/libmemif.git
+```
+
+From root directory execute:
+For debug build:
+```
+# ./bootstrap
+# ./configure
+# make
+# make install
+```
+
+For release build:
+```
+# ./bootstrap
+# ./configure
+# make release
+# make install
+```
+Verify installation:
+```
+# ./.libs/icmpr-epoll
+```
+> 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.
+Use _help_ command to display build information and commands:
+```
+ICMP_Responder:add_epoll_fd:204: fd 0 added to epoll
+MEMIF_DEBUG:src/main.c:memif_init:383: app name: ICMP_Responder
+ICMP_Responder:add_epoll_fd:204: fd 4 added to epoll
+LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
+==============================
+libmemif version: 1.0 (debug)
+memif version: 256
+commands:
+	help - prints this help
+	exit - exit app
+	conn <index> - create memif (slave-mode)
+	del  <index> - delete memif
+	show - show connection details
+	ip-set <index> <ip-addr> - set interface ip address
+	rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
+```
+#### Examples
+
+Once the library is build/installed, refer to [Examples](../examples/README.md) and [Getting started](GettingStarted.md) for additional information on basic use cases and API usage.
diff --git a/extras/libmemif/docs/GettingStarted.md b/extras/libmemif/docs/GettingStarted.md
new file mode 100644
index 0000000..3cc0ceb
--- /dev/null
+++ b/extras/libmemif/docs/GettingStarted.md
@@ -0,0 +1,215 @@
+## Getting started
+
+#### Concept (Connecting to VPP)
+
+For detailed information on api calls and structures please refer to [libmemif.h](../src/libmemif.h)
+
+1. Initialize memif
+   - Declare callback function handling file descriptor event polling.
+```C
+int
+control_fd_update (int fd, uint8_t events)
+{
+...
+}
+```
+   - Call memif initialization function. memif\_init
+```C
+err = memif_init (control_fd_update, APP_NAME);
+```
+   
+> If event occurres on any file descriptor returned by this callback, call memif\_control\_fd\_handler function.
+```C
+memif_err = memif_control_fd_handler (evt.data.fd, events);
+``` 
+> If callback function parameter for memif\_init function is set to NULL, libmemif will handle file descriptor event polling.
+  Api call memif\_poll\_event will call epoll\_pwait with user defined timeout to poll event on file descriptors opened by libmemif.
+```C
+/* main loop */
+    while (1)
+    {
+        if (memif_poll_event (-1) < 0)
+        {
+            DBG ("poll_event error!");
+        }
+    }
+```
+    
+> Memif initialization function will initialize internal structures and create timer file descriptor, which will be used for sending periodic connection requests. Timer is disarmed if no memif interface is created.
+ 
+2. Creating interface
+   - Declare memif connction handle.
+```C
+memif_conn_handle_t c;
+```
+> example app uses struct that contains connection handle, rx/tx buffers and other connection specific information.
+
+   - Specify connection arguments.
+```C
+memif_conn_args_t args;
+memset (&args, 0, sizeof (args));
+args.is_master = is_master;
+args.log2_ring_size = 10;
+args.buffer_size = 2048;
+args.num_s2m_rings = 2;
+args.num_m2s_rings = 2;
+strncpy ((char *) args.interface_name, IF_NAME, strlen (IF_NAME));
+strncpy ((char *) args.instance_name, APP_NAME, strlen (APP_NAME));
+args.mode = 0;
+args.interface_id = 0;
+```
+   - Declare callback functions called on connected/disconnected/interrupted status changed.
+```C
+int
+on_connect (memif_conn_handle_t conn, void *private_ctx)
+{
+...
+}
+
+int
+on_disconnect (memif_conn_handle_t conn, void *private_ctx)
+{
+    INFO ("memif connected!");
+    return 0;
+}
+```
+   - Call memif interface create function. memif\_create
+```C
+err = memif_create (&c->conn,
+        &args, on_connect, on_disconnect, on_interrupt, &ctx[index]);
+```
+> If connection is in slave mode, arms timer file descriptor.
+> If on interrupt callback is set to NULL, user will not be notified about interrupt. Use memif\_get\_queue\_efd call to get interrupt file descriptor for specific queue.
+```C
+int fd = -1;
+err = memif_get_queue_efd (c->conn, data->qid, &fd);
+```
+
+3. Connection establishment
+    - User application will poll events on all file descriptors returned in memif\_control\_fd\_update\_t callback.
+    - On event call memif\_control\_fd\_handler.
+    - Everything else regarding connection establishment will be done internally.
+    - Once connection has been established, a callback will inform the user about connection status change.
+
+4. Interrupt packet receive
+    - If event is polled on interrupt file descriptor, libmemif will call memif\_interrupt\_t callback specified for every connection instance.
+```C
+int
+on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
+{
+...
+}
+```
+
+6. Memif buffers
+    - Packet data are stored in memif\_buffer\_t. Pointer _data_ points to shared memory buffer, and unsigned integer *data\_len* contains packet data length.
+```C
+typedef struct
+{
+    uint16_t desc_index;
+    uint32_t buffer_len;
+    uint32_t data_len;
+    void *data;
+} memif_buffer_t;
+```
+
+5. Packet receive
+    - Api call memif\_rx\_burst will set all required fields in memif buffers provided by user application.
+```C
+err = memif_rx_burst (c->conn, qid, c->rx_bufs, MAX_MEMIF_BUFS, &rx);
+```
+    - User application can then process packets.
+    - Api call memif\_buffer\_free will make supplied memif buffers ready for next receive and mark shared memory buffers as free.
+```C
+err = memif_buffer_free (c->conn, qid, c->rx_bufs, rx, &fb);
+```
+
+6. Packet transmit
+    - Api call memif\_buffer\_alloc will set all required fields in memif buffers provided by user application.
+```C
+err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r);
+```
+    - User application can populate shared memory buffers with packets.
+    - Api call memif\_tx\_burst will inform peer interface (master memif on VPP) that there are packets ready to receive and mark memif buffers as free.
+```C
+err = memif_tx_burst (c->conn, qid, c->tx_bufs, c->tx_buf_num, &r);
+```
+
+7. Helper functions
+    - Memif details
+      - Api call memif\_get\_details will return details about connection.
+```C
+err = memif_get_details (c->conn, &md, buf, buflen);
+```
+    - Memif error messages
+      - Every api call returns error code (integer value) mapped to error string.
+      - Call memif\_strerror will return error message assigned to specific error code.
+```C
+if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_get_details: %s", memif_strerror (err));
+```
+        - Not all syscall errors are translated to memif error codes. If error code 1 (MEMIF\_ERR\_SYSCALL) is returned then libmemif needs to be compiled with -DMEMIF_DBG flag to print error message. Use _make -B_ to rebuild libmemif in debug mode.
+
+#### Example app (libmemif fd event polling):
+
+- [ICMP Responder](../examples/icmp_responder/main.c)
+> Optional argument: transmit queue id.
+```
+icmpr 1
+```
+> Set transmit queue id to 1. Default is 0.
+> Application will create memif interface in slave mode and try to connect to VPP. Exit using Ctrl+C. Application will handle SIGINT signal, free allocated memory and exit with EXIT_SUCCESS.
+
+#### Example app:
+
+- [ICMP Responder custom fd event polling](../examples/icmp_responder-epoll/main.c)
+
+#### Example app (multi-thread queue polling)
+
+- [ICMP Responder multi-thread](../examples/icmp_responder-mt/main.c)
+
+> Simple example of libmemif multi-thread usage. Connection establishment is handled by main thread. There are two rx queues in this example. One in polling mode and second in interrupt mode.
+
+VPP config:
+```
+# create memif id 0 master
+# set int state memif0 up
+# set int ip address memif0 192.168.1.1/24
+# ping 192.168.1.2
+```
+For multiple rings (queues) support run VPP with worker threads:
+example startup.conf:
+```
+unix {
+  interactive
+  nodaemon 
+  full-coredump
+}
+
+cpu {
+  workers 2
+}
+```
+VPP config:
+```
+# create memif id 0 master
+# set int state memif0 up
+# set int ip address memif0 192.168.1.1/24
+# ping 192.168.1.2
+```
+> Master mode queue number is limited by worker threads. Slave mode interface needs to specify number of queues.
+```
+# create memif id 0 slave rx-queues 2 tx-queues 2
+```
+> Example applications use VPP default socket file for memif: /run/vpp/memif.sock
+> For master mode, socket directory must exist prior to memif\_create call.
+
+#### Unit tests
+
+Unit tests use [Check](https://libcheck.github.io/check/index.html) framework. This framework must be installed in order to build *unit\_test* binary.
+Ubuntu/Debian:
+```
+sudo apt-get install check
+```
+[More platforms](https://libcheck.github.io/check/web/install.html)
+
diff --git a/extras/libmemif/docs/architecture.png b/extras/libmemif/docs/architecture.png
new file mode 100644
index 0000000..b196c25
--- /dev/null
+++ b/extras/libmemif/docs/architecture.png
Binary files differ
diff --git a/extras/libmemif/doxygen.conf b/extras/libmemif/doxygen.conf
new file mode 100644
index 0000000..503eef5
--- /dev/null
+++ b/extras/libmemif/doxygen.conf
@@ -0,0 +1,2427 @@
+# Doxyfile 1.8.11
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "Libmemif"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         = 1.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = Shared memory packet interface library
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ./docs
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR          = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = ./src/libmemif.h
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
+# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
+
+FILE_PATTERNS          =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse-libclang=ON option for CMake.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = YES
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: YES.
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
+# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
+# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH      =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/extras/libmemif/examples/ExampleSetup.md b/extras/libmemif/examples/ExampleSetup.md
new file mode 100644
index 0000000..a02506d
--- /dev/null
+++ b/extras/libmemif/examples/ExampleSetup.md
@@ -0,0 +1,206 @@
+## Example setup
+
+#### VPP-memif master icmp_responder slave
+
+> Libmemif example app(s) use memif default socket file: /run/vpp/memif.sock.
+
+Run VPP and icmpr-epoll example (default example when running in container).
+> Other examples work similar to icmpr-epoll. Brief explanation can be found in [Examples readme](README.md) file.
+
+VPP-side config:
+```
+DBGvpp# create memif id 0 master
+DBGvpp# set int state memif0/0 up
+DBGvpp# set int ip address memif0/0 192.168.1.1/24
+```
+icmpr-epoll:
+```
+conn 0 0
+```
+Memif in slave mode will try to connect every 2 seconds. If connection establishment is successfull, a message will show.
+```
+INFO: memif connected!
+```
+> Error messages like "unmatched interface id" are printed only in debug mode.
+
+Check connected status.
+Use show command in icmpr-epoll:
+```
+show
+MEMIF DETAILS
+==============================
+interface index: 0
+	interface ip: 192.168.1.2
+	interface name: memif_connection
+	app name: ICMP_Responder
+	remote interface name: memif0/0
+	remote app name: VPP 17.10-rc0~132-g62f9cdd
+	id: 0
+	secret: 
+	role: slave
+	mode: ethernet
+	socket filename: /run/vpp/memif.sock
+	rx queues:
+		queue id: 0
+		ring size: 1024
+		buffer size: 2048
+	tx queues:
+		queue id: 0
+		ring size: 1024
+		buffer size: 2048
+	link: up
+interface index: 1
+	no connection
+
+```
+Use sh memif command in VPP:
+```
+DBGvpp# sh memif
+interface memif0/0
+  remote-name "ICMP_Responder"
+  remote-interface "memif_connection"
+  id 0 mode ethernet file /run/vpp/memif.sock
+  flags admin-up connected
+  listener-fd 12 conn-fd 13
+  num-s2m-rings 1 num-m2s-rings 1 buffer-size 0
+    master-to-slave ring 0:
+      region 0 offset 32896 ring-size 1024 int-fd 16
+      head 0 tail 0 flags 0x0000 interrupts 0
+    master-to-slave ring 0:
+      region 0 offset 0 ring-size 1024 int-fd 15
+      head 0 tail 0 flags 0x0001 interrupts 0
+```
+
+Send ping from VPP to icmpr-epoll:
+```
+DBGvpp# ping 192.168.1.2
+64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=.1888 ms
+64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=.1985 ms
+64 bytes from 192.168.1.2: icmp_seq=4 ttl=64 time=.1813 ms
+64 bytes from 192.168.1.2: icmp_seq=5 ttl=64 time=.1929 ms
+
+Statistics: 5 sent, 4 received, 20% packet loss
+```
+#### multiple queues VPP-memif slave icmp_responder master
+
+Run icmpr-epoll as in previous example setup.
+Run VPP with startup conf, enabling 2 worker threads.
+Example startup.conf:
+```
+unix {
+  interactive
+  nodaemon
+  full-coredump
+}
+
+cpu {
+  workers 2
+}
+```
+VPP-side config:
+```
+DBGvpp# create memif id 0 slave rx-queues 2 tx-queues 2
+DBGvpp# set int state memif0/0 up
+DBGvpp# set int ip address memif0/0 192.168.1.1/24
+```
+icmpr-epoll:
+```
+conn 0 1
+```
+When connection is established a message will print:
+```
+INFO: memif connected!
+```
+> Error messages like "unmatched interface id" are printed only in debug mode.
+
+Check connected status.
+Use show command in icmpr-epoll:
+```
+show
+MEMIF DETAILS
+==============================
+interface index: 0
+	interface ip: 192.168.1.2
+	interface name: memif_connection
+	app name: ICMP_Responder
+	remote interface name: memif0/0
+	remote app name: VPP 17.10-rc0~132-g62f9cdd
+	id: 0
+	secret: 
+	role: master
+	mode: ethernet
+	socket filename: /run/vpp/memif.sock
+	rx queues:
+		queue id: 0
+		ring size: 1024
+		buffer size: 2048
+		queue id: 1
+		ring size: 1024
+		buffer size: 2048
+	tx queues:
+		queue id: 0
+		ring size: 1024
+		buffer size: 2048
+		queue id: 1
+		ring size: 1024
+		buffer size: 2048
+	link: up
+interface index: 1
+	no connection
+
+```
+Use sh memif command in VPP:
+```
+DBGvpp# sh memif
+interface memif0/0
+  remote-name "ICMP_Responder"
+  remote-interface "memif_connection"
+  id 0 mode ethernet file /run/vpp/memif.sock
+  flags admin-up slave connected
+  listener-fd -1 conn-fd 12
+  num-s2m-rings 2 num-m2s-rings 2 buffer-size 2048
+    slave-to-master ring 0:
+      region 0 offset 0 ring-size 1024 int-fd 14
+      head 0 tail 0 flags 0x0000 interrupts 0
+    slave-to-master ring 1:
+      region 0 offset 32896 ring-size 1024 int-fd 15
+      head 0 tail 0 flags 0x0000 interrupts 0
+    slave-to-master ring 0:
+      region 0 offset 65792 ring-size 1024 int-fd 16
+      head 0 tail 0 flags 0x0001 interrupts 0
+    slave-to-master ring 1:
+      region 0 offset 98688 ring-size 1024 int-fd 17
+      head 0 tail 0 flags 0x0001 interrupts 0
+
+```
+Send ping from VPP to icmpr-epoll:
+```
+DBGvpp# ping 192.168.1.2
+64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=.1439 ms
+64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=.2184 ms
+64 bytes from 192.168.1.2: icmp_seq=4 ttl=64 time=.1458 ms
+64 bytes from 192.168.1.2: icmp_seq=5 ttl=64 time=.1687 ms
+
+Statistics: 5 sent, 4 received, 20% packet loss
+```
+
+#### icmp_responder master icmp_responder slave
+
+> Example apps can only repond to ping. This setup creates connection between two applications using libmemif. Traffic functionality is the same as when connection to VPP. App can receive ARP/ICMP request and transmit response, but can not send ARP/ICMP request.
+
+Run two instances of icmpr-epoll example.
+> If not running in container, make sure folder /run/vpp/ exists before creating memif master.
+Instance 1 will be in master mode, instance 2 in slave mode.
+instance 1:
+```
+conn 0 1
+```
+instance 2:
+```
+conn 0 0
+```
+In 2 seconds, both instances should print connected! message:
+```
+INFO: memif connected!
+```
+Check peer interface names using show command.
diff --git a/extras/libmemif/examples/README.md b/extras/libmemif/examples/README.md
new file mode 100644
index 0000000..bbd663b
--- /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.
diff --git a/extras/libmemif/examples/icmp_responder-epoll/main.c b/extras/libmemif/examples/icmp_responder-epoll/main.c
new file mode 100644
index 0000000..4172785
--- /dev/null
+++ b/extras/libmemif/examples/icmp_responder-epoll/main.c
@@ -0,0 +1,791 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <linux/ip.h>
+#include <linux/icmp.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <netinet/if_ether.h>
+#include <net/if_arp.h>
+#include <asm/byteorder.h>
+#include <byteswap.h>
+#include <string.h>
+#include <sys/epoll.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include <libmemif.h>
+#include <icmp_proto.h>
+
+#define APP_NAME "ICMP_Responder"
+#define IF_NAME  "memif_connection"
+
+
+#ifdef ICMP_DBG
+#define DBG(...) do {                                               \
+                    printf (APP_NAME":%s:%d: ", __func__, __LINE__);         \
+                    printf (__VA_ARGS__);                           \
+                    printf ("\n");                                  \
+                } while (0)
+#else
+#define DBG(...)
+#endif
+
+#define INFO(...) do {                                              \
+                    printf ("INFO: "__VA_ARGS__);                   \
+                    printf ("\n");                                  \
+                } while (0)
+
+/* maximum tx/rx memif buffers */
+#define MAX_MEMIF_BUFS  256
+#define MAX_CONNS       50
+
+int epfd;
+
+typedef struct
+{
+  uint16_t index;
+  /* memif conenction handle */
+  memif_conn_handle_t conn;
+  /* tx buffers */
+  memif_buffer_t *tx_bufs;
+  /* allocated tx buffers counter */
+  /* number of tx buffers pointing to shared memory */
+  uint16_t tx_buf_num;
+  /* rx buffers */
+  memif_buffer_t *rx_bufs;
+  /* allcoated rx buffers counter */
+  /* number of rx buffers pointing to shared memory */
+  uint16_t rx_buf_num;
+  /* interface ip address */
+  uint8_t ip_addr[4];
+} memif_connection_t;
+
+memif_connection_t memif_connection[MAX_CONNS];
+long ctx[MAX_CONNS];
+
+/* print details for all memif connections */
+static void
+print_memif_details ()
+{
+  memif_details_t md;
+  ssize_t buflen;
+  char *buf;
+  int err, i, e;
+  buflen = 2048;
+  buf = malloc (buflen);
+  printf ("MEMIF DETAILS\n");
+  printf ("==============================\n");
+  for (i = 0; i < MAX_CONNS; i++)
+    {
+      memif_connection_t *c = &memif_connection[i];
+
+      memset (&md, 0, sizeof (md));
+      memset (buf, 0, buflen);
+
+      err = memif_get_details (c->conn, &md, buf, buflen);
+      if (err != MEMIF_ERR_SUCCESS)
+	{
+	  if (err != MEMIF_ERR_NOCONN)
+	    INFO ("%s", memif_strerror (err));
+	  continue;
+	}
+
+      printf ("interface index: %d\n", i);
+
+      printf ("\tinterface ip: %u.%u.%u.%u\n",
+	      c->ip_addr[0], c->ip_addr[1], c->ip_addr[2], c->ip_addr[3]);
+      printf ("\tinterface name: %s\n", (char *) md.if_name);
+      printf ("\tapp name: %s\n", (char *) md.inst_name);
+      printf ("\tremote interface name: %s\n", (char *) md.remote_if_name);
+      printf ("\tremote app name: %s\n", (char *) md.remote_inst_name);
+      printf ("\tid: %u\n", md.id);
+      printf ("\tsecret: %s\n", (char *) md.secret);
+      printf ("\trole: ");
+      if (md.role)
+	printf ("slave\n");
+      else
+	printf ("master\n");
+      printf ("\tmode: ");
+      switch (md.mode)
+	{
+	case 0:
+	  printf ("ethernet\n");
+	  break;
+	case 1:
+	  printf ("ip\n");
+	  break;
+	case 2:
+	  printf ("punt/inject\n");
+	  break;
+	default:
+	  printf ("unknown\n");
+	  break;
+	}
+      printf ("\tsocket filename: %s\n", (char *) md.socket_filename);
+      printf ("\trx queues:\n");
+      for (e = 0; e < md.rx_queues_num; e++)
+	{
+	  printf ("\t\tqueue id: %u\n", md.rx_queues[e].qid);
+	  printf ("\t\tring size: %u\n", md.rx_queues[e].ring_size);
+	  printf ("\t\tbuffer size: %u\n", md.rx_queues[e].buffer_size);
+	}
+      printf ("\ttx queues:\n");
+      for (e = 0; e < md.tx_queues_num; e++)
+	{
+	  printf ("\t\tqueue id: %u\n", md.tx_queues[e].qid);
+	  printf ("\t\tring size: %u\n", md.tx_queues[e].ring_size);
+	  printf ("\t\tbuffer size: %u\n", md.tx_queues[e].buffer_size);
+	}
+      printf ("\tlink: ");
+      if (md.link_up_down)
+	printf ("up\n");
+      else
+	printf ("down\n");
+    }
+  free (buf);
+}
+
+int
+add_epoll_fd (int fd, uint32_t events)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = events;
+  evt.data.fd = fd;
+  if (epoll_ctl (epfd, EPOLL_CTL_ADD, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d added to epoll", fd);
+  return 0;
+}
+
+int
+mod_epoll_fd (int fd, uint32_t events)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = events;
+  evt.data.fd = fd;
+  if (epoll_ctl (epfd, EPOLL_CTL_MOD, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d moddified on epoll", fd);
+  return 0;
+}
+
+int
+del_epoll_fd (int fd)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  if (epoll_ctl (epfd, EPOLL_CTL_DEL, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d removed from epoll", fd);
+  return 0;
+}
+
+/* informs user about connected status. private_ctx is used by user to identify connection
+    (multiple connections WIP) */
+int
+on_connect (memif_conn_handle_t conn, void *private_ctx)
+{
+  INFO ("memif connected!");
+  return 0;
+}
+
+/* informs user about disconnected status. private_ctx is used by user to identify connection
+    (multiple connections WIP) */
+int
+on_disconnect (memif_conn_handle_t conn, void *private_ctx)
+{
+  INFO ("memif disconnected!");
+  return 0;
+}
+
+/* user needs to watch new fd or stop watching fd that is about to be closed.
+    control fd will be modified during connection establishment to minimize CPU usage */
+int
+control_fd_update (int fd, uint8_t events)
+{
+  /* convert memif event definitions to epoll events */
+  if (events & MEMIF_FD_EVENT_DEL)
+    return del_epoll_fd (fd);
+
+  uint32_t evt = 0;
+  if (events & MEMIF_FD_EVENT_READ)
+    evt |= EPOLLIN;
+  if (events & MEMIF_FD_EVENT_WRITE)
+    evt |= EPOLLOUT;
+
+  if (events & MEMIF_FD_EVENT_MOD)
+    return mod_epoll_fd (fd, evt);
+
+  return add_epoll_fd (fd, evt);
+}
+
+int
+icmpr_buffer_alloc (long index, long n, uint16_t qid)
+{
+  memif_connection_t *c = &memif_connection[index];
+  int err;
+  uint16_t r;
+  /* set data pointer to shared memory and set buffer_len to shared mmeory buffer len */
+  err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("memif_buffer_alloc: %s", memif_strerror (err));
+      c->tx_buf_num += r;
+      return -1;
+    }
+  c->tx_buf_num += r;
+  DBG ("allocated %d/%ld buffers, %u free buffers", r, n,
+       MAX_MEMIF_BUFS - c->tx_buf_num);
+  return 0;
+}
+
+int
+icmpr_tx_burst (long index, uint16_t qid)
+{
+  memif_connection_t *c = &memif_connection[index];
+  int err;
+  uint16_t r;
+  /* inform peer memif interface about data in shared memory buffers */
+  /* mark memif buffers as free */
+  err = memif_tx_burst (c->conn, qid, c->tx_bufs, c->tx_buf_num, &r);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_tx_burst: %s", memif_strerror (err));
+  DBG ("tx: %d/%u", r, c->tx_buf_num);
+  c->tx_buf_num -= r;
+  return 0;
+}
+
+/* called when event is polled on interrupt file descriptor.
+    there are packets in shared memory ready to be received */
+int
+on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
+{
+  long index = *((long *) private_ctx);
+  memif_connection_t *c = &memif_connection[index];
+  if (c->index != index)
+    {
+      INFO ("invalid context: %ld/%u", index, c->index);
+      return 0;
+    }
+  int err;
+  uint16_t rx;
+  uint16_t fb;
+  /* receive data from shared memory buffers */
+  err = memif_rx_burst (c->conn, qid, c->rx_bufs, MAX_MEMIF_BUFS, &rx);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("memif_rx_burst: %s", memif_strerror (err));
+      c->rx_buf_num += rx;
+      goto error;
+    }
+  c->rx_buf_num += rx;
+
+  DBG ("received %d buffers. %u/%u alloc/free buffers",
+       rx, c->rx_buf_num, MAX_MEMIF_BUFS - c->rx_buf_num);
+
+  if (icmpr_buffer_alloc (index, rx, qid) < 0)
+    {
+      INFO ("buffer_alloc error");
+      goto error;
+    }
+  int i;
+  for (i = 0; i < rx; i++)
+    {
+      resolve_packet ((void *) (c->rx_bufs + i)->data,
+		      (c->rx_bufs + i)->data_len,
+		      (void *) (c->tx_bufs + i)->data,
+		      &(c->tx_bufs + i)->data_len, c->ip_addr);
+    }
+
+  /* mark memif buffers and shared memory buffers as free */
+  err = memif_buffer_free (c->conn, qid, c->rx_bufs, rx, &fb);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_buffer_free: %s", memif_strerror (err));
+  c->rx_buf_num -= fb;
+
+  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+       fb, c->rx_buf_num, MAX_MEMIF_BUFS - c->rx_buf_num);
+
+  icmpr_tx_burst (index, qid);
+
+  return 0;
+
+error:
+  err = memif_buffer_free (c->conn, qid, c->rx_bufs, rx, &fb);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_buffer_free: %s", memif_strerror (err));
+  c->rx_buf_num -= fb;
+  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+       fb, c->rx_buf_num, MAX_MEMIF_BUFS - c->rx_buf_num);
+  return 0;
+}
+
+int
+icmpr_memif_create (long index, long mode)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+
+  /* setting memif connection arguments */
+  memif_conn_args_t args;
+  int fd = -1;
+  memset (&args, 0, sizeof (args));
+  args.is_master = mode;
+  args.log2_ring_size = 10;
+  args.buffer_size = 2048;
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+  strncpy ((char *) args.interface_name, IF_NAME, strlen (IF_NAME));
+  strncpy ((char *) args.instance_name, APP_NAME, strlen (APP_NAME));
+  args.mode = 0;
+  /* socket filename is not specified, because this app is supposed to
+     connect to VPP over memif. so default socket filename will be used */
+  /* default socketfile = /run/vpp/memif.sock */
+
+  args.interface_id = index;
+  /* last argument for memif_create (void * private_ctx) is used by user
+     to identify connection. this context is returned with callbacks */
+  int err = memif_create (&c->conn,
+			  &args, on_connect, on_disconnect, on_interrupt,
+			  &ctx[index]);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("memif_create: %s", memif_strerror (err));
+      return 0;
+    }
+
+  c->index = index;
+  /* alloc memif buffers */
+  c->rx_buf_num = 0;
+  c->rx_bufs =
+    (memif_buffer_t *) malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  c->tx_buf_num = 0;
+  c->tx_bufs =
+    (memif_buffer_t *) malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+
+  c->ip_addr[0] = 192;
+  c->ip_addr[1] = 168;
+  c->ip_addr[2] = c->index + 1;
+  c->ip_addr[3] = 2;
+  return 0;
+}
+
+int
+icmpr_memif_delete (long index)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+
+  if (c->rx_bufs)
+    free (c->rx_bufs);
+  c->rx_bufs = NULL;
+  c->rx_buf_num = 0;
+  if (c->tx_bufs)
+    free (c->tx_bufs);
+  c->tx_bufs = NULL;
+  c->tx_buf_num = 0;
+
+  int err;
+  /* disconenct then delete memif connection */
+  err = memif_delete (&c->conn);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_delete: %s", memif_strerror (err));
+  if (c->conn != NULL)
+    INFO ("memif delete fail");
+  return 0;
+}
+
+void
+print_help ()
+{
+  printf ("LIBMEMIF EXAMPLE APP: %s", APP_NAME);
+#ifdef ICMP_DBG
+  printf (" (debug)");
+#endif
+  printf ("\n");
+  printf ("==============================\n");
+  printf ("libmemif version: %s", LIBMEMIF_VERSION);
+#ifdef MEMIF_DBG
+  printf (" (debug)");
+#endif
+  printf ("\n");
+  printf ("memif version: %d\n", MEMIF_VERSION);
+  printf ("commands:\n");
+  printf ("\thelp - prints this help\n");
+  printf ("\texit - exit app\n");
+  printf
+    ("\tconn <index> <mode> - create memif. index is also used as interface id, mode 0 = slave 1 = master\n");
+  printf ("\tdel  <index> - delete memif\n");
+  printf ("\tshow - show connection details\n");
+  printf ("\tip-set <index> <ip-addr> - set interface ip address\n");
+  printf
+    ("\trx-mode <index> <qid> <polling|interrupt> - set queue rx mode\n");
+}
+
+int
+icmpr_free ()
+{
+  /* application cleanup */
+  int err;
+  long i;
+  for (i = 0; i < MAX_CONNS; i++)
+    {
+      memif_connection_t *c = &memif_connection[i];
+      if (c->conn)
+	icmpr_memif_delete (i);
+    }
+
+  err = memif_cleanup ();
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_delete: %s", memif_strerror (err));
+
+  return 0;
+}
+
+int
+icmpr_set_ip (long index, char *ip)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+  if (c->conn == NULL)
+    {
+      INFO ("no connection at index %ld", index);
+      return 0;
+    }
+
+  char *end;
+  char *ui;
+  uint8_t tmp[4];
+  ui = strtok (ip, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[0] = strtol (ui, &end, 10);
+
+  ui = strtok (NULL, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[1] = strtol (ui, &end, 10);
+
+  ui = strtok (NULL, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[2] = strtol (ui, &end, 10);
+
+  ui = strtok (NULL, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[3] = strtol (ui, &end, 10);
+
+  c->ip_addr[0] = tmp[0];
+  c->ip_addr[1] = tmp[1];
+  c->ip_addr[2] = tmp[2];
+  c->ip_addr[3] = tmp[3];
+
+  INFO ("memif %ld ip address set to %u.%u.%u.%u",
+	index, c->ip_addr[0], c->ip_addr[1], c->ip_addr[2], c->ip_addr[3]);
+
+  return 0;
+
+error:
+  INFO ("invalid ip address");
+  return 0;
+}
+
+int
+icmpr_set_rx_mode (long index, long qid, char *mode)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+
+  if (c->conn == NULL)
+    {
+      INFO ("no connection at index %ld", index);
+      return 0;
+    }
+
+  if (strncmp (mode, "interrupt", 9) == 0)
+    {
+      memif_set_rx_mode (c->conn, MEMIF_RX_MODE_INTERRUPT, qid);
+    }
+
+  else if (strncmp (mode, "polling", 7) == 0)
+    {
+      memif_set_rx_mode (c->conn, MEMIF_RX_MODE_POLLING, qid);
+    }
+  else
+    INFO ("expected rx mode <interrupt|polling>");
+  return 0;
+}
+
+int
+user_input_handler ()
+{
+  int i;
+  char *in = (char *) malloc (256);
+  char *ui = fgets (in, 256, stdin);
+  char *end;
+  long a;
+  if (in[0] == '\n')
+    goto done;
+  ui = strtok (in, " ");
+  if (strncmp (ui, "exit", 4) == 0)
+    {
+      free (in);
+      icmpr_free ();
+      exit (EXIT_SUCCESS);
+    }
+  else if (strncmp (ui, "help", 4) == 0)
+    {
+      print_help ();
+      goto done;
+    }
+  else if (strncmp (ui, "conn", 4) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	a = strtol (ui, &end, 10);
+      else
+	{
+	  INFO ("expected id");
+	  goto done;
+	}
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_memif_create (a, strtol (ui, &end, 10));
+      else
+	INFO ("expected mode <0|1>");
+      goto done;
+    }
+  else if (strncmp (ui, "del", 3) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_memif_delete (strtol (ui, &end, 10));
+      else
+	INFO ("expected id");
+      goto done;
+    }
+  else if (strncmp (ui, "show", 4) == 0)
+    {
+      print_memif_details ();
+      goto done;
+    }
+  else if (strncmp (ui, "ip-set", 6) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_set_ip (strtol (ui, &end, 10), strtok (NULL, " "));
+      else
+	INFO ("expected id");
+      goto done;
+    }
+  else if (strncmp (ui, "rx-mode", 7) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	a = strtol (ui, &end, 10);
+      else
+	{
+	  INFO ("expected id");
+	  goto done;
+	}
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_set_rx_mode (a, strtol (ui, &end, 10), strtok (NULL, " "));
+      else
+	INFO ("expected qid");
+      goto done;
+    }
+  else
+    {
+      DBG ("unknown command: %s", ui);
+      goto done;
+    }
+
+  return 0;
+done:
+  free (in);
+  return 0;
+}
+
+int
+poll_event (int timeout)
+{
+  struct epoll_event evt, *e;
+  int app_err = 0, memif_err = 0, en = 0;
+  int tmp, nfd;
+  uint32_t events = 0;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = EPOLLIN | EPOLLOUT;
+  sigset_t sigset;
+  sigemptyset (&sigset);
+  en = epoll_pwait (epfd, &evt, 1, timeout, &sigset);
+  if (en < 0)
+    {
+      DBG ("epoll_pwait: %s", strerror (errno));
+      return -1;
+    }
+  if (en > 0)
+    {
+      /* this app does not use any other file descriptors than stds and memif control fds */
+      if (evt.data.fd > 2)
+	{
+	  /* event of memif control fd */
+	  /* convert epolle events to memif events */
+	  if (evt.events & EPOLLIN)
+	    events |= MEMIF_FD_EVENT_READ;
+	  if (evt.events & EPOLLOUT)
+	    events |= MEMIF_FD_EVENT_WRITE;
+	  if (evt.events & EPOLLERR)
+	    events |= MEMIF_FD_EVENT_ERROR;
+	  memif_err = memif_control_fd_handler (evt.data.fd, events);
+	  if (memif_err != MEMIF_ERR_SUCCESS)
+	    INFO ("memif_control_fd_handler: %s", memif_strerror (memif_err));
+	}
+      else if (evt.data.fd == 0)
+	{
+	  app_err = user_input_handler ();
+	}
+      else
+	{
+	  DBG ("unexpected event at memif_epfd. fd %d", evt.data.fd);
+	}
+    }
+
+  if ((app_err < 0) || (memif_err < 0))
+    {
+      if (app_err < 0)
+	DBG ("user input handler error");
+      if (memif_err < 0)
+	DBG ("memif control fd handler error");
+      return -1;
+    }
+
+  return 0;
+}
+
+int
+main ()
+{
+  epfd = epoll_create (1);
+  add_epoll_fd (0, EPOLLIN);
+
+  /* initialize memory interface */
+  int err, i;
+  /* if valid callback is passed as argument, fd event polling will be done by user
+     all file descriptors and events will be passed to user in this callback */
+  /* if callback is set to NULL libmemif will handle fd event polling */
+  err = memif_init (control_fd_update, APP_NAME);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_init: %s", memif_strerror (err));
+
+  for (i = 0; i < MAX_CONNS; i++)
+    {
+      memif_connection[i].conn = NULL;
+      ctx[i] = i;
+    }
+
+  print_help ();
+
+  /* main loop */
+  while (1)
+    {
+      if (poll_event (-1) < 0)
+	{
+	  DBG ("poll_event error!");
+	}
+    }
+}
diff --git a/extras/libmemif/examples/icmp_responder-mt/main.c b/extras/libmemif/examples/icmp_responder-mt/main.c
new file mode 100644
index 0000000..860569b
--- /dev/null
+++ b/extras/libmemif/examples/icmp_responder-mt/main.c
@@ -0,0 +1,921 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <linux/ip.h>
+#include <linux/icmp.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <netinet/if_ether.h>
+#include <net/if_arp.h>
+#include <asm/byteorder.h>
+#include <byteswap.h>
+#include <string.h>
+#include <sys/epoll.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+#include <pthread.h>
+
+#include <libmemif.h>
+#include <icmp_proto.h>
+
+#define APP_NAME "ICMP_Responder"
+#define IF_NAME  "memif_connection"
+
+
+#ifdef ICMP_DBG
+#define DBG(...) do {                                               \
+                    printf (APP_NAME":%s:%d: ", __func__, __LINE__);         \
+                    printf (__VA_ARGS__);                           \
+                    printf ("\n");                                  \
+                } while (0)
+#else
+#define DBG(...)
+#endif
+
+#define INFO(...) do {                                              \
+                    printf ("INFO: "__VA_ARGS__);                   \
+                    printf ("\n");                                  \
+                } while (0)
+
+/* maximum tx/rx memif buffers */
+#define MAX_MEMIF_BUFS  256
+#define MAX_CONNS       50
+#define MAX_QUEUES      2
+#define MAX_THREADS     ((MAX_CONNS) * (MAX_QUEUES))
+
+int main_epfd;
+
+typedef struct
+{
+  /* thread id */
+  uint8_t id;
+  /* memif connection index */
+  uint16_t index;
+  /* id of queue to be handled by thread */
+  uint8_t qid;
+  uint8_t isRunning;
+
+  uint16_t rx_buf_num;
+  uint16_t tx_buf_num;
+  memif_buffer_t *rx_bufs;
+  memif_buffer_t *tx_bufs;
+} memif_thread_data_t;
+
+typedef struct
+{
+  uint16_t index;
+  /* memif conenction handle */
+  memif_conn_handle_t conn;
+  /* interface ip address */
+  uint8_t ip_addr[4];
+  /* inform pthread about connection termination */
+  uint8_t pending_del;
+} memif_connection_t;
+
+memif_connection_t memif_connection[MAX_CONNS];
+long ctx[MAX_CONNS];
+
+/* thread data specific for each thread */
+memif_thread_data_t thread_data[MAX_THREADS];
+pthread_t thread[MAX_THREADS];
+
+void
+user_signal_handler (int sig)
+{
+  sig = sig;
+}
+
+static void
+print_memif_details ()
+{
+  memif_details_t md;
+  ssize_t buflen;
+  char *buf;
+  int err, i, e, ti;
+  buflen = 2048;
+  buf = malloc (buflen);
+  printf ("MEMIF DETAILS\n");
+  printf ("==============================\n");
+  for (i = 0; i < MAX_CONNS; i++)
+    {
+      memif_connection_t *c = &memif_connection[i];
+
+      memset (&md, 0, sizeof (md));
+      memset (buf, 0, buflen);
+
+      err = memif_get_details (c->conn, &md, buf, buflen);
+      if (err != MEMIF_ERR_SUCCESS)
+	{
+	  if (err != MEMIF_ERR_NOCONN)
+	    INFO ("%s", memif_strerror (err));
+	  continue;
+	}
+
+      printf ("interface index: %d\n", i);
+
+      printf ("\tinterface ip: %u.%u.%u.%u\n",
+	      c->ip_addr[0], c->ip_addr[1], c->ip_addr[2], c->ip_addr[3]);
+      printf ("\tinterface name: %s\n", (char *) md.if_name);
+      printf ("\tapp name: %s\n", (char *) md.inst_name);
+      printf ("\tremote interface name: %s\n", (char *) md.remote_if_name);
+      printf ("\tremote app name: %s\n", (char *) md.remote_inst_name);
+      printf ("\tid: %u\n", md.id);
+      printf ("\tsecret: %s\n", (char *) md.secret);
+      printf ("\trole: ");
+      if (md.role)
+	printf ("slave\n");
+      else
+	printf ("master\n");
+      printf ("\tmode: ");
+      switch (md.mode)
+	{
+	case 0:
+	  printf ("ethernet\n");
+	  break;
+	case 1:
+	  printf ("ip\n");
+	  break;
+	case 2:
+	  printf ("punt/inject\n");
+	  break;
+	default:
+	  printf ("unknown\n");
+	  break;
+	}
+      printf ("\tsocket filename: %s\n", (char *) md.socket_filename);
+      printf ("\trx queues:\n");
+      for (e = 0; e < md.rx_queues_num; e++)
+	{
+	  ti = (i * MAX_QUEUES) + e;
+	  printf ("\tqueue id: %u\n", md.rx_queues[e].qid);
+	  printf ("\t\tring size: %u\n", md.rx_queues[e].ring_size);
+	  printf ("\t\tbuffer size: %u\n", md.rx_queues[e].buffer_size);
+	  printf ("\t\tthread id: %u\n", thread_data[ti].id);
+	  printf ("\t\tthread connection index: %u\n", thread_data[ti].index);
+	  printf ("\t\tthread running: ");
+	  if (thread_data[ti].isRunning)
+	    printf ("yes\n");
+	  else
+	    printf ("no");
+	}
+      printf ("\ttx queues:\n");
+      for (e = 0; e < md.tx_queues_num; e++)
+	{
+	  printf ("\tqueue id: %u\n", md.tx_queues[e].qid);
+	  printf ("\t\tring size: %u\n", md.tx_queues[e].ring_size);
+	  printf ("\t\tbuffer size: %u\n", md.tx_queues[e].buffer_size);
+	}
+      printf ("\tlink: ");
+      if (md.link_up_down)
+	printf ("up\n");
+      else
+	printf ("down\n");
+    }
+  free (buf);
+}
+
+int
+add_epoll_fd (int epfd, int fd, uint32_t events)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = events;
+  evt.data.fd = fd;
+  if (epoll_ctl (epfd, EPOLL_CTL_ADD, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d added to epoll", fd);
+  return 0;
+}
+
+int
+mod_epoll_fd (int epfd, int fd, uint32_t events)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = events;
+  evt.data.fd = fd;
+  if (epoll_ctl (epfd, EPOLL_CTL_MOD, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d moddified on epoll", fd);
+  return 0;
+}
+
+int
+del_epoll_fd (int epfd, int fd)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  if (epoll_ctl (epfd, EPOLL_CTL_DEL, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d removed from epoll", fd);
+  return 0;
+}
+
+void *
+memif_rx_poll (void *ptr)
+{
+  memif_thread_data_t *data = (memif_thread_data_t *) ptr;
+  memif_connection_t *c = &memif_connection[data->index];
+  int err;
+  uint16_t rx = 0, tx = 0, fb = 0;
+
+  data->rx_bufs = malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  data->tx_bufs = malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  data->rx_buf_num = 0;
+  data->tx_buf_num = 0;
+
+  data->isRunning = 1;
+  INFO ("pthread id %u starts in polling mode", data->id);
+
+  while (1)
+    {
+      if (c->pending_del)
+	goto close;
+
+      /* receive data from shared memory buffers */
+      err =
+	memif_rx_burst (c->conn, data->qid, data->rx_bufs, MAX_MEMIF_BUFS,
+			&rx);
+      if (err != MEMIF_ERR_SUCCESS)
+	{
+	  INFO ("memif_rx_burst: %s", memif_strerror (err));
+	  data->rx_buf_num += rx;
+	  goto error;
+	}
+      data->rx_buf_num += rx;
+      if (rx == 0)
+	{
+	  continue;
+	}
+
+      DBG ("thread id: %u", data->id);
+
+      DBG ("received %d buffers. %u/%u alloc/free buffers",
+	   rx, data->rx_buf_num, MAX_MEMIF_BUFS - data->rx_buf_num);
+
+      err =
+	memif_buffer_alloc (c->conn, data->qid, data->tx_bufs,
+			    data->rx_buf_num, &tx);
+      if (err != MEMIF_ERR_SUCCESS)
+	{
+	  INFO ("memif_buffer_alloc: %s", memif_strerror (err));
+	  data->tx_buf_num += tx;
+	  goto error;
+	}
+      data->tx_buf_num += tx;
+      DBG ("allocated %d/%d buffers, %u free buffers",
+	   tx, data->rx_buf_num, MAX_MEMIF_BUFS - data->tx_buf_num);
+
+      int i;
+      for (i = 0; i < rx; i++)
+	{
+	  resolve_packet ((void *) (data->rx_bufs + i)->data,
+			  (data->rx_bufs + i)->data_len,
+			  (void *) (data->tx_bufs + i)->data,
+			  &(data->tx_bufs + i)->data_len, c->ip_addr);
+	}
+
+      /* mark memif buffers and shared memory buffers as free */
+      err = memif_buffer_free (c->conn, data->qid, data->rx_bufs, rx, &fb);
+      if (err != MEMIF_ERR_SUCCESS)
+	INFO ("memif_buffer_free: %s", memif_strerror (err));
+      data->rx_buf_num -= fb;
+
+      DBG ("freed %d buffers. %u/%u alloc/free buffers",
+	   fb, data->rx_buf_num, MAX_MEMIF_BUFS - data->rx_buf_num);
+
+      err =
+	memif_tx_burst (c->conn, data->qid, data->tx_bufs, data->tx_buf_num,
+			&tx);
+      if (err != MEMIF_ERR_SUCCESS)
+	{
+	  INFO ("memif_tx_burst: %s", memif_strerror (err));
+	  goto error;
+	}
+      DBG ("tx: %d/%u", tx, data->tx_buf_num);
+      data->tx_buf_num -= tx;
+    }
+
+error:
+  INFO ("thread %u error!", data->id);
+  goto close;
+
+close:
+  err = memif_buffer_free (c->conn, data->qid, data->rx_bufs, rx, &fb);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_buffer_free: %s", memif_strerror (err));
+  data->rx_buf_num -= fb;
+  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+       fb, data->rx_buf_num, MAX_MEMIF_BUFS - data->rx_buf_num);
+  free (data->rx_bufs);
+  free (data->tx_bufs);
+  data->isRunning = 0;
+  INFO ("pthread id %u exit", data->id);
+  pthread_exit (NULL);
+}
+
+void *
+memif_rx_interrupt (void *ptr)
+{
+  memif_thread_data_t *data = (memif_thread_data_t *) ptr;
+  memif_connection_t *c = &memif_connection[data->index];
+  int err;
+  uint16_t rx = 0, tx = 0, fb = 0;
+  struct epoll_event evt, *e;
+  int en = 0;
+  uint32_t events = 0;
+  sigset_t sigset;
+
+  signal (SIGUSR1, user_signal_handler);
+
+  data->rx_bufs = malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  data->tx_bufs = malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  data->rx_buf_num = 0;
+  data->tx_buf_num = 0;
+
+  data->isRunning = 1;
+  INFO ("pthread id %u starts in interrupt mode", data->id);
+  int thread_epfd = epoll_create (1);
+
+  /* get interrupt queue id */
+  int fd = -1;
+  err = memif_get_queue_efd (c->conn, data->qid, &fd);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("memif_get_queue_efd: %s", memif_strerror (err));
+      goto error;
+    }
+  add_epoll_fd (thread_epfd, fd, EPOLLIN);
+
+  while (1)
+    {
+      memset (&evt, 0, sizeof (evt));
+      evt.events = EPOLLIN | EPOLLOUT;
+      sigemptyset (&sigset);
+      en = epoll_pwait (thread_epfd, &evt, 1, -1, &sigset);
+      if (en < 0)
+	{
+	  if (errno == EINTR)
+	    goto close;
+	  DBG ("epoll_pwait: %s", strerror (errno));
+	  goto error;
+	}
+      else if (en > 0)
+	{
+	  /* receive data from shared memory buffers */
+	  err =
+	    memif_rx_burst (c->conn, data->qid, data->rx_bufs, MAX_MEMIF_BUFS,
+			    &rx);
+	  if (err != MEMIF_ERR_SUCCESS)
+	    {
+	      INFO ("memif_rx_burst: %s", memif_strerror (err));
+	      data->rx_buf_num += rx;
+	      goto error;
+	    }
+	  data->rx_buf_num += rx;
+	  if (rx == 0)
+	    {
+	      continue;
+	    }
+
+	  DBG ("thread id: %u", data->id);
+
+	  DBG ("received %d buffers. %u/%u alloc/free buffers",
+	       rx, data->rx_buf_num, MAX_MEMIF_BUFS - data->rx_buf_num);
+
+	  err =
+	    memif_buffer_alloc (c->conn, data->qid, data->tx_bufs,
+				data->rx_buf_num, &tx);
+	  if (err != MEMIF_ERR_SUCCESS)
+	    {
+	      INFO ("memif_buffer_alloc: %s", memif_strerror (err));
+	      data->tx_buf_num += tx;
+	      goto error;
+	    }
+	  data->tx_buf_num += tx;
+	  DBG ("allocated %d/%d buffers, %u free buffers",
+	       tx, data->rx_buf_num, MAX_MEMIF_BUFS - data->tx_buf_num);
+
+	  int i;
+	  for (i = 0; i < rx; i++)
+	    {
+	      resolve_packet ((void *) (data->rx_bufs + i)->data,
+			      (data->rx_bufs + i)->data_len,
+			      (void *) (data->tx_bufs + i)->data,
+			      &(data->tx_bufs + i)->data_len, c->ip_addr);
+	    }
+
+	  /* mark memif buffers and shared memory buffers as free */
+	  err =
+	    memif_buffer_free (c->conn, data->qid, data->rx_bufs, rx, &fb);
+	  if (err != MEMIF_ERR_SUCCESS)
+	    INFO ("memif_buffer_free: %s", memif_strerror (err));
+	  data->rx_buf_num -= fb;
+
+	  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+	       fb, data->rx_buf_num, MAX_MEMIF_BUFS - data->rx_buf_num);
+
+	  err =
+	    memif_tx_burst (c->conn, data->qid, data->tx_bufs,
+			    data->tx_buf_num, &tx);
+	  if (err != MEMIF_ERR_SUCCESS)
+	    {
+	      INFO ("memif_tx_burst: %s", memif_strerror (err));
+	      goto error;
+	    }
+	  DBG ("tx: %d/%u", tx, data->tx_buf_num);
+	  data->tx_buf_num -= tx;
+	}
+    }
+
+error:
+  INFO ("thread %u error!", data->id);
+  goto close;
+
+close:
+  err = memif_buffer_free (c->conn, data->qid, data->rx_bufs, rx, &fb);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_buffer_free: %s", memif_strerror (err));
+  data->rx_buf_num -= fb;
+  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+       fb, data->rx_buf_num, MAX_MEMIF_BUFS - data->rx_buf_num);
+  free (data->rx_bufs);
+  free (data->tx_bufs);
+  data->isRunning = 0;
+  INFO ("pthread id %u exit", data->id);
+  pthread_exit (NULL);
+
+}
+
+/* informs user about connected status. private_ctx is used by user to identify connection
+    (multiple connections WIP) */
+int
+on_connect (memif_conn_handle_t conn, void *private_ctx)
+{
+  long index = (*(long *) private_ctx);
+  int err, i, ti;
+  INFO ("memif connected! index %ld", index);
+  memif_connection_t *c = &memif_connection[index];
+  c->pending_del = 0;
+
+  for (i = 0; i < MAX_QUEUES; i++)
+    {
+      err = memif_set_rx_mode (c->conn, MEMIF_RX_MODE_POLLING, i);
+      if (err != MEMIF_ERR_SUCCESS)
+	INFO ("memif_set_rx_mode: %s qid: %u", memif_strerror (err), i);
+      else
+	{
+	  ti = (index * MAX_QUEUES) + i;
+	  if (thread_data[ti].isRunning)
+	    {
+	      INFO ("thread id: %d already running!", ti);
+	      continue;
+	    }
+	  thread_data[ti].index = index;
+	  thread_data[ti].qid = i;
+	  thread_data[ti].id = ti;
+	  if ((i % 2) == 0)
+	    pthread_create (&thread[ti],
+			    NULL, memif_rx_poll, (void *) &thread_data[ti]);
+	  else
+	    pthread_create (&thread[ti],
+			    NULL, memif_rx_interrupt,
+			    (void *) &thread_data[ti]);
+	}
+
+    }
+  return 0;
+}
+
+/* informs user about disconnected status. private_ctx is used by user to identify connection
+    (multiple connections WIP) */
+int
+on_disconnect (memif_conn_handle_t conn, void *private_ctx)
+{
+  void *ptr;
+  long index = (*(long *) private_ctx);
+  memif_connection_t *c = &memif_connection[index];
+  int i, ti;
+  INFO ("memif disconnected!");
+  /* inform thread in polling mode about memif disconenction */
+  c->pending_del = 1;
+  for (i = 0; i < MAX_QUEUES; i++)
+    {
+      ti = (index * MAX_QUEUES) + i;
+      if (!thread_data[ti].isRunning)
+	continue;
+      if ((i % 2) != 0)
+	pthread_kill (thread[ti], SIGUSR1);	/* interrupt thread in interrupt mode */
+      pthread_join (thread[ti], &ptr);
+    }
+  return 0;
+}
+
+/* user needs to watch new fd or stop watching fd that is about to be closed.
+    control fd will be modified during connection establishment to minimize CPU usage */
+int
+control_fd_update (int fd, uint8_t events)
+{
+  /* convert memif event definitions to epoll events */
+  if (events & MEMIF_FD_EVENT_DEL)
+    return del_epoll_fd (main_epfd, fd);
+
+  uint32_t evt = 0;
+  if (events & MEMIF_FD_EVENT_READ)
+    evt |= EPOLLIN;
+  if (events & MEMIF_FD_EVENT_WRITE)
+    evt |= EPOLLOUT;
+
+  if (events & MEMIF_FD_EVENT_MOD)
+    return mod_epoll_fd (main_epfd, fd, evt);
+
+  return add_epoll_fd (main_epfd, fd, evt);
+}
+
+int
+icmpr_memif_create (long index)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+
+  /* setting memif connection arguments */
+  memif_conn_args_t args;
+  int fd = -1;
+  memset (&args, 0, sizeof (args));
+  args.is_master = 0;
+  args.log2_ring_size = 10;
+  args.buffer_size = 2048;
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+  strncpy ((char *) args.interface_name, IF_NAME, strlen (IF_NAME));
+  strncpy ((char *) args.instance_name, APP_NAME, strlen (APP_NAME));
+  args.mode = 0;
+  /* socket filename is not specified, because this app is supposed to
+     connect to VPP over memif. so default socket filename will be used */
+  /* default socketfile = /run/vpp/memif.sock */
+
+  args.interface_id = index;
+  /* last argument for memif_create (void * private_ctx) is used by user
+     to identify connection. this context is returned with callbacks */
+  int err = memif_create (&c->conn,
+			  &args, on_connect, on_disconnect, NULL,
+			  &ctx[index]);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("memif_create: %s", memif_strerror (err));
+      return 0;
+    }
+
+  c->index = index;
+
+  c->ip_addr[0] = 192;
+  c->ip_addr[1] = 168;
+  c->ip_addr[2] = c->index + 1;
+  c->ip_addr[3] = 2;
+  return 0;
+}
+
+int
+icmpr_memif_delete (long index)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+
+  int err;
+  /* disconenct then delete memif connection */
+  err = memif_delete (&c->conn);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_delete: %s", memif_strerror (err));
+  return 0;
+}
+
+void
+print_help ()
+{
+  printf ("LIBMEMIF EXAMPLE APP: %s", APP_NAME);
+#ifdef ICMP_DBG
+  printf (" (debug)");
+#endif
+  printf ("\n");
+  printf ("==============================\n");
+  printf ("libmemif version: %s", LIBMEMIF_VERSION);
+#ifdef MEMIF_DBG
+  printf (" (debug)");
+#endif
+  printf ("\n");
+  printf ("memif version: %d\n", MEMIF_VERSION);
+  printf ("commands:\n");
+  printf ("\thelp - prints this help\n");
+  printf ("\texit - exit app\n");
+  printf ("\tconn <index> - create memif (slave-mode)\n");
+  printf ("\tdel  <index> - delete memif\n");
+  printf ("\tshow - show connection details\n");
+  printf ("\tip-set <index> <ip-addr> - set interface ip address\n");
+}
+
+int
+icmpr_free ()
+{
+  /* application cleanup */
+  int err;
+  long i;
+  for (i = 0; i < MAX_CONNS; i++)
+    {
+      memif_connection_t *c = &memif_connection[i];
+      if (c->conn)
+	icmpr_memif_delete (i);
+    }
+
+  err = memif_cleanup ();
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_delete: %s", memif_strerror (err));
+
+  return 0;
+}
+
+int
+icmpr_set_ip (long index, char *ip)
+{
+  if (index >= MAX_CONNS)
+    {
+      INFO ("connection array overflow");
+      return 0;
+    }
+  if (index < 0)
+    {
+      INFO ("don't even try...");
+      return 0;
+    }
+  memif_connection_t *c = &memif_connection[index];
+  if (c->conn == NULL)
+    {
+      INFO ("no connection at index %ld", index);
+      return 0;
+    }
+
+  char *end;
+  char *ui;
+  uint8_t tmp[4];
+  ui = strtok (ip, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[0] = strtol (ui, &end, 10);
+
+  ui = strtok (NULL, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[1] = strtol (ui, &end, 10);
+
+  ui = strtok (NULL, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[2] = strtol (ui, &end, 10);
+
+  ui = strtok (NULL, ".");
+  if (ui == NULL)
+    goto error;
+  tmp[3] = strtol (ui, &end, 10);
+
+  c->ip_addr[0] = tmp[0];
+  c->ip_addr[1] = tmp[1];
+  c->ip_addr[2] = tmp[2];
+  c->ip_addr[3] = tmp[3];
+
+  INFO ("memif %ld ip address set to %u.%u.%u.%u",
+	index, c->ip_addr[0], c->ip_addr[1], c->ip_addr[2], c->ip_addr[3]);
+
+  return 0;
+
+error:
+  INFO ("invalid ip address");
+  return 0;
+}
+
+
+int
+user_input_handler ()
+{
+  int i;
+  char *in = (char *) malloc (256);
+  char *ui = fgets (in, 256, stdin);
+  char *end;
+  if (in[0] == '\n')
+    goto done;
+  ui = strtok (in, " ");
+  if (strncmp (ui, "exit", 4) == 0)
+    {
+      free (in);
+      icmpr_free ();
+      exit (EXIT_SUCCESS);
+    }
+  else if (strncmp (ui, "help", 4) == 0)
+    {
+      print_help ();
+      goto done;
+    }
+  else if (strncmp (ui, "conn", 4) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_memif_create (strtol (ui, &end, 10));
+      else
+	INFO ("expected id");
+      goto done;
+    }
+  else if (strncmp (ui, "del", 3) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_memif_delete (strtol (ui, &end, 10));
+      else
+	INFO ("expected id");
+      goto done;
+    }
+  else if (strncmp (ui, "show", 4) == 0)
+    {
+      print_memif_details ();
+      goto done;
+    }
+  else if (strncmp (ui, "ip-set", 6) == 0)
+    {
+      ui = strtok (NULL, " ");
+      if (ui != NULL)
+	icmpr_set_ip (strtol (ui, &end, 10), strtok (NULL, " "));
+      else
+	INFO ("expected id");
+      goto done;
+    }
+  else
+    {
+      DBG ("unknown command: %s", ui);
+      goto done;
+    }
+
+  return 0;
+done:
+  free (in);
+  return 0;
+}
+
+int
+poll_event (int timeout)
+{
+  struct epoll_event evt, *e;
+  int app_err = 0, memif_err = 0, en = 0;
+  int tmp, nfd;
+  uint32_t events = 0;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = EPOLLIN | EPOLLOUT;
+  sigset_t sigset;
+  sigemptyset (&sigset);
+  en = epoll_pwait (main_epfd, &evt, 1, timeout, &sigset);
+  if (en < 0)
+    {
+      DBG ("epoll_pwait: %s", strerror (errno));
+      return -1;
+    }
+  if (en > 0)
+    {
+      /* this app does not use any other file descriptors than stds and memif control fds */
+      if (evt.data.fd > 2)
+	{
+	  /* event of memif control fd */
+	  /* convert epolle events to memif events */
+	  if (evt.events & EPOLLIN)
+	    events |= MEMIF_FD_EVENT_READ;
+	  if (evt.events & EPOLLOUT)
+	    events |= MEMIF_FD_EVENT_WRITE;
+	  if (evt.events & EPOLLERR)
+	    events |= MEMIF_FD_EVENT_ERROR;
+	  memif_err = memif_control_fd_handler (evt.data.fd, events);
+	  if (memif_err != MEMIF_ERR_SUCCESS)
+	    INFO ("memif_control_fd_handler: %s", memif_strerror (memif_err));
+	}
+      else if (evt.data.fd == 0)
+	{
+	  app_err = user_input_handler ();
+	}
+      else
+	{
+	  DBG ("unexpected event at memif_epfd. fd %d", evt.data.fd);
+	}
+    }
+
+  if ((app_err < 0) || (memif_err < 0))
+    {
+      if (app_err < 0)
+	DBG ("user input handler error");
+      if (memif_err < 0)
+	DBG ("memif control fd handler error");
+      return -1;
+    }
+
+  return 0;
+}
+
+int
+main ()
+{
+  main_epfd = epoll_create (1);
+  add_epoll_fd (main_epfd, 0, EPOLLIN);
+
+  /* initialize memory interface */
+  int err, i;
+  /* if valid callback is passed as argument, fd event polling will be done by user
+     all file descriptors and events will be passed to user in this callback */
+  /* if callback is set to NULL libmemif will handle fd event polling */
+  err = memif_init (control_fd_update, APP_NAME);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_init: %s", memif_strerror (err));
+
+  for (i = 0; i < MAX_CONNS; i++)
+    {
+      memif_connection[i].conn = NULL;
+      ctx[i] = i;
+    }
+
+  memset (&thread_data, 0, sizeof (memif_thread_data_t) * MAX_THREADS);
+
+  print_help ();
+
+  /* main loop */
+  while (1)
+    {
+      if (poll_event (-1) < 0)
+	{
+	  DBG ("poll_event error!");
+	}
+    }
+}
diff --git a/extras/libmemif/examples/icmp_responder/icmp_proto.c b/extras/libmemif/examples/icmp_responder/icmp_proto.c
new file mode 100644
index 0000000..a923f20
--- /dev/null
+++ b/extras/libmemif/examples/icmp_responder/icmp_proto.c
@@ -0,0 +1,246 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <stdint.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <linux/ip.h>
+#include <linux/icmp.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <netinet/if_ether.h>
+#include <net/if_arp.h>
+#include <asm/byteorder.h>
+#include <byteswap.h>
+
+#include <icmp_proto.h>
+
+static uint16_t
+cksum (void *addr, ssize_t len)
+{
+  char *data = (char *) addr;
+
+  uint32_t acc = 0xffff;
+
+  ssize_t i;
+  for (i = 0; (i + 1) < len; i += 2)
+    {
+      uint16_t word;
+      memcpy (&word, data + i, 2);
+      acc += ntohs (word);
+      if (acc > 0xffff)
+	acc -= 0xffff;
+    }
+
+  if (len & 1)
+    {
+      uint16_t word = 0;
+      memcpy (&word, data + len - 1, 1);
+      acc += ntohs (word);
+      if (acc > 0xffff)
+	acc -= 0xffff;
+    }
+  return htons (~acc);
+}
+
+int
+print_packet (void *pck)
+{
+  if (pck == NULL)
+    {
+      printf ("ICMP_PROTO: no data\n");
+      return -1;
+    }
+  struct iphdr *ip;
+  struct icmphdr *icmp;
+  ip = (struct iphdr *) pck;
+  icmp = (struct icmphdr *) (pck + sizeof (struct iphdr));
+  printf ("received packet:\n");
+  printf ("\tiphdr:\n");
+  printf ("\t\tihl: %u\n\t\tversion: %u\n\t\tlen: %u\n\t\tid: %u\n",
+	  ip->ihl, ip->version, __bswap_16 (ip->tot_len), ip->id);
+  printf ("\t\tprotocol: %u\n", ip->protocol);
+
+  printf ("\t\tsaddr: ");
+  int i;
+  for (i = 0; i < 4; i++)
+    {
+      printf ("%u.", ((uint8_t *) & ip->saddr)[i]);
+    }
+  printf ("\n");
+
+  printf ("\t\tdaddr: ");
+  for (i = 0; i < 4; i++)
+    {
+      printf ("%u.", ((uint8_t *) & ip->daddr)[i]);
+    }
+  printf ("\n");
+  printf ("\ticmphdr:\n");
+  printf ("\t\ttype: %s\n",
+	  (icmp->type == ICMP_ECHO) ? "ICMP_ECHO" : "ICMP_ECHOREPLY");
+
+  return 0;
+}
+
+static ssize_t
+resolve_arp (void *arp)
+{
+  struct arphdr *resp = (struct arphdr *) arp;
+
+  resp->ar_hrd = __bswap_16 (ARPHRD_ETHER);
+
+  resp->ar_pro = __bswap_16 (0x0800);
+
+  resp->ar_hln = 6;
+  resp->ar_pln = 4;
+
+  resp->ar_op = __bswap_16 (ARPOP_REPLY);
+
+  return sizeof (struct arphdr);
+}
+
+static ssize_t
+resolve_eth_arp (struct ether_arp *eth_arp, void *eth_arp_resp,
+		 uint8_t ip_addr[4])
+{
+  struct ether_arp *resp = (struct ether_arp *) eth_arp_resp;
+
+  resolve_arp (&resp->ea_hdr);
+
+  memcpy (resp->arp_tha, eth_arp->arp_sha, 6);
+  memcpy (resp->arp_tpa, eth_arp->arp_spa, 4);
+
+  memcpy (resp->arp_sha,
+	  (((struct ether_header *) (eth_arp_resp -
+				     sizeof (struct ether_header)))->
+	   ether_shost), 6);
+
+  memcpy (resp->arp_spa, ip_addr, 4);
+
+  return sizeof (struct ether_arp);
+}
+
+static ssize_t
+resolve_eth (struct ether_header *eth, void *eth_resp)
+{
+  struct ether_header *resp = (struct ether_header *) eth_resp;
+  memcpy (resp->ether_dhost, eth->ether_shost, 6);
+
+  uint8_t hw_addr[6];
+  int i;
+  for (i = 0; i < 6; i++)
+    {
+      hw_addr[i] = 'a';
+    }
+  memcpy (resp->ether_shost, hw_addr, 6);
+
+  resp->ether_type = eth->ether_type;
+
+  return sizeof (struct ether_header);
+}
+
+static ssize_t
+resolve_ip (struct iphdr *ip, void *ip_resp, uint8_t ip_addr[4])
+{
+  struct iphdr *resp = (struct iphdr *) ip_resp;
+  resp->ihl = 5;
+  resp->version = 4;
+  resp->tos = 0;
+  /*len updated later */
+  resp->tot_len = 0x5400;
+  resp->id = 0;
+  resp->frag_off = 0;
+  resp->ttl = 0x40;
+  resp->protocol = 1;
+  ((uint8_t *) & resp->saddr)[0] = ip_addr[0];
+  ((uint8_t *) & resp->saddr)[1] = ip_addr[1];
+  ((uint8_t *) & resp->saddr)[2] = ip_addr[2];
+  ((uint8_t *) & resp->saddr)[3] = ip_addr[3];
+  resp->daddr = ip->saddr;
+
+  resp->check = cksum (resp, sizeof (struct iphdr));
+
+  return sizeof (struct iphdr);
+}
+
+static ssize_t
+resolve_icmp (struct icmphdr *icmp, void *icmp_resp)
+{
+  struct icmphdr *resp = (struct icmphdr *) icmp_resp;
+  resp->type = ICMP_ECHOREPLY;
+  resp->code = 0;
+  resp->un.echo.id = icmp->un.echo.id;
+  resp->un.echo.sequence = icmp->un.echo.sequence;
+
+  /*resp->checksum = cksum (resp, sizeof (struct icmphdr)); */
+
+  return sizeof (struct icmphdr);
+}
+
+int
+resolve_packet (void *in_pck, ssize_t in_size,
+		void *out_pck, uint32_t * out_size, uint8_t ip_addr[4])
+{
+  struct ether_header *eh;
+  struct ether_arp *eah;
+  struct iphdr *ip;
+  struct icmphdr *icmp;
+  *out_size = 0;
+
+  eh = (struct ether_header *) in_pck;
+  *out_size = resolve_eth (eh, out_pck);
+
+  if (eh->ether_type == 0x0608)
+    {
+      eah = (struct ether_arp *) (in_pck + *out_size);
+      *out_size += resolve_eth_arp (eah, out_pck + *out_size, ip_addr);
+
+    }
+  else if (eh->ether_type == 0x0008)
+    {
+#ifdef ICMP_DBG
+      print_packet (in_pck + *out_size);
+#endif
+      ip = (struct iphdr *) (in_pck + *out_size);
+      *out_size += resolve_ip (ip, out_pck + *out_size, ip_addr);
+      if (ip->protocol == 1)
+	{
+	  icmp = (struct icmphdr *) (in_pck + *out_size);
+	  *out_size += resolve_icmp (icmp, out_pck + *out_size);
+	  ((struct icmphdr *) (out_pck + *out_size -
+			       sizeof (struct icmphdr)))->checksum =
+	    cksum (out_pck + *out_size - sizeof (struct icmphdr),
+		   sizeof (struct icmphdr));
+	  /* payload */
+	  memcpy (out_pck + *out_size, in_pck + *out_size,
+		  in_size - *out_size);
+	  *out_size = in_size;
+	}
+    }
+  return 0;
+}
diff --git a/extras/libmemif/examples/icmp_responder/icmp_proto.h b/extras/libmemif/examples/icmp_responder/icmp_proto.h
new file mode 100644
index 0000000..f2f22ac
--- /dev/null
+++ b/extras/libmemif/examples/icmp_responder/icmp_proto.h
@@ -0,0 +1,26 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#ifndef _ICMP_PROTO_H_
+#define _ICMP_PROTO_H_
+
+int resolve_packet (void *in_pck, ssize_t in_size, void *out_pck,
+		    uint32_t * out_size, uint8_t ip_addr[4]);
+
+int print_packet (void *pck);
+
+#endif /* _ICMP_PROTO_H_ */
diff --git a/extras/libmemif/examples/icmp_responder/main.c b/extras/libmemif/examples/icmp_responder/main.c
new file mode 100644
index 0000000..5351b6b
--- /dev/null
+++ b/extras/libmemif/examples/icmp_responder/main.c
@@ -0,0 +1,416 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <linux/ip.h>
+#include <linux/icmp.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <netinet/if_ether.h>
+#include <net/if_arp.h>
+#include <asm/byteorder.h>
+#include <byteswap.h>
+#include <string.h>
+#include <sys/epoll.h>
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include <libmemif.h>
+#include <icmp_proto.h>
+
+#define APP_NAME "ICMP_Responder"
+#define IF_NAME  "memif_connection"
+
+
+#ifdef ICMP_DBG
+#define DBG(...) do {                                               \
+                    printf (APP_NAME":%s:%d: ", __func__, __LINE__);         \
+                    printf (__VA_ARGS__);                           \
+                    printf ("\n");                                  \
+                } while (0)
+#else
+#define DBG(...)
+#endif
+
+#define INFO(...) do {                                              \
+                    printf ("INFO: "__VA_ARGS__);                   \
+                    printf ("\n");                                  \
+                } while (0)
+
+/* maximum tx/rx memif buffers */
+#define MAX_MEMIF_BUFS 256
+
+typedef struct
+{
+  uint16_t index;
+  /* memif conenction handle */
+  memif_conn_handle_t conn;
+  /* transmit queue id */
+  uint16_t tx_qid;
+  /* tx buffers */
+  memif_buffer_t *tx_bufs;
+  /* allocated tx buffers counter */
+  /* number of tx buffers pointing to shared memory */
+  uint16_t tx_buf_num;
+  /* rx buffers */
+  memif_buffer_t *rx_bufs;
+  /* allcoated rx buffers counter */
+  /* number of rx buffers pointing to shared memory */
+  uint16_t rx_buf_num;
+  /* interface ip address */
+  uint8_t ip_addr[4];
+} memif_connection_t;
+
+memif_connection_t memif_connection;
+int epfd;
+
+static void
+print_memif_details ()
+{
+  memif_connection_t *c = &memif_connection;
+  printf ("MEMIF DETAILS\n");
+  printf ("==============================\n");
+
+
+  memif_details_t md;
+  memset (&md, 0, sizeof (md));
+  ssize_t buflen = 2048;
+  char *buf = malloc (buflen);
+  memset (buf, 0, buflen);
+  int err, e;
+
+  err = memif_get_details (c->conn, &md, buf, buflen);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("%s", memif_strerror (err));
+      if (err == MEMIF_ERR_NOCONN)
+	{
+	  free (buf);
+	  return;
+	}
+    }
+
+  printf ("\tinterface name: %s\n", (char *) md.if_name);
+  printf ("\tapp name: %s\n", (char *) md.inst_name);
+  printf ("\tremote interface name: %s\n", (char *) md.remote_if_name);
+  printf ("\tremote app name: %s\n", (char *) md.remote_inst_name);
+  printf ("\tid: %u\n", md.id);
+  printf ("\tsecret: %s\n", (char *) md.secret);
+  printf ("\trole: ");
+  if (md.role)
+    printf ("slave\n");
+  else
+    printf ("master\n");
+  printf ("\tmode: ");
+  switch (md.mode)
+    {
+    case 0:
+      printf ("ethernet\n");
+      break;
+    case 1:
+      printf ("ip\n");
+      break;
+    case 2:
+      printf ("punt/inject\n");
+      break;
+    default:
+      printf ("unknown\n");
+      break;
+    }
+  printf ("\tsocket filename: %s\n", (char *) md.socket_filename);
+  printf ("\tsocket filename: %s\n", (char *) md.socket_filename);
+  printf ("\trx queues:\n");
+  for (e = 0; e < md.rx_queues_num; e++)
+    {
+      printf ("\t\tqueue id: %u\n", md.rx_queues[e].qid);
+      printf ("\t\tring size: %u\n", md.rx_queues[e].ring_size);
+      printf ("\t\tbuffer size: %u\n", md.rx_queues[e].buffer_size);
+    }
+  printf ("\ttx queues:\n");
+  for (e = 0; e < md.tx_queues_num; e++)
+    {
+      printf ("\t\tqueue id: %u\n", md.tx_queues[e].qid);
+      printf ("\t\tring size: %u\n", md.tx_queues[e].ring_size);
+      printf ("\t\tbuffer size: %u\n", md.tx_queues[e].buffer_size);
+    }
+  printf ("\tlink: ");
+  if (md.link_up_down)
+    printf ("up\n");
+  else
+    printf ("down\n");
+
+  free (buf);
+}
+
+/* informs user about connected status. private_ctx is used by user to identify connection
+    (multiple connections WIP) */
+int
+on_connect (memif_conn_handle_t conn, void *private_ctx)
+{
+  INFO ("memif connected!");
+  return 0;
+}
+
+/* informs user about disconnected status. private_ctx is used by user to identify connection
+    (multiple connections WIP) */
+int
+on_disconnect (memif_conn_handle_t conn, void *private_ctx)
+{
+  INFO ("memif disconnected!");
+  return 0;
+}
+
+int
+icmpr_memif_delete ()
+{
+  int err;
+  /* disconenct then delete memif connection */
+  err = memif_delete (&(&memif_connection)->conn);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_delete: %s", memif_strerror (err));
+  return 0;
+}
+
+void
+print_help ()
+{
+  printf ("LIBMEMIF EXAMPLE APP: %s", APP_NAME);
+#ifdef ICMP_DBG
+  printf (" (debug)");
+#endif
+  printf ("\n");
+  printf ("==============================\n");
+  printf ("libmemif version: %s", LIBMEMIF_VERSION);
+#ifdef MEMIF_DBG
+  printf (" (debug)");
+#endif
+  printf ("\n");
+  printf ("memif version: %d\n", MEMIF_VERSION);
+  printf ("\tuse CTRL+C to exit\n");
+}
+
+int
+icmpr_buffer_alloc (long n, uint16_t qid)
+{
+  memif_connection_t *c = &memif_connection;
+  int err;
+  uint16_t r;
+  /* set data pointer to shared memory and set buffer_len to shared mmeory buffer len */
+  err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r);
+  if (err != MEMIF_ERR_SUCCESS)
+    {
+      INFO ("memif_buffer_alloc: %s", memif_strerror (err));
+      c->tx_buf_num += r;
+      return -1;
+    }
+  c->tx_buf_num += r;
+  DBG ("allocated %d/%ld buffers, %u free buffers", r, n,
+       MAX_MEMIF_BUFS - c->tx_buf_num);
+  return 0;
+}
+
+int
+icmpr_tx_burst (uint16_t qid)
+{
+  memif_connection_t *c = &memif_connection;
+  int err;
+  uint16_t r;
+  /* inform peer memif interface about data in shared memory buffers */
+  /* mark memif buffers as free */
+  err = memif_tx_burst (c->conn, qid, c->tx_bufs, c->tx_buf_num, &r);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_tx_burst: %s", memif_strerror (err));
+  DBG ("tx: %d/%u", r, c->tx_buf_num);
+  c->tx_buf_num -= r;
+  return 0;
+}
+
+int
+icmpr_free ()
+{
+  /* application cleanup */
+  int err;
+  memif_connection_t *c = &memif_connection;
+  free (c->tx_bufs);
+  c->tx_bufs = NULL;
+  free (c->rx_bufs);
+  c->rx_bufs = NULL;
+
+  err = memif_cleanup ();
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_delete: %s", memif_strerror (err));
+
+  return 0;
+}
+
+void
+icmpr_exit (int sig)
+{
+  printf ("\n");
+  icmpr_memif_delete ();
+  icmpr_free ();
+  exit (EXIT_SUCCESS);
+}
+
+/* called when event is polled on interrupt file descriptor.
+    there are packets in shared memory ready to be received */
+int
+on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
+{
+  DBG ("interrupted");
+  memif_connection_t *c = &memif_connection;
+  int err;
+  uint16_t rx;
+  /* receive data from shared memory buffers */
+  err = memif_rx_burst (c->conn, qid, c->rx_bufs, MAX_MEMIF_BUFS, &rx);
+  c->rx_buf_num += rx;
+
+  DBG ("received %d buffers. %u/%u alloc/free buffers",
+       rx, c->rx_buf_num, MAX_MEMIF_BUFS - c->rx_buf_num);
+
+  if (icmpr_buffer_alloc (rx, c->tx_qid) < 0)
+    {
+      INFO ("buffer_alloc error");
+      goto error;
+    }
+  int i;
+  for (i = 0; i < rx; i++)
+    {
+      resolve_packet ((void *) (c->rx_bufs + i)->data,
+		      (c->rx_bufs + i)->data_len,
+		      (void *) (c->tx_bufs + i)->data,
+		      &(c->tx_bufs + i)->data_len, c->ip_addr);
+    }
+
+  uint16_t fb;
+  /* mark memif buffers and shared memory buffers as free */
+  err = memif_buffer_free (c->conn, qid, c->rx_bufs, rx, &fb);
+  c->rx_buf_num -= fb;
+
+  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+       fb, c->rx_buf_num, MAX_MEMIF_BUFS - c->rx_buf_num);
+
+  icmpr_tx_burst (c->tx_qid);
+
+  return 0;
+
+error:
+  err = memif_buffer_free (c->conn, qid, c->rx_bufs, rx, &fb);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_buffer_free: %s", memif_strerror (err));
+  c->rx_buf_num -= fb;
+  DBG ("freed %d buffers. %u/%u alloc/free buffers",
+       fb, c->rx_buf_num, MAX_MEMIF_BUFS - c->rx_buf_num);
+  return 0;
+}
+
+int
+icmpr_memif_create (int is_master)
+{
+  /* setting memif connection arguments */
+  memif_conn_args_t args;
+  int fd = -1;
+  memset (&args, 0, sizeof (args));
+  args.is_master = is_master;
+  args.log2_ring_size = 10;
+  args.buffer_size = 2048;
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+  strncpy ((char *) args.interface_name, IF_NAME, strlen (IF_NAME));
+  strncpy ((char *) args.instance_name, APP_NAME, strlen (APP_NAME));
+  args.mode = 0;
+  /* socket filename is not specified, because this app is supposed to
+     connect to VPP over memif. so default socket filename will be used */
+  /* default socketfile = /run/vpp/memif.sock */
+
+  args.interface_id = 0;
+  /* last argument for memif_create (void * private_ctx) is used by user
+     to identify connection. this context is returned with callbacks */
+  int err = memif_create (&(&memif_connection)->conn,
+			  &args, on_connect, on_disconnect, on_interrupt,
+			  NULL);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_create: %s", memif_strerror (err));
+  return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+  memif_connection_t *c = &memif_connection;
+
+  signal (SIGINT, icmpr_exit);
+
+  /* initialize global memif connection handle */
+  c->conn = NULL;
+  if (argc == 1)
+    c->tx_qid = 0;
+  else
+    {
+      char *end;
+      c->tx_qid = strtol (argv[1], &end, 10);
+    }
+  INFO ("tx qid: %u", c->tx_qid);
+  /* alloc memif buffers */
+  c->rx_buf_num = 0;
+  c->rx_bufs =
+    (memif_buffer_t *) malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  c->tx_buf_num = 0;
+  c->tx_bufs =
+    (memif_buffer_t *) malloc (sizeof (memif_buffer_t) * MAX_MEMIF_BUFS);
+  c->ip_addr[0] = 192;
+  c->ip_addr[1] = 168;
+  c->ip_addr[2] = 1;
+  c->ip_addr[3] = 2;
+  /* initialize memory interface */
+  int err;
+  /* if valid callback is passed as argument, fd event polling will be done by user
+     all file descriptors and events will be passed to user in this callback */
+  /* if callback is set to NULL libmemif will handle fd event polling */
+  err = memif_init (NULL, APP_NAME);
+  if (err != MEMIF_ERR_SUCCESS)
+    INFO ("memif_init: %s", memif_strerror (err));
+
+  print_help ();
+
+  icmpr_memif_create (0);
+  print_memif_details ();
+
+  /* main loop */
+  while (1)
+    {
+      if (memif_poll_event (-1) < 0)
+	{
+	  DBG ("poll_event error!");
+	}
+    }
+}
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
new file mode 100644
index 0000000..3732be6
--- /dev/null
+++ b/extras/libmemif/src/libmemif.h
@@ -0,0 +1,442 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+/** @file */
+
+#ifndef _LIBMEMIF_H_
+#define _LIBMEMIF_H_
+
+/** Libmemif version. */
+#define LIBMEMIF_VERSION "1.0"
+/** Default name of application using libmemif. */
+#define MEMIF_DEFAULT_APP_NAME "libmemif-app"
+
+#include <inttypes.h>
+
+#include <memif.h>
+
+/*! Error codes */
+typedef enum
+{
+  MEMIF_ERR_SUCCESS = 0,	/*!< success */
+/* SYSCALL ERRORS */
+  MEMIF_ERR_SYSCALL,		/*!< other syscall error */
+  MEMIF_ERR_ACCES,		/*!< permission denied */
+  MEMIF_ERR_NO_FILE,		/*!< file does not exist */
+  MEMIF_ERR_FILE_LIMIT,		/*!< system open file limit */
+  MEMIF_ERR_PROC_FILE_LIMIT,	/*!< process open file limit */
+  MEMIF_ERR_ALREADY,		/*!< connection already requested */
+  MEMIF_ERR_AGAIN,		/*!< fd is not socket, or operation would block */
+  MEMIF_ERR_BAD_FD,		/*!< invalid fd */
+  MEMIF_ERR_NOMEM,		/*!< out of memory */
+/* LIBMEMIF ERRORS */
+  MEMIF_ERR_INVAL_ARG,		/*!< invalid argument */
+  MEMIF_ERR_NOCONN,		/*!< handle points to no connection */
+  MEMIF_ERR_CONN,		/*!< handle points to existing connection */
+  MEMIF_ERR_CB_FDUPDATE,	/*!< user defined callback memif_control_fd_update_t error */
+  MEMIF_ERR_FILE_NOT_SOCK,	/*!< file specified by socket filename 
+				   exists, but it's not socket */
+  MEMIF_ERR_NO_SHMFD,		/*!< missing shm fd */
+  MEMIF_ERR_COOKIE,		/*!< wrong cookie on ring */
+  MEMIF_ERR_NOBUF_RING,		/*!< ring buffer full */
+  MEMIF_ERR_NOBUF,		/*!< not enough memif buffers */
+  MEMIF_ERR_NOBUF_DET,		/*!< memif details needs larger buffer */
+  MEMIF_ERR_INT_WRITE,		/*!< send interrupt error */
+  MEMIF_ERR_MFMSG,		/*!< malformed msg received */
+  MEMIF_ERR_QID,		/*!< invalid queue id */
+/* MEMIF PROTO ERRORS */
+  MEMIF_ERR_PROTO,		/*!< incompatible protocol version */
+  MEMIF_ERR_ID,			/*!< unmatched interface id */
+  MEMIF_ERR_ACCSLAVE,		/*!< slave cannot accept connection requests */
+  MEMIF_ERR_ALRCONN,		/*!< memif is already connected */
+  MEMIF_ERR_MODE,		/*!< mode mismatch */
+  MEMIF_ERR_SECRET,		/*!< secret mismatch */
+  MEMIF_ERR_NOSECRET,		/*!< secret required */
+  MEMIF_ERR_MAXREG,		/*!< max region limit reached */
+  MEMIF_ERR_MAXRING,		/*!< max ring limit reached */
+  MEMIF_ERR_NO_INTFD,		/*!< missing interrupt fd */
+  MEMIF_ERR_DISCONNECT,		/*!< disconenct received */
+  MEMIF_ERR_DISCONNECTED,	/*!< peer interface disconnected */
+  MEMIF_ERR_UNKNOWN_MSG,	/*!< unknown message type */
+} memif_err_t;
+
+/**
+ * @defgroup MEMIF_FD_EVENT Types of events that need to be watched for specific fd.
+ *
+ * @{
+ */
+
+/** user needs to set events that occured on fd and pass them to memif_control_fd_handler */
+#define MEMIF_FD_EVENT_READ  (1 << 0)
+#define MEMIF_FD_EVENT_WRITE (1 << 1)
+/** inform libmemif that error occured on fd */
+#define MEMIF_FD_EVENT_ERROR (1 << 2)
+/** if set, informs that fd is going to be closed (user may want to stop watching for events on this fd) */
+#define MEMIF_FD_EVENT_DEL   (1 << 3)
+/** update events */
+#define MEMIF_FD_EVENT_MOD   (1 << 4)
+/** @} */
+
+/** *brief Memif connection handle
+    pointer of type void, pointing to internal structure
+*/
+typedef void *memif_conn_handle_t;
+/**
+ * @defgroup CALLBACKS Callback functions definitions
+ *
+ * @{
+ */
+
+/** \brief Memif control file descriptor update (callback function)
+    @param fd - new file descriptor to watch
+    @param events - event type(s) to watch for
+
+    This callback is called when there is new fd to watch for events on
+    or if fd is about to be closed (user mey want to stop watching for events on this fd).
+*/
+typedef int (memif_control_fd_update_t) (int fd, uint8_t events);
+
+/** \brief Memif connection status update (callback function)
+    @param conn - memif connection handle
+    @param private_ctx - private context
+
+    Informs user about connection status connected/disconnected.
+    On connected -> start watching for events on interrupt fd (optional).
+*/
+typedef int (memif_connection_update_t) (memif_conn_handle_t conn,
+					 void *private_ctx);
+
+/** \brief Memif interrupt occured (callback function)
+    @param conn - memif connection handle
+    @param private_ctx - private context
+    @param qid - queue id on which interrupt occured
+
+    Called when event is received on interrupt fd.
+*/
+typedef int (memif_interrupt_t) (memif_conn_handle_t conn, void *private_ctx,
+				 uint16_t qid);
+/** @} */
+
+/**
+ * @defgroup ARGS_N_BUFS Connection arguments and buffers
+ *
+ * @{
+ */
+
+/** \brief Memif connection arguments
+    @param socket_filename - socket filename
+    @param secret - otional parameter used as interface autenthication
+    @param num_s2m_rings - number of slave to master rings
+    @param num_m2s_rings - number of master to slave rings
+    @param buffer_size - size of buffer in shared memory
+    @param log2_ring_size - logarithm base 2 of ring size
+    @param is_master - 0 == master, 1 == slave
+    @param interface_id - id used to identify peer connection
+    @param interface_name - interface name
+    @param instance_name - application name
+    @param mode - 0 == ethernet, 1 == ip , 2 == punt/inject
+*/
+typedef struct
+{
+  uint8_t *socket_filename;	/*!< default = /run/vpp/memif.sock */
+  uint8_t secret[24];		/*!< optional (interface authentication) */
+
+  uint8_t num_s2m_rings;	/*!< default = 1 */
+  uint8_t num_m2s_rings;	/*!< default = 1 */
+  uint16_t buffer_size;		/*!< default = 2048 */
+  memif_log2_ring_size_t log2_ring_size;	/*!< default = 10 (1024) */
+  uint8_t is_master;
+
+  memif_interface_id_t interface_id;
+  uint8_t interface_name[32];
+  uint8_t instance_name[32];
+  memif_interface_mode_t mode:8;
+} memif_conn_args_t;
+
+/*! memif receive mode */
+typedef enum
+{
+  MEMIF_RX_MODE_INTERRUPT = 0,	/*!< interrupt mode */
+  MEMIF_RX_MODE_POLLING		/*!< polling mode */
+} memif_rx_mode_t;
+
+/** \brief Memif buffer
+    @param desc_index - ring descriptor index
+    @param buffer_len - shared meory buffer length
+    @param data_len - data length
+    @param data - pointer to shared memory data
+*/
+typedef struct
+{
+  uint16_t desc_index;
+  uint32_t buffer_len;
+  uint32_t data_len;
+  void *data;
+} memif_buffer_t;
+/** @} */
+
+/**
+ * @defgroup MEMIF_DETAILS Memif details structs
+ *
+ * @{
+ */
+
+/** \brief Memif queue details
+    @param qid - queue id
+    @param ring_size - size of ring buffer in sharem memory
+    @param buffer_size - buffer size on sharem memory
+*/
+typedef struct
+{
+  uint8_t qid;
+  uint32_t ring_size;
+  uint16_t buffer_size;
+  /* add ring information */
+} memif_queue_details_t;
+
+/** \brief Memif details
+    @param if_name - interface name
+    @param inst_name - application name
+    @param remote_if_name - peer interface name
+    @param remote_inst_name - peer application name
+    @param id - connection id
+    @param secret - secret
+    @param role - 0 = master, 1 = slave
+    @param mode - 0 = ethernet, 1 = ip , 2 = punt/inject
+    @param socket_filename = socket filename
+    @param rx_queues_num - number of receive queues
+    @param tx_queues_num - number of transmit queues
+    @param rx_queues - struct containing receive queue details
+    @param tx_queues - struct containing transmit queue details
+    @param link_up_down - 1 = up (connected), 2 = down (disconnected)
+*/
+typedef struct
+{
+  uint8_t *if_name;
+  uint8_t *inst_name;
+  uint8_t *remote_if_name;
+  uint8_t *remote_inst_name;
+
+  uint32_t id;
+  uint8_t *secret;		/* optional */
+  uint8_t role;			/* 0 = master, 1 = slave */
+  uint8_t mode;			/* 0 = ethernet, 1 = ip, 2 = punt/inject */
+  uint8_t *socket_filename;
+  uint8_t rx_queues_num;
+  uint8_t tx_queues_num;
+  memif_queue_details_t *rx_queues;
+  memif_queue_details_t *tx_queues;
+
+  uint8_t link_up_down;		/* 1 = up, 0 = down */
+} memif_details_t;
+/** @} */
+
+/**
+ * @defgroup API_CALLS Api calls
+ *
+ * @{
+ */
+
+/** \biref Memif get queue event file descriptor
+    @param conn - memif connection handle
+    @param qid - queue id
+    @param[out] fd - returns event file descriptor
+
+    \return memif_err_t
+*/
+
+int memif_get_queue_efd (memif_conn_handle_t conn, uint16_t qid, int *fd);
+
+/** \brief Memif set rx mode
+    @param conn - memif connection handle
+    @param rx_mode - receive mode
+    @param qid - queue id
+
+    \return memif_err_t
+*/
+int memif_set_rx_mode (memif_conn_handle_t conn, memif_rx_mode_t rx_mode,
+		       uint16_t qid);
+
+/** \brief Memif strerror
+    @param err_code - error code
+
+    Converts error code to error message.
+    
+    \return Error string
+*/
+char *memif_strerror (int err_code);
+
+/** \brief Memif get details
+    @param conn - memif conenction handle
+    @param md - pointer to memif details struct
+    @param buf - buffer containing details strings
+    @param buflen - length of buffer
+
+    \return memif_err_t
+*/
+int memif_get_details (memif_conn_handle_t conn, memif_details_t * md,
+		       char *buf, ssize_t buflen);
+
+/** \brief Memif initialization
+    @param on_control_fd_update - if control fd updates inform user to watch new fd
+    @param app_name - application name
+
+    if param on_control_fd_update is set to NULL,
+    libmemif will handle file descriptor event polling
+    if a valid callback is set, file descriptor event polling needs to be done by
+    user application, all file descriptors and event types will be passed in
+    this callback to user application
+
+    Initialize internal libmemif structures. Create timerfd (used to periodically request connection by
+    disconnected memifs in slave mode, with no additional API call). This fd is passed to user with memif_control_fd_update_t
+    timer is inactive at this state. It activates with if there is at least one memif in slave mode.
+
+    \return memif_err_t
+*/
+int memif_init (memif_control_fd_update_t * on_control_fd_update,
+		char *app_name);
+
+/** \brief Memif cleanup
+
+    Free libmemif internal allocations.
+
+    \return 0
+*/
+int memif_cleanup ();
+
+/** \brief Memory interface create function
+    @param conn - connection handle for user app
+    @param args - memory interface connection arguments
+    @param on_connect - inform user about connected status
+    @param on_disconnect - inform user about disconnected status
+    @param on_interrupt - informs user about interrupt, if set to null user will not be notified about interrupt, user can use memif_get_queue_efd call to get interrupt fd to poll for events
+    @param private_ctx - private contex passed back to user with callback
+
+    Creates memory interface.
+     
+    SLAVE-MODE - 
+        Start timer that will send events to timerfd. If this fd is passed to memif_control_fd_handler
+        every disconnected memif in slave mode will send connection request.
+        On success new fd is passed to user with memif_control_fd_update_t.
+
+    MASTER-MODE - 
+        Create listener socket and pass fd to user with memif_cntrol_fd_update_t.
+        If this fd is passed to memif_control_fd_handler accept will be called and
+        new fd will be passed to user with memif_control_fd_update_t.
+
+
+    \return memif_err_t
+*/
+int memif_create (memif_conn_handle_t * conn, memif_conn_args_t * args,
+		  memif_connection_update_t * on_connect,
+		  memif_connection_update_t * on_disconnect,
+		  memif_interrupt_t * on_interrupt, void *private_ctx);
+
+/** \brief Memif control file descriptor handler
+    @param fd - file descriptor on which the event occured
+    @param events - event type(s) that occured
+
+    If event occures on any control fd, call memif_control_fd_handler.
+    Internal - lib will "identify" fd (timerfd, lsitener, control) and handle event accordingly.
+ 
+    FD-TYPE - 
+        TIMERFD - 
+            Every disconnected memif in slave mode will request connection.
+        LISTENER or CONTROL - 
+            Handle socket messaging (internal connection establishment).
+        INTERRUPT - 
+            Call on_interrupt callback (if set).
+        
+    \return memif_err_t
+
+*/
+int memif_control_fd_handler (int fd, uint8_t events);
+
+/** \brief Memif delete
+    @param conn - pointer to memif connection handle
+
+
+    disconnect session (free queues and regions, close file descriptors, unmap shared memory)
+    set connection handle to NULL, to avoid possible double free
+
+    \return memif_err_t
+*/
+int memif_delete (memif_conn_handle_t * conn);
+
+/** \brief Memif buffer alloc
+    @param conn - memif conenction handle
+    @param qid - number indentifying queue
+    @param bufs - memif buffers
+    @param count - number of memif buffers to allocate
+    @param count_out - returns number of allocated buffers
+
+    \return memif_err_t
+*/
+int memif_buffer_alloc (memif_conn_handle_t conn, uint16_t qid,
+			memif_buffer_t * bufs, uint16_t count,
+			uint16_t * count_out);
+
+/** \brief Memif buffer free
+    @param conn - memif conenction handle
+    @param qid - number indentifying queue
+    @param bufs - memif buffers
+    @param count - number of memif buffers to free
+    @param count_out - returns number of freed buffers
+
+    \return memif_err_t
+*/
+int memif_buffer_free (memif_conn_handle_t conn, uint16_t qid,
+		       memif_buffer_t * bufs, uint16_t count,
+		       uint16_t * count_out);
+
+/** \brief Memif transmit buffer burst
+    @param conn - memif conenction handle
+    @param qid - number indentifying queue
+    @param bufs - memif buffers
+    @param count - number of memif buffers to transmit
+    @param tx - returns number of transmitted buffers
+
+    \return memif_err_t
+*/
+int memif_tx_burst (memif_conn_handle_t conn, uint16_t qid,
+		    memif_buffer_t * bufs, uint16_t count, uint16_t * tx);
+
+/** \brief Memif receive buffer burst
+    @param conn - memif conenction handle
+    @param qid - number indentifying queue
+    @param bufs - memif buffers
+    @param count - number of memif buffers to receive
+    @param rx - returns number of received buffers
+
+    \return memif_err_t
+*/
+int memif_rx_burst (memif_conn_handle_t conn, uint16_t qid,
+		    memif_buffer_t * bufs, uint16_t count, uint16_t * rx);
+
+/** \brief Memif poll event
+    @param timeout - timeout in seconds
+
+    Passive event polling - 
+    timeout = 0 - dont wait for event, check event queue if there is an event and return.
+    timeout = -1 - wait until event
+
+    \return memif_err_t
+*/
+int memif_poll_event (int timeout);
+/** @} */
+
+#endif /* _LIBMEMIF_H_ */
diff --git a/extras/libmemif/src/main.c b/extras/libmemif/src/main.c
new file mode 100644
index 0000000..d1b59ee
--- /dev/null
+++ b/extras/libmemif/src/main.c
@@ -0,0 +1,1810 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <stdint.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <inttypes.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <linux/ip.h>
+#include <linux/icmp.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <netinet/if_ether.h>
+#include <net/if_arp.h>
+#include <asm/byteorder.h>
+#include <byteswap.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/eventfd.h>
+#include <sys/timerfd.h>
+#include <sys/epoll.h>
+#include <signal.h>
+
+/* memif protocol msg, ring and descriptor definitions */
+#include <memif.h>
+/* memif api */
+#include <libmemif.h>
+/* socket messaging functions */
+#include <socket.h>
+/* private structs and functions */
+#include <memif_private.h>
+
+#define ERRLIST_LEN 36
+#define MAX_ERRBUF_LEN 256
+
+#if __x86_x64__
+#define MEMIF_MEMORY_BARRIER() __builtin_ia32_sfence ()
+#else
+#define MEMIF_MEORY_BARRIER() __sync_synchronize ()
+#endif /* __x86_x64__ */
+
+libmemif_main_t libmemif_main;
+int memif_epfd;
+
+static char memif_buf[MAX_ERRBUF_LEN];
+
+const char *memif_errlist[ERRLIST_LEN] = {	/* MEMIF_ERR_SUCCESS */
+  "Success.",
+  /* MEMIF_ERR_SYSCALL */
+  "Unspecified syscall error (build with -DMEMIF_DBG or make debug).",
+  /* MEMIF_ERR_ACCES */
+  "Permission to resoure denied.",
+  /* MEMIF_ERR_NO_FILE */
+  "Socket file does not exist",
+  /* MEMIF_ERR_FILE_LIMIT */
+  "System limit on total numer of open files reached.",
+  /* MEMIF_ERR_PROC_FILE_LIMIT */
+  "Per-process limit on total number of open files reached.",
+  /* MEMIF_ERR_ALREADY */
+  "Connection already requested.",
+  /* MEMIF_ERR_AGAIN */
+  "File descriptor refers to file other than socket, or operation would block.",
+  /* MEMIF_ERR_BAD_FD */
+  "Bad file descriptor.",
+  /* MEMIF_ERR_NOMEM */
+  "Out of memory.",
+  /* MEMIF_ERR_INVAL_ARG */
+  "Invalid argument.",
+  /* MEMIF_ERR_NOCONN */
+  "Memif connection handle does not point to existing conenction",
+  /* MEMIF_ERR_CONN */
+  "Memif connection handle points to existing connection",
+  /* MEMIF_ERR_CB_FDUPDATE */
+  "Callback memif_control_fd_update_t returned error",
+  /* MEMIF_ERR_FILE_NOT_SOCK */
+  "File specified by socket filename exists and is not socket.",
+  /* MEMIF_ERR_NO_SHMFD */
+  "Missing shared memory file descriptor. (internal error)",
+  /* MEMIF_ERR_COOKIE */
+  "Invalid cookie on ring. (internal error)",
+  /* MEMIF_ERR_NOBUF_RING */
+  "Ring buffer full.",
+  /* MEMIF_ERR_NOBUF */
+  "Not enough memif buffers. There are unreceived data in shared memory.",
+  /* MEMIF_ERR_NOBUF_DET */
+  "Not enough space for memif details in suplied buffer. String data might be malformed.",
+  /* MEMIF_ERR_INT_WRITE */
+  "Send interrupt error.",
+  /* MEMIF_ERR_MFMSG */
+  "Malformed message received on control channel.",
+  /* MEMIF_ERR_QID */
+  "Invalid queue id",
+  /* MEMIF_ERR_PROTO */
+  "Incompatible memory interface protocol version.",
+  /* MEMIF_ERR_ID */
+  "Unmatched interface id.",
+  /* MEMIF_ERR_ACCSLAVE */
+  "Slave cannot accept connection reqest.",
+  /* MEMIF_ERR_ALRCONN */
+  "Interface is already connected.",
+  /* MEMIF_ERR_MODE */
+  "Mode mismatch.",
+  /* MEMIF_ERR_SECRET */
+  "Secret mismatch.",
+  /* MEMIF_ERR_NOSECRET */
+  "Secret required.",
+  /* MEMIF_ERR_MAXREG */
+  "Limit on total number of regions reached.",
+  /* MEMIF_ERR_MAXRING */
+  "Limit on total number of ring reached.",
+  /* MEMIF_ERR_NO_INTFD */
+  "Missing interrupt file descriptor. (internal error)",
+  /* MEMIF_ERR_DISCONNECT */
+  "Interface received disconnect request.",
+  /* MEMIF_ERR_DISCONNECTED */
+  "Interface is disconnected.",
+  /* MEMIF_ERR_UNKNOWN_MSG */
+  "Unknown message type received on control channel. (internal error)"
+};
+
+#define MEMIF_ERR_UNDEFINED "undefined error"
+
+char *
+memif_strerror (int err_code)
+{
+  if (err_code >= ERRLIST_LEN)
+    {
+      strncpy (memif_buf, MEMIF_ERR_UNDEFINED, strlen (MEMIF_ERR_UNDEFINED));
+      memif_buf[strlen (MEMIF_ERR_UNDEFINED)] = '\0';
+    }
+  else
+    {
+      strncpy (memif_buf, memif_errlist[err_code],
+	       strlen (memif_errlist[err_code]));
+      memif_buf[strlen (memif_errlist[err_code])] = '\0';
+    }
+  return memif_buf;
+}
+
+#define DBG_TX_BUF (0)
+#define DBG_RX_BUF (1)
+
+#ifdef MEMIF_DBG_SHM
+static void
+print_bytes (void *data, uint16_t len, uint8_t q)
+{
+  if (q == DBG_TX_BUF)
+    printf ("\nTX:\n\t");
+  else
+    printf ("\nRX:\n\t");
+  int i;
+  for (i = 0; i < len; i++)
+    {
+      if (i % 8 == 0)
+	printf ("\n%d:\t", i);
+      printf ("%02X ", ((uint8_t *) (data))[i]);
+    }
+  printf ("\n\n");
+}
+#endif /* MEMIF_DBG */
+
+int
+memif_syscall_error_handler (int err_code)
+{
+  DBG_UNIX ("%s", strerror (err_code));
+
+  if (err_code == 0)
+    return MEMIF_ERR_SUCCESS;
+  if (err_code == EACCES)
+    return MEMIF_ERR_ACCES;
+  if (err_code == ENFILE)
+    return MEMIF_ERR_FILE_LIMIT;
+  if (err_code == EMFILE)
+    return MEMIF_ERR_PROC_FILE_LIMIT;
+  if (err_code == ENOMEM)
+    return MEMIF_ERR_NOMEM;
+/* connection refused if master dows not exist
+    this error would spam the user until master was created */
+  if (err_code == ECONNREFUSED)
+    return MEMIF_ERR_SUCCESS;
+  if (err_code == EALREADY)
+    return MEMIF_ERR_ALREADY;
+  if (err_code == EAGAIN)
+    return MEMIF_ERR_AGAIN;
+  if (err_code == EBADF)
+    return MEMIF_ERR_BAD_FD;
+  if (err_code == ENOENT)
+    return MEMIF_ERR_NO_FILE;
+
+  /* other syscall errors */
+  return MEMIF_ERR_SYSCALL;
+}
+
+static int
+memif_add_epoll_fd (int fd, uint32_t events)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = events;
+  evt.data.fd = fd;
+  if (epoll_ctl (memif_epfd, EPOLL_CTL_ADD, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d added to epoll", fd);
+  return 0;
+}
+
+static int
+memif_mod_epoll_fd (int fd, uint32_t events)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = events;
+  evt.data.fd = fd;
+  if (epoll_ctl (memif_epfd, EPOLL_CTL_MOD, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d moddified on epoll", fd);
+  return 0;
+}
+
+static int
+memif_del_epoll_fd (int fd)
+{
+  if (fd < 0)
+    {
+      DBG ("invalid fd %d", fd);
+      return -1;
+    }
+  struct epoll_event evt;
+  memset (&evt, 0, sizeof (evt));
+  if (epoll_ctl (memif_epfd, EPOLL_CTL_DEL, fd, &evt) < 0)
+    {
+      DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
+      return -1;
+    }
+  DBG ("fd %d removed from epoll", fd);
+  return 0;
+}
+
+int
+memif_control_fd_update (int fd, uint8_t events)
+{
+  if (events & MEMIF_FD_EVENT_DEL)
+    return memif_del_epoll_fd (fd);
+
+  uint32_t evt = 0;
+  if (events & MEMIF_FD_EVENT_READ)
+    evt |= EPOLLIN;
+  if (events & MEMIF_FD_EVENT_WRITE)
+    evt |= EPOLLOUT;
+
+  if (events & MEMIF_FD_EVENT_MOD)
+    return memif_mod_epoll_fd (fd, evt);
+
+  return memif_add_epoll_fd (fd, evt);
+}
+
+int
+add_list_elt (memif_list_elt_t * e, memif_list_elt_t ** list, uint16_t * len)
+{
+  libmemif_main_t *lm = &libmemif_main;
+
+  int i;
+  for (i = 0; i < *len; i++)
+    {
+      if ((*list)[i].data_struct == NULL)
+	{
+	  (*list)[i].key = e->key;
+	  (*list)[i].data_struct = e->data_struct;
+	  return i;
+	}
+    }
+  memif_list_elt_t *tmp;
+  tmp = realloc (*list, sizeof (memif_list_elt_t) * *len * 2);
+  if (tmp == NULL)
+    return -1;
+
+  for (i = *len; i < *len * 2; i++)
+    {
+      tmp[i].key = -1;
+      tmp[i].data_struct = NULL;
+    }
+
+  tmp[*len].key = e->key;
+  tmp[*len].data_struct = e->data_struct;
+  i = *len;
+  *len = *len * 2;
+  *list = tmp;
+
+  return i;
+}
+
+int
+get_list_elt (memif_list_elt_t ** e, memif_list_elt_t * list, uint16_t len,
+	      int key)
+{
+  if (key == -1)
+    {
+      *e = NULL;
+      return -1;
+    }
+  int i;
+  for (i = 0; i < len; i++)
+    {
+      if (list[i].key == key)
+	{
+	  *e = &list[i];
+	  return 0;
+	}
+    }
+  *e = NULL;
+  return -1;
+}
+
+/* does not free memory, only marks element as free */
+int
+free_list_elt (memif_list_elt_t * list, uint16_t len, int key)
+{
+  int i;
+  for (i = 0; i < len; i++)
+    {
+      if (list[i].key == key)
+	{
+	  list[i].key = -1;
+	  list[i].data_struct = NULL;
+	  return 0;
+	}
+    }
+
+  return -1;
+}
+
+int
+free_list_elt_ctx (memif_list_elt_t * list, uint16_t len,
+		   memif_connection_t * ctx)
+{
+  int i;
+  for (i = 0; i < len; i++)
+    {
+      if (list[i].key == -1)
+	{
+	  if (list[i].data_struct == ctx)
+	    {
+	      list[i].data_struct = NULL;
+	      return 0;
+	    }
+	}
+    }
+
+  return -1;
+}
+
+static void
+memif_control_fd_update_register (memif_control_fd_update_t * cb)
+{
+  libmemif_main_t *lm = &libmemif_main;
+  lm->control_fd_update = cb;
+}
+
+int
+memif_init (memif_control_fd_update_t * on_control_fd_update, char *app_name)
+{
+  int err = MEMIF_ERR_SUCCESS;	/* 0 */
+  libmemif_main_t *lm = &libmemif_main;
+
+  if (app_name)
+    {
+      lm->app_name = malloc (strlen (app_name) + sizeof (char));
+      memset (lm->app_name, 0, strlen (app_name) + sizeof (char));
+      strncpy ((char *) lm->app_name, app_name, strlen (app_name));
+    }
+  else
+    {
+      lm->app_name = malloc (strlen (MEMIF_DEFAULT_APP_NAME) + sizeof (char));
+      memset (lm->app_name, 0, strlen (app_name) + sizeof (char));
+      strncpy ((char *) lm->app_name, MEMIF_DEFAULT_APP_NAME,
+	       strlen (MEMIF_DEFAULT_APP_NAME));
+    }
+
+  /* register control fd update callback */
+  if (on_control_fd_update != NULL)
+    memif_control_fd_update_register (on_control_fd_update);
+  else
+    {
+      memif_epfd = epoll_create (1);
+      memif_control_fd_update_register (memif_control_fd_update);
+      DBG ("libmemif event polling initialized");
+    }
+
+  memset (&lm->ms, 0, sizeof (memif_socket_t));
+
+  lm->control_list_len = 2;
+  lm->interrupt_list_len = 2;
+  lm->listener_list_len = 1;
+  lm->pending_list_len = 1;
+
+  lm->control_list =
+    malloc (sizeof (memif_list_elt_t) * lm->control_list_len);
+  lm->interrupt_list =
+    malloc (sizeof (memif_list_elt_t) * lm->interrupt_list_len);
+  lm->listener_list =
+    malloc (sizeof (memif_list_elt_t) * lm->listener_list_len);
+  lm->pending_list =
+    malloc (sizeof (memif_list_elt_t) * lm->pending_list_len);
+
+  int i;
+  for (i = 0; i < lm->control_list_len; i++)
+    {
+      lm->control_list[i].key = -1;
+      lm->control_list[i].data_struct = NULL;
+    }
+  for (i = 0; i < lm->interrupt_list_len; i++)
+    {
+      lm->interrupt_list[i].key = -1;
+      lm->interrupt_list[i].data_struct = NULL;
+    }
+  for (i = 0; i < lm->listener_list_len; i++)
+    {
+      lm->listener_list[i].key = -1;
+      lm->listener_list[i].data_struct = NULL;
+    }
+  for (i = 0; i < lm->pending_list_len; i++)
+    {
+      lm->pending_list[i].key = -1;
+      lm->pending_list[i].data_struct = NULL;
+    }
+
+  lm->disconn_slaves = 0;
+
+  lm->timerfd = timerfd_create (CLOCK_REALTIME, TFD_NONBLOCK);
+  if (lm->timerfd < 0)
+    {
+      err = errno;
+      DBG ("timerfd: %s", strerror (err));
+      return memif_syscall_error_handler (err);
+    }
+
+  lm->arm.it_value.tv_sec = 2;
+  lm->arm.it_value.tv_nsec = 0;
+  lm->arm.it_interval.tv_sec = 2;
+  lm->arm.it_interval.tv_nsec = 0;
+  memset (&lm->disarm, 0, sizeof (lm->disarm));
+
+  if (lm->control_fd_update (lm->timerfd, MEMIF_FD_EVENT_READ) < 0)
+    {
+      DBG ("callback type memif_control_fd_update_t error!");
+      return MEMIF_ERR_CB_FDUPDATE;
+    }
+
+  return 0;
+}
+
+static inline memif_ring_t *
+memif_get_ring (memif_connection_t * conn, memif_ring_type_t type,
+		uint16_t ring_num)
+{
+  if (&conn->regions[0] == NULL)
+    return NULL;
+  void *p = conn->regions[0].shm;
+  int ring_size =
+    sizeof (memif_ring_t) +
+    sizeof (memif_desc_t) * (1 << conn->run_args.log2_ring_size);
+  p += (ring_num + type * conn->run_args.num_s2m_rings) * ring_size;
+
+  return (memif_ring_t *) p;
+}
+
+int
+memif_set_rx_mode (memif_conn_handle_t c, memif_rx_mode_t rx_mode,
+		   uint16_t qid)
+{
+  memif_connection_t *conn = (memif_connection_t *) c;
+  if (conn == NULL)
+    return MEMIF_ERR_NOCONN;
+  uint8_t num =
+    (conn->args.is_master) ? conn->run_args.num_s2m_rings : conn->run_args.
+    num_m2s_rings;
+  if (qid >= num)
+    return MEMIF_ERR_QID;
+
+  conn->rx_queues[qid].ring->flags = rx_mode;
+  DBG ("rx_mode flag: %u", conn->rx_queues[qid].ring->flags);
+  return MEMIF_ERR_SUCCESS;
+}
+
+int
+memif_create (memif_conn_handle_t * c, memif_conn_args_t * args,
+	      memif_connection_update_t * on_connect,
+	      memif_connection_update_t * on_disconnect,
+	      memif_interrupt_t * on_interrupt, void *private_ctx)
+{
+  int err, i, index, sockfd = -1;
+  memif_list_elt_t list_elt;
+  memif_connection_t *conn = (memif_connection_t *) * c;
+  if (conn != NULL)
+    {
+      DBG ("This handle already points to existing memif.");
+      return MEMIF_ERR_CONN;
+    }
+  conn = (memif_connection_t *) malloc (sizeof (memif_connection_t));
+  if (conn == NULL)
+    {
+      err = memif_syscall_error_handler (errno);
+      goto error;
+    }
+  memset (conn, 0, sizeof (memif_connection_t));
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  conn->args.interface_id = args->interface_id;
+
+  if (args->log2_ring_size == 0)
+    args->log2_ring_size = MEMIF_DEFAULT_LOG2_RING_SIZE;
+  if (args->buffer_size == 0)
+    args->buffer_size = MEMIF_DEFAULT_BUFFER_SIZE;
+  if (args->num_s2m_rings == 0)
+    args->num_s2m_rings = MEMIF_DEFAULT_TX_QUEUES;
+  if (args->num_m2s_rings == 0)
+    args->num_m2s_rings = MEMIF_DEFAULT_RX_QUEUES;
+
+  conn->args.num_s2m_rings = args->num_s2m_rings;
+  conn->args.num_m2s_rings = args->num_m2s_rings;
+  conn->args.buffer_size = args->buffer_size;
+  conn->args.log2_ring_size = args->log2_ring_size;
+  conn->args.is_master = args->is_master;
+  conn->args.mode = args->mode;
+  conn->msg_queue = NULL;
+  conn->regions = NULL;
+  conn->tx_queues = NULL;
+  conn->rx_queues = NULL;
+  conn->fd = -1;
+  conn->on_connect = on_connect;
+  conn->on_disconnect = on_disconnect;
+  conn->on_interrupt = on_interrupt;
+  conn->private_ctx = private_ctx;
+  memset (&conn->run_args, 0, sizeof (memif_conn_run_args_t));
+
+  uint8_t l = strlen ((char *) args->interface_name);
+  strncpy ((char *) conn->args.interface_name, (char *) args->interface_name,
+	   l);
+
+  l = strlen ((char *) args->instance_name);
+  strncpy ((char *) conn->args.instance_name, (char *) args->instance_name,
+	   l);
+
+  /* allocate and initialize socket_filename so it can be copyed to sun_path
+     without memory leaks */
+  conn->args.socket_filename = malloc (sizeof (char *) * 108);
+  memset (conn->args.socket_filename, 0, 108 * sizeof (char *));
+
+  if (args->socket_filename)
+    {
+      if (conn->args.socket_filename == NULL)
+	{
+	  err = memif_syscall_error_handler (errno);
+	  goto error;
+	}
+      strncpy ((char *) conn->args.socket_filename,
+	       (char *) args->socket_filename,
+	       strlen ((char *) args->socket_filename));
+    }
+  else
+    {
+      uint16_t sdl = strlen (MEMIF_DEFAULT_SOCKET_DIR);
+      uint16_t sfl = strlen (MEMIF_DEFAULT_SOCKET_FILENAME);
+      if (conn->args.socket_filename == NULL)
+	{
+	  err = memif_syscall_error_handler (errno);
+	  goto error;
+	}
+      strncpy ((char *) conn->args.socket_filename,
+	       MEMIF_DEFAULT_SOCKET_DIR, sdl);
+      conn->args.socket_filename[sdl] = '/';
+      strncpy ((char *) (conn->args.socket_filename + 1 + sdl),
+	       MEMIF_DEFAULT_SOCKET_FILENAME, sfl);
+    }
+
+  if (args->secret)
+    {
+      l = strlen ((char *) args->secret);
+      strncpy ((char *) conn->args.secret, (char *) args->secret, l);
+    }
+
+  if (conn->args.is_master)
+    {
+      conn->run_args.buffer_size = conn->args.buffer_size;
+      memif_socket_t *ms;
+      memif_list_elt_t elt;
+      for (i = 0; i < lm->listener_list_len; i++)
+	{
+	  if ((ms =
+	       (memif_socket_t *) lm->listener_list[i].data_struct) != NULL)
+	    {
+	      if (strncmp
+		  ((char *) ms->filename, (char *) conn->args.socket_filename,
+		   strlen ((char *) ms->filename)) == 0)
+		{
+		  /* add interface to listener socket */
+		  elt.key = conn->args.interface_id;
+		  *c = elt.data_struct = conn;
+		  add_list_elt (&elt, &ms->interface_list,
+				&ms->interface_list_len);
+		  ms->use_count++;
+		  conn->listener_fd = ms->fd;
+		  break;
+		}
+	    }
+	  else
+	    {
+	      struct stat file_stat;
+	      if (stat ((char *) conn->args.socket_filename, &file_stat) == 0)
+		{
+		  if (S_ISSOCK (file_stat.st_mode))
+		    unlink ((char *) conn->args.socket_filename);
+		  else
+		    return memif_syscall_error_handler (errno);
+		}
+	      DBG ("creating socket file");
+	      ms = malloc (sizeof (memif_socket_t));
+	      ms->filename = malloc (strlen ((char *) conn->args.
+					     socket_filename) +
+				     sizeof (char));
+	      memset (ms->filename, 0,
+		      strlen ((char *) conn->args.socket_filename) +
+		      sizeof (char));
+	      strncpy ((char *) ms->filename,
+		       (char *) conn->args.socket_filename,
+		       strlen ((char *) conn->args.socket_filename));
+	      ms->interface_list_len = 1;
+	      ms->interface_list =
+		malloc (sizeof (memif_list_elt_t) * ms->interface_list_len);
+	      ms->interface_list[0].key = -1;
+	      ms->interface_list[0].data_struct = NULL;
+	      struct sockaddr_un un = { 0 };
+	      int on = 1;
+
+	      ms->fd = socket (AF_UNIX, SOCK_SEQPACKET, 0);
+	      if (ms->fd < 0)
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+	      DBG ("socket %d created", ms->fd);
+	      un.sun_family = AF_UNIX;
+	      strncpy ((char *) un.sun_path, (char *) ms->filename,
+		       sizeof (un.sun_path) - 1);
+	      DBG ("sockopt");
+	      if (setsockopt
+		  (ms->fd, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on)) < 0)
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+	      DBG ("bind");
+	      if (bind (ms->fd, (struct sockaddr *) &un, sizeof (un)) < 0)
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+	      DBG ("listen");
+	      if (listen (ms->fd, 1) < 0)
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+	      DBG ("stat");
+	      if (stat ((char *) ms->filename, &file_stat) < 0)
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+
+	      /* add interface to listener socket */
+	      elt.key = conn->args.interface_id;
+	      *c = elt.data_struct = conn;
+	      add_list_elt (&elt, &ms->interface_list,
+			    &ms->interface_list_len);
+	      ms->use_count = 1;
+	      conn->listener_fd = ms->fd;
+
+	      /* add listener socket to libmemif main */
+	      elt.key = ms->fd;
+	      elt.data_struct = ms;
+	      add_list_elt (&elt, &lm->listener_list, &lm->listener_list_len);
+	      lm->control_fd_update (ms->fd, MEMIF_FD_EVENT_READ);
+	      break;
+	    }
+	}
+    }
+  else
+    {
+      if (lm->disconn_slaves == 0)
+	{
+	  if (timerfd_settime (lm->timerfd, 0, &lm->arm, NULL) < 0)
+	    {
+	      err = memif_syscall_error_handler (errno);
+	      goto error;
+	    }
+	}
+
+      lm->disconn_slaves++;
+
+      list_elt.key = -1;
+      *c = list_elt.data_struct = conn;
+      if ((index =
+	   add_list_elt (&list_elt, &lm->control_list,
+			 &lm->control_list_len)) < 0)
+	{
+	  err = MEMIF_ERR_NOMEM;
+	  goto error;
+	}
+    }
+
+  conn->index = index;
+
+  return 0;
+
+error:
+  if (sockfd > 0)
+    close (sockfd);
+  sockfd = -1;
+  if (conn->args.socket_filename)
+    free (conn->args.socket_filename);
+  if (conn != NULL)
+    free (conn);
+  *c = conn = NULL;
+  return err;
+}
+
+int
+memif_control_fd_handler (int fd, uint8_t events)
+{
+  int i, rv, sockfd = -1, err = MEMIF_ERR_SUCCESS;	/* 0 */
+  uint16_t num;
+  memif_list_elt_t *e = NULL;
+  memif_connection_t *conn;
+  libmemif_main_t *lm = &libmemif_main;
+  if (fd == lm->timerfd)
+    {
+      uint64_t b;
+      ssize_t size;
+      size = read (fd, &b, sizeof (b));
+      for (i = 0; i < lm->control_list_len; i++)
+	{
+	  if ((lm->control_list[i].key < 0)
+	      && (lm->control_list[i].data_struct != NULL))
+	    {
+	      conn = lm->control_list[i].data_struct;
+	      if (conn->args.is_master)
+		continue;
+
+	      struct sockaddr_un sun;
+	      sockfd = socket (AF_UNIX, SOCK_SEQPACKET, 0);
+	      if (sockfd < 0)
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+
+	      sun.sun_family = AF_UNIX;
+
+	      strncpy (sun.sun_path, conn->args.socket_filename,
+		       sizeof (sun.sun_path) - 1);
+
+	      if (connect (sockfd, (struct sockaddr *) &sun,
+			   sizeof (struct sockaddr_un)) == 0)
+		{
+		  conn->fd = sockfd;
+		  conn->read_fn = memif_conn_fd_read_ready;
+		  conn->write_fn = memif_conn_fd_write_ready;
+		  conn->error_fn = memif_conn_fd_error;
+
+		  lm->control_list[conn->index].key = conn->fd;
+
+		  lm->control_fd_update (sockfd,
+					 MEMIF_FD_EVENT_READ |
+					 MEMIF_FD_EVENT_WRITE);
+
+		  lm->disconn_slaves--;
+		  if (lm->disconn_slaves == 0)
+		    {
+		      if (timerfd_settime (lm->timerfd, 0, &lm->disarm, NULL)
+			  < 0)
+			{
+			  err = memif_syscall_error_handler (errno);
+			  goto error;
+			}
+		    }
+		}
+	      else
+		{
+		  err = memif_syscall_error_handler (errno);
+		  goto error;
+		}
+	    }
+	}
+    }
+  else
+    {
+      get_list_elt (&e, lm->interrupt_list, lm->interrupt_list_len, fd);
+      if (e != NULL)
+	{
+	  if (((memif_connection_t *) e->data_struct)->on_interrupt != NULL)
+	    {
+	      num =
+		(((memif_connection_t *) e->data_struct)->args.
+		 is_master) ? ((memif_connection_t *) e->data_struct)->
+		run_args.num_s2m_rings : ((memif_connection_t *) e->
+					  data_struct)->run_args.
+		num_m2s_rings;
+	      for (i = 0; i < num; i++)
+		{
+		  if (((memif_connection_t *) e->data_struct)->rx_queues[i].
+		      int_fd == fd)
+		    {
+		      ((memif_connection_t *) e->data_struct)->on_interrupt ((void *) e->data_struct, ((memif_connection_t *) e->data_struct)->private_ctx, i);
+		      return MEMIF_ERR_SUCCESS;
+		    }
+		}
+	    }
+	  return MEMIF_ERR_SUCCESS;
+	}
+      get_list_elt (&e, lm->listener_list, lm->listener_list_len, fd);
+      if (e != NULL)
+	{
+	  memif_conn_fd_accept_ready ((memif_socket_t *) e->data_struct);
+	  return MEMIF_ERR_SUCCESS;
+	}
+
+      get_list_elt (&e, lm->pending_list, lm->pending_list_len, fd);
+      if (e != NULL)
+	{
+	  memif_read_ready (fd);
+	  return MEMIF_ERR_SUCCESS;
+	}
+
+      get_list_elt (&e, lm->control_list, lm->control_list_len, fd);
+      if (e != NULL)
+	{
+	  if (events & MEMIF_FD_EVENT_READ)
+	    {
+	      err =
+		((memif_connection_t *) e->data_struct)->read_fn (e->
+								  data_struct);
+	      if (err != MEMIF_ERR_SUCCESS)
+		return err;
+	    }
+	  if (events & MEMIF_FD_EVENT_WRITE)
+	    {
+	      err =
+		((memif_connection_t *) e->data_struct)->write_fn (e->
+								   data_struct);
+	      if (err != MEMIF_ERR_SUCCESS)
+		return err;
+	    }
+	  if (events & MEMIF_FD_EVENT_ERROR)
+	    {
+	      err =
+		((memif_connection_t *) e->data_struct)->error_fn (e->
+								   data_struct);
+	      if (err != MEMIF_ERR_SUCCESS)
+		return err;
+	    }
+	}
+    }
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+
+error:
+  if (sockfd > 0)
+    close (sockfd);
+  sockfd = -1;
+  return err;
+}
+
+int
+memif_poll_event (int timeout)
+{
+  libmemif_main_t *lm = &libmemif_main;
+  memif_list_elt_t *elt;
+  struct epoll_event evt, *e;
+  int en = 0, err = MEMIF_ERR_SUCCESS, i = 0;	/* 0 */
+  uint16_t num;
+  uint32_t events = 0;
+  memset (&evt, 0, sizeof (evt));
+  evt.events = EPOLLIN | EPOLLOUT;
+  sigset_t sigset;
+  sigemptyset (&sigset);
+  en = epoll_pwait (memif_epfd, &evt, 1, timeout, &sigset);
+  if (en < 0)
+    {
+      DBG ("epoll_pwait: %s", strerror (errno));
+      return -1;
+    }
+  if (en > 0)
+    {
+      if (evt.events & EPOLLIN)
+	events |= MEMIF_FD_EVENT_READ;
+      if (evt.events & EPOLLOUT)
+	events |= MEMIF_FD_EVENT_WRITE;
+      if (evt.events & EPOLLERR)
+	events |= MEMIF_FD_EVENT_ERROR;
+      err = memif_control_fd_handler (evt.data.fd, events);
+      return err;
+    }
+  return 0;
+}
+
+static void
+memif_msg_queue_free (memif_msg_queue_elt_t ** e)
+{
+  if (*e == NULL)
+    return;
+  memif_msg_queue_free (&(*e)->next);
+  free (*e);
+  *e = NULL;
+  return;
+}
+
+/* send disconnect msg and close interface */
+int
+memif_disconnect_internal (memif_connection_t * c)
+{
+  if (c == NULL)
+    {
+      DBG ("no connection");
+      return MEMIF_ERR_NOCONN;
+    }
+  uint16_t num;
+  int err = MEMIF_ERR_SUCCESS, i;	/* 0 */
+  memif_queue_t *mq;
+  libmemif_main_t *lm = &libmemif_main;
+  memif_list_elt_t *e;
+
+  c->on_disconnect ((void *) c, c->private_ctx);
+
+  if (c->fd > 0)
+    {
+      memif_msg_send_disconnect (c->fd, "interface deleted", 0);
+      lm->control_fd_update (c->fd, MEMIF_FD_EVENT_DEL);
+      close (c->fd);
+    }
+  get_list_elt (&e, lm->control_list, lm->control_list_len, c->fd);
+  if (e != NULL)
+    {
+      if (c->args.is_master)
+	free_list_elt (lm->control_list, lm->control_list_len, c->fd);
+      e->key = c->fd = -1;
+    }
+
+  if (c->tx_queues != NULL)
+    {
+      num =
+	(c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
+	num_s2m_rings;
+      for (i = 0; i < num; i++)
+	{
+	  mq = &c->tx_queues[i];
+	  if (mq != NULL)
+	    {
+	      if (mq->int_fd > 0)
+		close (mq->int_fd);
+	      free_list_elt (lm->interrupt_list, lm->interrupt_list_len,
+			     mq->int_fd);
+	      mq->int_fd = -1;
+	    }
+	}
+      free (c->tx_queues);
+      c->tx_queues = NULL;
+    }
+
+  if (c->rx_queues != NULL)
+    {
+      num =
+	(c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
+	num_m2s_rings;
+      for (i = 0; i < num; i++)
+	{
+	  mq = &c->rx_queues[i];
+	  if (mq != NULL)
+	    {
+	      if (mq->int_fd > 0)
+		{
+		  if (c->on_interrupt != NULL)
+		    lm->control_fd_update (mq->int_fd, MEMIF_FD_EVENT_DEL);
+		  close (mq->int_fd);
+		}
+	      free_list_elt (lm->interrupt_list, lm->interrupt_list_len,
+			     mq->int_fd);
+	      mq->int_fd = -1;
+	    }
+	}
+      free (c->rx_queues);
+      c->rx_queues = NULL;
+    }
+
+  if (c->regions != NULL)
+    {
+      if (munmap (c->regions[0].shm, c->regions[0].region_size) < 0)
+	return memif_syscall_error_handler (errno);
+      if (c->regions[0].fd > 0)
+	close (c->regions[0].fd);
+      c->regions[0].fd = -1;
+      free (c->regions);
+      c->regions = NULL;
+    }
+
+  memset (&c->run_args, 0, sizeof (memif_conn_run_args_t));
+
+  memif_msg_queue_free (&c->msg_queue);
+
+  if (!(c->args.is_master))
+    {
+      if (lm->disconn_slaves == 0)
+	{
+	  if (timerfd_settime (lm->timerfd, 0, &lm->arm, NULL) < 0)
+	    {
+	      err = memif_syscall_error_handler (errno);
+	      DBG_UNIX ("timerfd_settime: arm");
+	    }
+	}
+      lm->disconn_slaves++;
+    }
+
+  return err;
+}
+
+int
+memif_delete (memif_conn_handle_t * conn)
+{
+  memif_connection_t *c = (memif_connection_t *) * conn;
+  if (c == NULL)
+    {
+      DBG ("no connection");
+      return MEMIF_ERR_NOCONN;
+    }
+  libmemif_main_t *lm = &libmemif_main;
+  memif_list_elt_t *e = NULL;
+  memif_socket_t *ms = NULL;
+
+  int err = MEMIF_ERR_SUCCESS;
+
+  if (c->fd > 0)
+    {
+      DBG ("DISCONNECTING");
+      err = memif_disconnect_internal (c);
+      if (err == MEMIF_ERR_NOCONN)
+	return err;
+    }
+
+  free_list_elt_ctx (lm->control_list, lm->control_list_len, c);
+
+  if (c->args.is_master)
+    {
+      get_list_elt (&e, lm->listener_list, lm->listener_list_len,
+		    c->listener_fd);
+      if (e != NULL)
+	{
+	  ms = (memif_socket_t *) e->data_struct;
+	  ms->use_count--;
+	  free_list_elt (ms->interface_list, ms->interface_list_len,
+			 c->args.interface_id);
+	  if (ms->use_count <= 0)
+	    {
+	      lm->control_fd_update (c->listener_fd, MEMIF_FD_EVENT_DEL);
+	      free_list_elt (lm->listener_list, lm->listener_list_len,
+			     c->listener_fd);
+	      close (c->listener_fd);
+	      c->listener_fd = ms->fd = -1;
+	      free (ms->interface_list);
+	      ms->interface_list = NULL;
+	      free (ms->filename);
+	      ms->filename = NULL;
+	      free (ms);
+	      ms = NULL;
+	    }
+	}
+    }
+  else
+    {
+      lm->disconn_slaves--;
+      if (lm->disconn_slaves <= 0)
+	{
+	  if (timerfd_settime (lm->timerfd, 0, &lm->disarm, NULL) < 0)
+	    {
+	      err = memif_syscall_error_handler (errno);
+	      DBG ("timerfd_settime: disarm");
+	    }
+	}
+    }
+
+  if (c->args.socket_filename)
+    free (c->args.socket_filename);
+  c->args.socket_filename = NULL;
+
+  free (c);
+  c = NULL;
+
+  *conn = c;
+  return err;
+}
+
+int
+memif_connect1 (memif_connection_t * c)
+{
+  libmemif_main_t *lm = &libmemif_main;
+  memif_region_t *mr = c->regions;
+  memif_queue_t *mq;
+  int i;
+  uint16_t num;
+
+  if (mr != NULL)
+    {
+      if (!mr->shm)
+	{
+	  if (mr->fd < 0)
+	    return MEMIF_ERR_NO_SHMFD;
+
+	  if ((mr->shm = mmap (NULL, mr->region_size, PROT_READ | PROT_WRITE,
+			       MAP_SHARED, mr->fd, 0)) == MAP_FAILED)
+	    {
+	      return memif_syscall_error_handler (errno);
+	    }
+	}
+    }
+
+  num =
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
+    num_s2m_rings;
+  for (i = 0; i < num; i++)
+    {
+      mq = &c->tx_queues[i];
+      if (mq != NULL)
+	{
+	  mq->ring = c->regions[mq->region].shm + mq->offset;
+	  if (mq->ring->cookie != MEMIF_COOKIE)
+	    {
+	      DBG ("wrong cookie on tx ring %u", i);
+	      return MEMIF_ERR_COOKIE;
+	    }
+	  mq->ring->head = mq->ring->tail = mq->last_head = mq->alloc_bufs =
+	    0;
+	}
+    }
+  num =
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
+    num_m2s_rings;
+  for (i = 0; i < num; i++)
+    {
+      mq = &c->rx_queues[i];
+      if (mq != NULL)
+	{
+	  mq->ring = c->regions[mq->region].shm + mq->offset;
+	  if (mq->ring->cookie != MEMIF_COOKIE)
+	    {
+	      DBG ("wrong cookie on rx ring %u", i);
+	      return MEMIF_ERR_COOKIE;
+	    }
+	  mq->ring->head = mq->ring->tail = mq->last_head = mq->alloc_bufs =
+	    0;
+	}
+    }
+
+  lm->control_fd_update (c->fd, MEMIF_FD_EVENT_READ | MEMIF_FD_EVENT_MOD);
+
+  return 0;
+}
+
+int
+memif_init_regions_and_queues (memif_connection_t * conn)
+{
+  memif_ring_t *ring = NULL;
+  uint64_t buffer_offset;
+  memif_region_t *r;
+  int i, j;
+  libmemif_main_t *lm = &libmemif_main;
+  memif_list_elt_t e;
+
+  conn->regions = (memif_region_t *) malloc (sizeof (memif_region_t));
+  if (conn->regions == NULL)
+    return memif_syscall_error_handler (errno);
+  r = conn->regions;
+
+  buffer_offset =
+    (conn->run_args.num_s2m_rings +
+     conn->run_args.num_m2s_rings) * (sizeof (memif_ring_t) +
+				      sizeof (memif_desc_t) *
+				      (1 << conn->run_args.log2_ring_size));
+
+  r->region_size = buffer_offset +
+    conn->run_args.buffer_size * (1 << conn->run_args.log2_ring_size) *
+    (conn->run_args.num_s2m_rings + conn->run_args.num_m2s_rings);
+
+  if ((r->fd = memfd_create ("memif region 0", MFD_ALLOW_SEALING)) == -1)
+    return memif_syscall_error_handler (errno);
+/*
+    if ((fcntl (r->fd, F_ADD_SEALS, F_SEAL_SHRINK)) == -1)
+        return memif_syscall_error_handler (errno);
+*/
+  if ((ftruncate (r->fd, r->region_size)) == -1)
+    return memif_syscall_error_handler (errno);
+
+  if ((r->shm = mmap (NULL, r->region_size, PROT_READ | PROT_WRITE,
+		      MAP_SHARED, r->fd, 0)) == MAP_FAILED)
+    return memif_syscall_error_handler (errno);
+
+  for (i = 0; i < conn->run_args.num_s2m_rings; i++)
+    {
+      ring = memif_get_ring (conn, MEMIF_RING_S2M, i);
+      DBG ("RING: %p I: %d", ring, i);
+      ring->head = ring->tail = 0;
+      ring->cookie = MEMIF_COOKIE;
+      ring->flags = 0;
+      for (j = 0; j < (1 << conn->run_args.log2_ring_size); j++)
+	{
+	  uint16_t slot = i * (1 << conn->run_args.log2_ring_size) + j;
+	  ring->desc[j].region = 0;
+	  ring->desc[j].offset = buffer_offset +
+	    (uint32_t) (slot * conn->run_args.buffer_size);
+	  ring->desc[j].buffer_length = conn->run_args.buffer_size;
+	}
+    }
+  for (i = 0; i < conn->run_args.num_m2s_rings; i++)
+    {
+      ring = memif_get_ring (conn, MEMIF_RING_M2S, i);
+      DBG ("RING: %p I: %d", ring, i);
+      ring->head = ring->tail = 0;
+      ring->cookie = MEMIF_COOKIE;
+      ring->flags = 0;
+      for (j = 0; j < (1 << conn->run_args.log2_ring_size); j++)
+	{
+	  uint16_t slot =
+	    (i +
+	     conn->run_args.num_s2m_rings) *
+	    (1 << conn->run_args.log2_ring_size) + j;
+	  ring->desc[j].region = 0;
+	  ring->desc[j].offset = buffer_offset +
+	    (uint32_t) (slot * conn->run_args.buffer_size);
+	  ring->desc[j].buffer_length = conn->run_args.buffer_size;
+	}
+    }
+  memif_queue_t *mq;
+  mq =
+    (memif_queue_t *) malloc (sizeof (memif_queue_t) *
+			      conn->run_args.num_s2m_rings);
+  if (mq == NULL)
+    return memif_syscall_error_handler (errno);
+  int x;
+  for (x = 0; x < conn->run_args.num_s2m_rings; x++)
+    {
+      if ((mq[x].int_fd = eventfd (0, EFD_NONBLOCK)) < 0)
+	return memif_syscall_error_handler (errno);
+      /* add int fd to interrupt fd list */
+      e.key = mq[x].int_fd;
+      e.data_struct = conn;
+      add_list_elt (&e, &lm->interrupt_list, &lm->interrupt_list_len);
+
+      mq[x].ring = memif_get_ring (conn, MEMIF_RING_S2M, x);
+      DBG ("RING: %p I: %d", mq[x].ring, x);
+      mq[x].log2_ring_size = conn->run_args.log2_ring_size;
+      mq[x].region = 0;
+      mq[x].offset =
+	(void *) mq[x].ring - (void *) conn->regions[mq->region].shm;
+      mq[x].last_head = 0;
+      mq[x].alloc_bufs = 0;
+    }
+  conn->tx_queues = mq;
+
+  mq =
+    (memif_queue_t *) malloc (sizeof (memif_queue_t) *
+			      conn->run_args.num_m2s_rings);
+  if (mq == NULL)
+    return memif_syscall_error_handler (errno);
+  for (x = 0; x < conn->run_args.num_m2s_rings; x++)
+    {
+      if ((mq[x].int_fd = eventfd (0, EFD_NONBLOCK)) < 0)
+	return memif_syscall_error_handler (errno);
+      /* add int fd to interrupt fd list */
+      e.key = mq[x].int_fd;
+      e.data_struct = conn;
+      add_list_elt (&e, &lm->interrupt_list, &lm->interrupt_list_len);
+
+      mq[x].ring = memif_get_ring (conn, MEMIF_RING_M2S, x);
+      DBG ("RING: %p I: %d", mq[x].ring, x);
+      mq[x].log2_ring_size = conn->run_args.log2_ring_size;
+      mq[x].region = 0;
+      mq[x].offset =
+	(void *) mq[x].ring - (void *) conn->regions[mq->region].shm;
+      mq[x].last_head = 0;
+      mq[x].alloc_bufs = 0;
+    }
+  conn->rx_queues = mq;
+
+  return 0;
+}
+
+int
+memif_buffer_alloc (memif_conn_handle_t conn, uint16_t qid,
+		    memif_buffer_t * bufs, uint16_t count,
+		    uint16_t * count_out)
+{
+  memif_connection_t *c = (memif_connection_t *) conn;
+  if (c == NULL)
+    return MEMIF_ERR_NOCONN;
+  if (c->fd < 0)
+    return MEMIF_ERR_DISCONNECTED;
+  uint8_t num =
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
+    num_s2m_rings;
+  if (qid >= num)
+    return MEMIF_ERR_QID;
+  memif_queue_t *mq = &c->tx_queues[qid];
+  memif_ring_t *ring = mq->ring;
+  memif_buffer_t *b0, *b1;
+  uint16_t mask = (1 << mq->log2_ring_size) - 1;
+  uint16_t s0, s1, ns;
+  *count_out = 0;
+  int err = MEMIF_ERR_SUCCESS;	/* 0 */
+
+  if (ring->tail != ring->head)
+    {
+      if (ring->head > ring->tail)
+	ns = (1 << mq->log2_ring_size) - ring->head + ring->tail;
+      else
+	ns = ring->tail - ring->head;
+    }
+  else
+    ns = (1 << mq->log2_ring_size);
+
+  /* (head == tail) ? receive function will asume that no packets are available */
+  ns -= 1;
+
+  while (count && ns)
+    {
+      while ((count > 2) && (ns > 2))
+	{
+	  s0 = (ring->head + mq->alloc_bufs + *count_out) & mask;
+	  s1 = (ring->head + mq->alloc_bufs + *count_out + 1) & mask;
+
+	  b0 = (bufs + *count_out);
+	  b1 = (bufs + *count_out + 1);
+
+	  b0->desc_index = s0;
+	  b1->desc_index = s1;
+	  b0->buffer_len = ring->desc[s0].buffer_length;
+	  b1->buffer_len = ring->desc[s1].buffer_length;
+	  /* TODO: support multiple regions -> ring descriptor contains region index */
+	  b0->data = c->regions->shm + ring->desc[s0].offset;
+	  b1->data = c->regions->shm + ring->desc[s1].offset;
+
+	  DBG ("allocated ring slots %u, %u", s0, s1);
+	  count -= 2;
+	  ns -= 2;
+	  *count_out += 2;
+	}
+      s0 = (ring->head + mq->alloc_bufs + *count_out) & mask;
+
+      b0 = (bufs + *count_out);
+
+      b0->desc_index = s0;
+      b0->buffer_len = ring->desc[s0].buffer_length;
+      b0->data = c->regions->shm + ring->desc[s0].offset;
+
+      DBG ("allocated ring slot %u", s0);
+      count--;
+      ns--;
+      *count_out += 1;
+    }
+
+  mq->alloc_bufs += *count_out;
+  DBG ("allocated: %u/%u bufs. Total %u allocated bufs", *count_out, count,
+       mq->alloc_bufs);
+
+  if (count)
+    {
+      DBG ("ring buffer full! qid: %u", qid);
+      err = MEMIF_ERR_NOBUF_RING;
+    }
+
+  return err;
+}
+
+int
+memif_buffer_free (memif_conn_handle_t conn, uint16_t qid,
+		   memif_buffer_t * bufs, uint16_t count,
+		   uint16_t * count_out)
+{
+  memif_connection_t *c = (memif_connection_t *) conn;
+  if (c == NULL)
+    return MEMIF_ERR_NOCONN;
+  if (c->fd < 0)
+    return MEMIF_ERR_DISCONNECTED;
+  uint8_t num =
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
+    num_m2s_rings;
+  if (qid >= num)
+    return MEMIF_ERR_QID;
+  libmemif_main_t *lm = &libmemif_main;
+  memif_queue_t *mq = &c->rx_queues[qid];
+  memif_ring_t *ring = mq->ring;
+  uint16_t tail = ring->tail;
+  uint16_t mask = (1 << mq->log2_ring_size) - 1;
+  memif_buffer_t *b0, *b1;
+  *count_out = 0;
+
+  if (mq->alloc_bufs < count)
+    count = mq->alloc_bufs;
+
+  while (count)
+    {
+      while (count > 2)
+	{
+	  b0 = (bufs + *count_out);
+	  b1 = (bufs + *count_out + 1);
+	  tail = (b0->desc_index + 1) & mask;
+	  tail = (b1->desc_index + 1) & mask;
+	  b0->data = NULL;
+	  b1->data = NULL;
+
+	  count -= 2;
+	  *count_out += 2;
+	  mq->alloc_bufs -= 2;
+	}
+      b0 = (bufs + *count_out);
+      tail = (b0->desc_index + 1) & mask;
+      b0->data = NULL;
+
+      count--;
+      *count_out += 1;
+      mq->alloc_bufs--;
+    }
+  MEMIF_MEORY_BARRIER ();
+  ring->tail = tail;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+int
+memif_tx_burst (memif_conn_handle_t conn, uint16_t qid,
+		memif_buffer_t * bufs, uint16_t count, uint16_t * tx)
+{
+  memif_connection_t *c = (memif_connection_t *) conn;
+  if (c == NULL)
+    return MEMIF_ERR_NOCONN;
+  if (c->fd < 0)
+    return MEMIF_ERR_DISCONNECTED;
+  uint8_t num =
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
+    num_s2m_rings;
+  if (qid >= num)
+    return MEMIF_ERR_QID;
+  memif_queue_t *mq = &c->tx_queues[qid];
+  memif_ring_t *ring = mq->ring;
+  uint16_t head = ring->head;
+  uint16_t mask = (1 << mq->log2_ring_size) - 1;
+  *tx = 0;
+  memif_buffer_t *b0, *b1;
+
+  while (count)
+    {
+      while (count > 2)
+	{
+	  b0 = (bufs + *tx);
+	  b1 = (bufs + *tx + 1);
+	  ring->desc[b0->desc_index].length = b0->data_len;
+	  ring->desc[b1->desc_index].length = b1->data_len;
+
+#ifdef MEMIF_DBG_SHM
+	  print_bytes (b0->data, b0->data_len, DBG_TX_BUF);
+	  print_bytes (b1->data, b1->data_len, DBG_TX_BUF);
+#endif
+
+	  head = (b0->desc_index + 1) & mask;
+	  head = (b1->desc_index + 1) & mask;
+
+	  b0->data = NULL;
+	  b0->data_len = 0;
+	  b1->data = NULL;
+	  b1->data_len = 0;
+
+	  count -= 2;
+	  *tx += 2;
+	}
+
+      b0 = (bufs + *tx);
+      ring->desc[b0->desc_index].length = b0->data_len;
+
+#ifdef MEMIF_DBG_SHM
+      print_bytes (b0->data, b0->data_len, DBG_TX_BUF);
+#endif
+
+      head = (b0->desc_index + 1) & mask;
+
+      b0->data = NULL;
+      b0->data_len = 0;
+
+      count--;
+      *tx += 1;
+    }
+  MEMIF_MEORY_BARRIER ();
+  ring->head = head;
+
+  mq->alloc_bufs -= *tx;
+
+  if ((ring->flags & MEMIF_RING_FLAG_MASK_INT) == 0)
+    {
+      uint64_t a = 1;
+      int r = write (mq->int_fd, &a, sizeof (a));
+      if (r < 0)
+	return MEMIF_ERR_INT_WRITE;
+    }
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+int
+memif_rx_burst (memif_conn_handle_t conn, uint16_t qid,
+		memif_buffer_t * bufs, uint16_t count, uint16_t * rx)
+{
+  memif_connection_t *c = (memif_connection_t *) conn;
+  if (c == NULL)
+    return MEMIF_ERR_NOCONN;
+  if (c->fd < 0)
+    return MEMIF_ERR_DISCONNECTED;
+  uint8_t num =
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
+    num_m2s_rings;
+  if (qid >= num)
+    return MEMIF_ERR_QID;
+  memif_queue_t *mq = &c->rx_queues[qid];
+  memif_ring_t *ring = mq->ring;
+  uint16_t head = ring->head;
+  uint16_t ns;
+  uint16_t mask = (1 << mq->log2_ring_size) - 1;
+  memif_buffer_t *b0, *b1;
+  *rx = 0;
+
+  uint64_t b;
+  ssize_t r = read (mq->int_fd, &b, sizeof (b));
+  if ((r == -1) && (errno != EAGAIN))
+    return memif_syscall_error_handler (errno);
+
+  if (head == mq->last_head)
+    return 0;
+
+  if (head > mq->last_head)
+    ns = head - mq->last_head;
+  else
+    ns = (1 << mq->log2_ring_size) - mq->last_head + head;
+
+  while (ns && count)
+    {
+      while ((ns > 2) && (count > 2))
+	{
+	  b0 = (bufs + *rx);
+	  b1 = (bufs + *rx + 1);
+
+	  b0->desc_index = mq->last_head;
+	  b1->desc_index = mq->last_head + 1;
+	  b0->data = memif_get_buffer (conn, ring, mq->last_head);
+	  b1->data = memif_get_buffer (conn, ring, mq->last_head + 1);
+	  b0->data_len = ring->desc[mq->last_head].length;
+	  b1->data_len = ring->desc[mq->last_head + 1].length;
+	  b0->buffer_len = ring->desc[mq->last_head].buffer_length;
+	  b1->buffer_len = ring->desc[mq->last_head + 1].buffer_length;
+
+#ifdef MEMIF_DBG_SHM
+	  print_bytes (b0->data, b0->data_len, DBG_RX_BUF);
+	  print_bytes (b1->data, b1->data_len, DBG_RX_BUF);
+#endif
+
+	  mq->last_head = (mq->last_head + 2) & mask;
+
+	  ns -= 2;
+	  count -= 2;
+	  *rx += 2;
+	}
+      b0 = (bufs + *rx);
+
+      b0->desc_index = mq->last_head;
+      b0->data = memif_get_buffer (conn, ring, mq->last_head);
+      b0->data_len = ring->desc[mq->last_head].length;
+      b0->buffer_len = ring->desc[mq->last_head].buffer_length;
+
+#ifdef MEMIF_DBG_SHM
+      print_bytes (b0->data, b0->data_len, DBG_RX_BUF);
+#endif
+
+      mq->last_head = (mq->last_head + 1) & mask;
+
+      ns--;
+      count--;
+      *rx += 1;
+    }
+
+  mq->alloc_bufs += *rx;
+
+  if (ns)
+    {
+      DBG ("not enough buffers!");
+      return MEMIF_ERR_NOBUF;
+    }
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+int
+memif_get_details (memif_conn_handle_t conn, memif_details_t * md,
+		   char *buf, ssize_t buflen)
+{
+  memif_connection_t *c = (memif_connection_t *) conn;
+  if (c == NULL)
+    return MEMIF_ERR_NOCONN;
+
+  int err = MEMIF_ERR_SUCCESS, i;
+  ssize_t l0, l1, total_l;
+  l0 = 0;
+
+  l1 = strlen ((char *) c->args.interface_name);
+  if (l0 + l1 <= buflen)
+    {
+      md->if_name = strncpy (buf + l0, (char *) c->args.interface_name, l1);
+      md->if_name[l0 + l1] = '\0';
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  l1 = strlen ((char *) c->args.instance_name);
+  if (l0 + l1 <= buflen)
+    {
+      md->inst_name = strncpy (buf + l0, (char *) c->args.instance_name, l1);
+      md->inst_name[l0 + l1] = '\0';
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  l1 = strlen ((char *) c->remote_if_name);
+  if (l0 + l1 <= buflen)
+    {
+      md->remote_if_name = strncpy (buf + l0, (char *) c->remote_if_name, l1);
+      md->remote_if_name[l0 + l1] = '\0';
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  l1 = strlen ((char *) c->remote_name);
+  if (l0 + l1 <= buflen)
+    {
+      md->remote_inst_name = strncpy (buf + l0, (char *) c->remote_name, l1);
+      md->remote_inst_name[l0 + l1] = '\0';
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  md->id = c->args.interface_id;
+
+  if (c->args.secret)
+    {
+      l1 = strlen ((char *) c->args.secret);
+      md->secret = strncpy (buf + l0, (char *) c->args.secret, l1);
+      md->secret[l0 + l1] = '\0';
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  md->role = (c->args.is_master) ? 0 : 1;
+  md->mode = c->args.mode;
+
+  l1 = strlen ((char *) c->args.socket_filename);
+  if (l0 + l1 <= buflen)
+    {
+      md->socket_filename =
+	strncpy (buf + l0, (char *) c->args.socket_filename, l1);
+      md->socket_filename[l0 + l1] = '\0';
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  md->rx_queues_num =
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
+    num_m2s_rings;
+
+  l1 = sizeof (memif_queue_details_t) * md->rx_queues_num;
+  if (l0 + l1 <= buflen)
+    {
+      md->rx_queues = (memif_queue_details_t *) buf + l0;
+      l0 = l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  for (i = 0; i < md->rx_queues_num; i++)
+    {
+      md->rx_queues[i].qid = i;
+      md->rx_queues[i].ring_size = (1 << c->rx_queues[i].log2_ring_size);
+      md->rx_queues[i].buffer_size = c->run_args.buffer_size;
+    }
+
+  md->tx_queues_num =
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
+    num_s2m_rings;
+
+  l1 = sizeof (memif_queue_details_t) * md->tx_queues_num;
+  if (l0 + l1 <= buflen)
+    {
+      md->tx_queues = (memif_queue_details_t *) buf + l0;
+      l0 = l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
+  for (i = 0; i < md->tx_queues_num; i++)
+    {
+      md->tx_queues[i].qid = i;
+      md->tx_queues[i].ring_size = (1 << c->tx_queues[i].log2_ring_size);
+      md->tx_queues[i].buffer_size = c->run_args.buffer_size;
+    }
+
+  md->link_up_down = (c->fd > 0) ? 1 : 0;
+
+  return err;			/* 0 */
+}
+
+int
+memif_get_queue_efd (memif_conn_handle_t conn, uint16_t qid, int *efd)
+{
+  memif_connection_t *c = (memif_connection_t *) conn;
+  *efd = -1;
+  if (c == NULL)
+    return MEMIF_ERR_NOCONN;
+  if (c->fd < 0)
+    return MEMIF_ERR_DISCONNECTED;
+  uint8_t num =
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
+    num_m2s_rings;
+  if (qid >= num)
+    return MEMIF_ERR_QID;
+
+  *efd = c->rx_queues[qid].int_fd;
+
+  return MEMIF_ERR_SUCCESS;
+}
+
+int
+memif_cleanup ()
+{
+  libmemif_main_t *lm = &libmemif_main;
+  if (lm->app_name)
+    free (lm->app_name);
+  lm->app_name = NULL;
+  if (lm->control_list)
+    free (lm->control_list);
+  lm->control_list = NULL;
+  if (lm->interrupt_list)
+    free (lm->interrupt_list);
+  lm->interrupt_list = NULL;
+  if (lm->listener_list)
+    free (lm->listener_list);
+  lm->listener_list = NULL;
+  if (lm->pending_list)
+    free (lm->pending_list);
+  lm->pending_list = NULL;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
diff --git a/extras/libmemif/src/memif.h b/extras/libmemif/src/memif.h
new file mode 100644
index 0000000..11918ea
--- /dev/null
+++ b/extras/libmemif/src/memif.h
@@ -0,0 +1,185 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#ifndef _MEMIF_H_
+#define _MEMIF_H_
+
+#ifndef MEMIF_CACHELINE_SIZE
+#define MEMIF_CACHELINE_SIZE 64
+#endif
+
+#define MEMIF_COOKIE		0x3E31F10
+#define MEMIF_VERSION_MAJOR	1
+#define MEMIF_VERSION_MINOR	0
+#define MEMIF_VERSION		((MEMIF_VERSION_MAJOR << 8) | MEMIF_VERSION_MINOR)
+
+/*
+ *  Type definitions
+ */
+
+typedef enum memif_msg_type
+{
+  MEMIF_MSG_TYPE_NONE = 0,
+  MEMIF_MSG_TYPE_ACK = 1,
+  MEMIF_MSG_TYPE_HELLO = 2,
+  MEMIF_MSG_TYPE_INIT = 3,
+  MEMIF_MSG_TYPE_ADD_REGION = 4,
+  MEMIF_MSG_TYPE_ADD_RING = 5,
+  MEMIF_MSG_TYPE_CONNECT = 6,
+  MEMIF_MSG_TYPE_CONNECTED = 7,
+  MEMIF_MSG_TYPE_DISCONNECT = 8,
+} memif_msg_type_t;
+
+typedef enum
+{
+  MEMIF_RING_S2M = 0,
+  MEMIF_RING_M2S = 1
+} memif_ring_type_t;
+
+typedef enum
+{
+  MEMIF_INTERFACE_MODE_ETHERNET = 0,
+  MEMIF_INTERFACE_MODE_IP = 1,
+  MEMIF_INTERFACE_MODE_PUNT_INJECT = 2,
+} memif_interface_mode_t;
+
+typedef uint16_t memif_region_index_t;
+typedef uint64_t memif_region_offset_t;
+typedef uint64_t memif_region_size_t;
+typedef uint16_t memif_ring_index_t;
+typedef uint32_t memif_interface_id_t;
+typedef uint16_t memif_version_t;
+typedef uint8_t memif_log2_ring_size_t;
+
+/*
+ *  Socket messages
+ */
+
+typedef struct __attribute__ ((packed))
+{
+  uint8_t name[32];
+  memif_version_t min_version;
+  memif_version_t max_version;
+  memif_region_index_t max_region;
+  memif_ring_index_t max_m2s_ring;
+  memif_ring_index_t max_s2m_ring;
+  memif_log2_ring_size_t max_log2_ring_size;
+} memif_msg_hello_t;
+
+typedef struct __attribute__ ((packed))
+{
+  memif_version_t version;
+  memif_interface_id_t id;
+  memif_interface_mode_t mode:8;
+  uint8_t secret[24];
+  uint8_t name[32];
+} memif_msg_init_t;
+
+typedef struct __attribute__ ((packed))
+{
+  memif_region_index_t index;
+  memif_region_size_t size;
+} memif_msg_add_region_t;
+
+typedef struct __attribute__ ((packed))
+{
+  uint16_t flags;
+#define MEMIF_MSG_ADD_RING_FLAG_S2M	(1 << 0)
+  memif_ring_index_t index;
+  memif_region_index_t region;
+  memif_region_offset_t offset;
+  memif_log2_ring_size_t log2_ring_size;
+} memif_msg_add_ring_t;
+
+typedef struct __attribute__ ((packed))
+{
+  uint8_t if_name[32];
+} memif_msg_connect_t;
+
+typedef struct __attribute__ ((packed))
+{
+  uint8_t if_name[32];
+} memif_msg_connected_t;
+
+typedef struct __attribute__ ((packed))
+{
+  uint32_t code;
+  uint8_t string[96];
+} memif_msg_disconnect_t;
+
+typedef struct __attribute__ ((packed, aligned (128)))
+{
+  memif_msg_type_t type:16;
+  union
+  {
+    memif_msg_hello_t hello;
+    memif_msg_init_t init;
+    memif_msg_add_region_t add_region;
+    memif_msg_add_ring_t add_ring;
+    memif_msg_connect_t connect;
+    memif_msg_connected_t connected;
+    memif_msg_disconnect_t disconnect;
+  };
+} memif_msg_t;
+
+_Static_assert (sizeof (memif_msg_t) == 128,
+		"Size of memif_msg_t must be 128");
+
+/*
+ *  Ring and Descriptor Layout
+ */
+
+typedef struct __attribute__ ((packed))
+{
+  uint16_t flags;
+#define MEMIF_DESC_FLAG_NEXT (1 << 0)
+  memif_region_index_t region;
+  uint32_t buffer_length;
+  uint32_t length;
+  uint8_t reserved[4];
+  memif_region_offset_t offset;
+  uint64_t metadata;
+} memif_desc_t;
+
+_Static_assert (sizeof (memif_desc_t) == 32,
+		"Size of memif_dsct_t must be 32");
+
+#define MEMIF_CACHELINE_ALIGN_MARK(mark) \
+  uint8_t mark[0] __attribute__((aligned(MEMIF_CACHELINE_SIZE)))
+
+typedef struct
+{
+  MEMIF_CACHELINE_ALIGN_MARK (cacheline0);
+  uint32_t cookie;
+  uint16_t flags;
+#define MEMIF_RING_FLAG_MASK_INT 1
+  volatile uint16_t head;
+    MEMIF_CACHELINE_ALIGN_MARK (cacheline1);
+  volatile uint16_t tail;
+    MEMIF_CACHELINE_ALIGN_MARK (cacheline2);
+  memif_desc_t desc[0];
+} memif_ring_t;
+
+#endif /* _MEMIF_H_ */
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/extras/libmemif/src/memif_private.h b/extras/libmemif/src/memif_private.h
new file mode 100644
index 0000000..51f3be6
--- /dev/null
+++ b/extras/libmemif/src/memif_private.h
@@ -0,0 +1,265 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+
+#ifndef _MEMIF_PRIVATE_H_
+#define _MEMIF_PRIVATE_H_
+
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <sys/timerfd.h>
+
+#include <libmemif.h>
+
+#define MEMIF_DEFAULT_SOCKET_DIR "/run/vpp"
+#define MEMIF_DEFAULT_SOCKET_FILENAME  "memif.sock"
+#define MEMIF_DEFAULT_RING_SIZE 1024
+#define MEMIF_DEFAULT_LOG2_RING_SIZE 10
+#define MEMIF_DEFAULT_RX_QUEUES 1
+#define MEMIF_DEFAULT_TX_QUEUES 1
+#define MEMIF_DEFAULT_BUFFER_SIZE 2048
+
+#define MEMIF_MAX_M2S_RING		255
+#define MEMIF_MAX_S2M_RING		255
+#define MEMIF_MAX_REGION		255
+#define MEMIF_MAX_LOG2_RING_SIZE	14
+
+#define MEMIF_MAX_FDS 512
+
+
+#ifdef MEMIF_DBG
+#define DBG(...) do {                                                             \
+                        printf("MEMIF_DEBUG:%s:%s:%d: ", __FILE__, __func__, __LINE__);  \
+                        printf(__VA_ARGS__);                                            \
+                        printf("\n");                                                   \
+                        } while (0)
+
+#define DBG_UNIX(...) do {                                                        \
+                      printf("MEMIF_DEBUG_UNIX:%s:%s:%d: ", __FILE__, __func__, __LINE__);  \
+                      printf(__VA_ARGS__);                                    \
+                      printf("\n");                                           \
+                      } while (0)
+
+#define error_return_unix(...) do {                                             \
+                                DBG_UNIX(__VA_ARGS__);                          \
+                                return -1;                                      \
+                                } while (0)
+#define error_return(...) do {                                                  \
+                            DBG(__VA_ARGS__);                                   \
+                            return -1;                                          \
+                            } while (0)
+#else
+#define DBG(...)
+#define DBG_UNIX(...)
+#define error_return_unix(...) do {                                             \
+                                return -1;                                      \
+                                } while (0)
+#define error_return(...) do {                                                  \
+                            return -1;                                          \
+                            } while (0)
+
+#endif /* MEMIF_DBG */
+
+typedef struct
+{
+  void *shm;
+  uint32_t region_size;
+  int fd;
+} memif_region_t;
+
+typedef struct
+{
+  memif_ring_t *ring;
+  uint8_t log2_ring_size;
+  uint8_t region;
+  uint32_t offset;
+
+  uint16_t last_head;
+  uint16_t last_tail;
+
+  int int_fd;
+
+  uint64_t int_count;
+  uint32_t alloc_bufs;
+} memif_queue_t;
+
+typedef struct memif_msg_queue_elt
+{
+  memif_msg_t msg;
+  int fd;
+  struct memif_msg_queue_elt *next;
+} memif_msg_queue_elt_t;
+
+struct memif_connection;
+
+typedef struct memif_connection memif_connection_t;
+
+/* functions called by memif_control_fd_handler */
+typedef int (memif_fn) (memif_connection_t * conn);
+
+typedef struct
+{
+  uint8_t num_s2m_rings;
+  uint8_t num_m2s_rings;
+  uint16_t buffer_size;
+  memif_log2_ring_size_t log2_ring_size;
+} memif_conn_run_args_t;
+
+typedef struct memif_connection
+{
+  uint16_t index;
+  memif_conn_args_t args;
+  memif_conn_run_args_t run_args;
+
+  int fd;
+  int listener_fd;
+
+  memif_fn *write_fn, *read_fn, *error_fn;
+
+  memif_connection_update_t *on_connect, *on_disconnect;
+  memif_interrupt_t *on_interrupt;
+  void *private_ctx;
+
+  /* connection message queue */
+  memif_msg_queue_elt_t *msg_queue;
+
+  uint8_t remote_if_name[32];
+  uint8_t remote_name[32];
+  uint8_t remote_disconnect_string[96];
+
+  memif_region_t *regions;
+
+  memif_queue_t *rx_queues;
+  memif_queue_t *tx_queues;
+
+  uint16_t flags;
+#define MEMIF_CONNECTION_FLAG_WRITE (1 << 0)
+} memif_connection_t;
+
+/*
+ * WIP
+ */
+typedef struct
+{
+  int key;			/* fd or id */
+  void *data_struct;
+} memif_list_elt_t;
+
+/*
+ * WIP
+ */
+typedef struct
+{
+  int fd;
+  uint16_t use_count;
+  uint8_t *filename;
+  uint16_t interface_list_len;
+  memif_list_elt_t *interface_list;	/* memif master interfaces listening on this socket */
+} memif_socket_t;
+
+/*
+ * WIP
+ */
+/* probably function like memif_cleanup () will need to be called to close timerfd */
+typedef struct
+{
+  memif_control_fd_update_t *control_fd_update;
+  int timerfd;
+  struct itimerspec arm, disarm;
+  uint16_t disconn_slaves;
+  uint8_t *app_name;
+
+  /* master implementation... */
+  memif_socket_t ms;
+
+  uint16_t control_list_len;
+  uint16_t interrupt_list_len;
+  uint16_t listener_list_len;
+  uint16_t pending_list_len;
+  memif_list_elt_t *control_list;
+  memif_list_elt_t *interrupt_list;
+  memif_list_elt_t *listener_list;
+  memif_list_elt_t *pending_list;
+} libmemif_main_t;
+
+extern libmemif_main_t libmemif_main;
+extern int memif_epfd;
+
+/* main.c */
+
+/* if region doesn't contain shared memory, mmap region, check ring cookie */
+int memif_connect1 (memif_connection_t * c);
+
+/* memory map region, initalize rings and queues */
+int memif_init_regions_and_queues (memif_connection_t * c);
+
+int memif_disconnect_internal (memif_connection_t * c);
+
+/* map errno to memif error code */
+int memif_syscall_error_handler (int err_code);
+
+int add_list_elt (memif_list_elt_t * e, memif_list_elt_t ** list,
+		  uint16_t * len);
+
+int get_list_elt (memif_list_elt_t ** e, memif_list_elt_t * list,
+		  uint16_t len, int key);
+
+int free_list_elt (memif_list_elt_t * list, uint16_t len, int key);
+
+#ifndef __NR_memfd_create
+#if defined __x86_64__
+#define __NR_memfd_create 319
+#elif defined __arm__
+#define __NR_memfd_create 385
+#elif defined __aarch64__
+#define __NR_memfd_create 279
+#else
+#error "__NR_memfd_create unknown for this architecture"
+#endif
+#endif
+
+static inline int
+memfd_create (const char *name, unsigned int flags)
+{
+  return syscall (__NR_memfd_create, name, flags);
+}
+
+static inline void *
+memif_get_buffer (memif_connection_t * conn, memif_ring_t * ring,
+		  uint16_t index)
+{
+  return (conn->regions[ring->desc[index].region].shm +
+	  ring->desc[index].offset);
+}
+
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#define MFD_ALLOW_SEALING       0x0002U
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+
+#define F_SEAL_SEAL     0x0001	/* prevent further seals from being set */
+#define F_SEAL_SHRINK   0x0002	/* prevent file from shrinking */
+#define F_SEAL_GROW     0x0004	/* prevent file from growing */
+#define F_SEAL_WRITE    0x0008	/* prevent writes */
+
+#endif /* _MEMIF_PRIVATE_H_ */
diff --git a/extras/libmemif/src/socket.c b/extras/libmemif/src/socket.c
new file mode 100644
index 0000000..9c9b3a8
--- /dev/null
+++ b/extras/libmemif/src/socket.c
@@ -0,0 +1,883 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#define _GNU_SOURCE
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <socket.h>
+#include <memif.h>
+
+#define memif_min(a,b) ((a < b) ? (a) : (b))
+
+/* sends msg to socket */
+static_fn int
+memif_msg_send (int fd, memif_msg_t * msg, int afd)
+{
+  struct msghdr mh = { 0 };
+  struct iovec iov[1];
+  char ctl[CMSG_SPACE (sizeof (int))];
+  int rv, err = MEMIF_ERR_SUCCESS;	/* 0 */
+
+  iov[0].iov_base = (void *) msg;
+  iov[0].iov_len = sizeof (memif_msg_t);
+  mh.msg_iov = iov;
+  mh.msg_iovlen = 1;
+
+  if (afd > 0)
+    {
+      struct cmsghdr *cmsg;
+      memset (&ctl, 0, sizeof (ctl));
+      mh.msg_control = ctl;
+      mh.msg_controllen = sizeof (ctl);
+      cmsg = CMSG_FIRSTHDR (&mh);
+      cmsg->cmsg_len = CMSG_LEN (sizeof (int));
+      cmsg->cmsg_level = SOL_SOCKET;
+      cmsg->cmsg_type = SCM_RIGHTS;
+      memcpy (CMSG_DATA (cmsg), &afd, sizeof (int));
+    }
+  rv = sendmsg (fd, &mh, 0);
+  if (rv < 0)
+    err = memif_syscall_error_handler (errno);
+  DBG ("Message type %u sent", msg->type);
+  return err;
+}
+
+/* response from memif master - master is ready to handle next message */
+static_fn int
+memif_msg_enq_ack (memif_connection_t * c)
+{
+  memif_msg_queue_elt_t *e =
+    (memif_msg_queue_elt_t *) malloc (sizeof (memif_msg_queue_elt_t));
+  if (e == NULL)
+    return memif_syscall_error_handler (errno);
+
+  memset (&e->msg, 0, sizeof (e->msg));
+  e->msg.type = MEMIF_MSG_TYPE_ACK;
+  e->fd = -1;
+
+  e->next = NULL;
+  if (c->msg_queue == NULL)
+    {
+      c->msg_queue = e;
+      return MEMIF_ERR_SUCCESS;	/* 0 */
+    }
+
+  memif_msg_queue_elt_t *cur = c->msg_queue;
+  while (cur->next != NULL)
+    {
+      cur = cur->next;
+    }
+  cur->next = e;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+static_fn int
+memif_msg_send_hello (int fd)
+{
+  libmemif_main_t *lm = &libmemif_main;
+  memif_msg_t msg = { 0 };
+  memif_msg_hello_t *h = &msg.hello;
+  msg.type = MEMIF_MSG_TYPE_HELLO;
+  h->min_version = MEMIF_VERSION;
+  h->max_version = MEMIF_VERSION;
+  h->max_s2m_ring = MEMIF_MAX_M2S_RING;
+  h->max_m2s_ring = MEMIF_MAX_M2S_RING;
+  h->max_region = MEMIF_MAX_REGION;
+  h->max_log2_ring_size = MEMIF_MAX_LOG2_RING_SIZE;
+
+  strncpy ((char *) h->name, lm->app_name, strlen (lm->app_name));
+
+  /* msg hello is not enqueued but sent directly,
+     because it is the first msg to be sent */
+  return memif_msg_send (fd, &msg, -1);
+}
+
+/* send id and secret (optional) for interface identification */
+static_fn int
+memif_msg_enq_init (memif_connection_t * c)
+{
+  memif_msg_queue_elt_t *e =
+    (memif_msg_queue_elt_t *) malloc (sizeof (memif_msg_queue_elt_t));
+  if (e == NULL)
+    return memif_syscall_error_handler (errno);
+  memset (e, 0, sizeof (memif_msg_queue_elt_t));
+
+  memset (&e->msg, 0, sizeof (e->msg));
+  memif_msg_init_t *i = &e->msg.init;
+
+  e->msg.type = MEMIF_MSG_TYPE_INIT;
+  e->fd = -1;
+  i->version = MEMIF_VERSION;
+  i->id = c->args.interface_id;
+  i->mode = c->args.mode;
+
+  strncpy ((char *) i->name, (char *) c->args.instance_name,
+	   strlen ((char *) c->args.instance_name));
+  if (c->args.secret)
+    strncpy ((char *) i->secret, (char *) c->args.secret, sizeof (i->secret));
+
+  e->next = NULL;
+  if (c->msg_queue == NULL)
+    {
+      c->msg_queue = e;
+      return MEMIF_ERR_SUCCESS;	/* 0 */
+    }
+
+  memif_msg_queue_elt_t *cur = c->msg_queue;
+  while (cur->next != NULL)
+    {
+      cur = cur->next;
+    }
+  cur->next = e;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* send information about region specified by region_index */
+static_fn int
+memif_msg_enq_add_region (memif_connection_t * c, uint8_t region_index)
+{
+  /* maybe check if region is valid? */
+  memif_region_t *mr = &c->regions[region_index];
+
+  memif_msg_queue_elt_t *e =
+    (memif_msg_queue_elt_t *) malloc (sizeof (memif_msg_queue_elt_t));
+  if (e == NULL)
+    return memif_syscall_error_handler (errno);
+
+  memset (&e->msg, 0, sizeof (e->msg));
+  memif_msg_add_region_t *ar = &e->msg.add_region;
+
+  e->msg.type = MEMIF_MSG_TYPE_ADD_REGION;
+  e->fd = mr->fd;
+  ar->index = region_index;
+  ar->size = mr->region_size;
+
+  e->next = NULL;
+  if (c->msg_queue == NULL)
+    {
+      c->msg_queue = e;
+      return MEMIF_ERR_SUCCESS;	/* 0 */
+    }
+
+  memif_msg_queue_elt_t *cur = c->msg_queue;
+  while (cur->next != NULL)
+    {
+      cur = cur->next;
+    }
+  cur->next = e;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* send information about ring specified by direction (S2M | M2S) and index */
+static_fn int
+memif_msg_enq_add_ring (memif_connection_t * c, uint8_t index, uint8_t dir)
+{
+  memif_msg_queue_elt_t *e =
+    (memif_msg_queue_elt_t *) malloc (sizeof (memif_msg_queue_elt_t));
+  if (e == NULL)
+    return memif_syscall_error_handler (errno);
+
+  memset (&e->msg, 0, sizeof (e->msg));
+  memif_msg_add_ring_t *ar = &e->msg.add_ring;
+
+  e->msg.type = MEMIF_MSG_TYPE_ADD_RING;
+
+  /* TODO: support multiple rings */
+  memif_queue_t *mq;
+  if (dir == MEMIF_RING_M2S)
+    mq = &c->rx_queues[index];
+  else
+    mq = &c->tx_queues[index];
+
+  e->fd = mq->int_fd;
+  ar->index = index;
+  ar->offset = mq->offset;
+  ar->region = mq->region;
+  ar->log2_ring_size = mq->log2_ring_size;
+  ar->flags = (dir == MEMIF_RING_S2M) ? MEMIF_MSG_ADD_RING_FLAG_S2M : 0;
+
+  e->next = NULL;
+  if (c->msg_queue == NULL)
+    {
+      c->msg_queue = e;
+      return MEMIF_ERR_SUCCESS;	/* 0 */
+    }
+
+  memif_msg_queue_elt_t *cur = c->msg_queue;
+  while (cur->next != NULL)
+    {
+      cur = cur->next;
+    }
+  cur->next = e;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* used as connection request from slave */
+static_fn int
+memif_msg_enq_connect (memif_connection_t * c)
+{
+  memif_msg_queue_elt_t *e =
+    (memif_msg_queue_elt_t *) malloc (sizeof (memif_msg_queue_elt_t));
+  if (e == NULL)
+    return memif_syscall_error_handler (errno);
+
+  memset (&e->msg, 0, sizeof (e->msg));
+  memif_msg_connect_t *cm = &e->msg.connect;
+
+  e->msg.type = MEMIF_MSG_TYPE_CONNECT;
+  e->fd = -1;
+  strncpy ((char *) cm->if_name, (char *) c->args.interface_name,
+	   strlen ((char *) c->args.interface_name));
+
+  e->next = NULL;
+  if (c->msg_queue == NULL)
+    {
+      c->msg_queue = e;
+      return MEMIF_ERR_SUCCESS;	/* 0 */
+    }
+
+  memif_msg_queue_elt_t *cur = c->msg_queue;
+  while (cur->next != NULL)
+    {
+      cur = cur->next;
+    }
+  cur->next = e;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* used as confirmation of connection by master */
+static_fn int
+memif_msg_enq_connected (memif_connection_t * c)
+{
+  memif_msg_queue_elt_t *e =
+    (memif_msg_queue_elt_t *) malloc (sizeof (memif_msg_queue_elt_t));
+  if (e == NULL)
+    return memif_syscall_error_handler (errno);
+
+  memset (&e->msg, 0, sizeof (e->msg));
+  memif_msg_connected_t *cm = &e->msg.connected;
+
+  e->msg.type = MEMIF_MSG_TYPE_CONNECTED;
+  e->fd = -1;
+  strncpy ((char *) cm->if_name, (char *) c->args.interface_name,
+	   strlen ((char *) c->args.interface_name));
+
+  e->next = NULL;
+  if (c->msg_queue == NULL)
+    {
+      c->msg_queue = e;
+      return MEMIF_ERR_SUCCESS;	/* 0 */
+    }
+
+  memif_msg_queue_elt_t *cur = c->msg_queue;
+  while (cur->next != NULL)
+    {
+      cur = cur->next;
+    }
+  cur->next = e;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* immediately send disconnect msg */
+    /* specifie protocol for disconnect msg err_code
+       so that it will be compatible with VPP? (header/doc) */
+int
+memif_msg_send_disconnect (int fd, uint8_t * err_string, uint32_t err_code)
+{
+  memif_msg_t msg = { 0 };
+  memif_msg_disconnect_t *d = &msg.disconnect;
+
+  msg.type = MEMIF_MSG_TYPE_DISCONNECT;
+  d->code = err_code;
+  uint16_t l = strlen ((char *) err_string);
+  if (l > 96)
+    {
+      DBG ("Disconnect string too long. Sending first 96 characters.");
+      l = 96;
+    }
+  strncpy ((char *) d->string, (char *) err_string, l);
+
+  return memif_msg_send (fd, &msg, -1);
+}
+
+static_fn int
+memif_msg_receive_hello (memif_connection_t * c, memif_msg_t * msg)
+{
+  memif_msg_hello_t *h = &msg->hello;
+
+  if (msg->hello.min_version > MEMIF_VERSION ||
+      msg->hello.max_version < MEMIF_VERSION)
+    {
+      DBG ("incompatible protocol version");
+      return MEMIF_ERR_PROTO;
+    }
+
+  c->run_args.num_s2m_rings = memif_min (h->max_s2m_ring + 1,
+					 c->args.num_s2m_rings);
+  c->run_args.num_m2s_rings = memif_min (h->max_m2s_ring + 1,
+					 c->args.num_m2s_rings);
+  c->run_args.log2_ring_size = memif_min (h->max_log2_ring_size,
+					  c->args.log2_ring_size);
+  c->run_args.buffer_size = c->args.buffer_size;
+  strncpy ((char *) c->remote_name, (char *) h->name,
+	   strlen ((char *) h->name));
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* handle interface identification (id, secret (optional)) */
+static_fn int
+memif_msg_receive_init (memif_socket_t * ms, int fd, memif_msg_t * msg)
+{
+  memif_msg_init_t *i = &msg->init;
+  memif_list_elt_t *elt = NULL;
+  memif_list_elt_t elt2;
+  memif_connection_t *c = NULL;
+  libmemif_main_t *lm = &libmemif_main;
+  uint8_t err_string[96];
+  memset (err_string, 0, sizeof (char) * 96);
+  int err = MEMIF_ERR_SUCCESS;	/* 0 */
+  int err_disc;
+  if (i->version != MEMIF_VERSION)
+    {
+      DBG ("MEMIF_VER_ERR");
+      strncpy ((char *) err_string, MEMIF_VER_ERR, strlen (MEMIF_VER_ERR));
+      err = MEMIF_ERR_PROTO;
+      goto error;
+    }
+
+  get_list_elt (&elt, ms->interface_list, ms->interface_list_len, i->id);
+  if (elt == NULL)
+    {
+      DBG ("MEMIF_ID_ERR");
+      strncpy ((char *) err_string, MEMIF_ID_ERR, strlen (MEMIF_ID_ERR));
+      err = MEMIF_ERR_ID;
+      goto error;
+    }
+
+  c = (memif_connection_t *) elt->data_struct;
+
+  if (!(c->args.is_master))
+    {
+      DBG ("MEMIF_SLAVE_ERR");
+      strncpy ((char *) err_string, MEMIF_SLAVE_ERR,
+	       strlen (MEMIF_SLAVE_ERR));
+      err = MEMIF_ERR_ACCSLAVE;
+      goto error;
+    }
+  if (c->fd != -1)
+    {
+      DBG ("MEMIF_CONN_ERR");
+      strncpy ((char *) err_string, MEMIF_CONN_ERR, strlen (MEMIF_CONN_ERR));
+      err = MEMIF_ERR_ALRCONN;
+      goto error;
+    }
+
+  c->fd = fd;
+
+  if (i->mode != c->args.mode)
+    {
+      DBG ("MEMIF_MODE_ERR");
+      strncpy ((char *) err_string, MEMIF_MODE_ERR, strlen (MEMIF_MODE_ERR));
+      err = MEMIF_ERR_MODE;
+      goto error;
+    }
+
+  strncpy ((char *) c->remote_name, (char *) i->name,
+	   strlen ((char *) i->name));
+
+  if (c->args.secret)
+    {
+      int r;
+      if (i->secret)
+	{
+	  if (strlen ((char *) c->args.secret) != strlen ((char *) i->secret))
+	    {
+	      DBG ("MEMIF_SECRET_ERR");
+	      strncpy ((char *) err_string,
+		       MEMIF_SECRET_ERR, strlen (MEMIF_SECRET_ERR));
+	      err = MEMIF_ERR_SECRET;
+	      goto error;
+	    }
+	  r = strncmp ((char *) i->secret, (char *) c->args.secret,
+		       strlen ((char *) c->args.secret));
+	  if (r != 0)
+	    {
+	      DBG ("MEMIF_SECRET_ERR");
+	      strncpy ((char *) err_string,
+		       MEMIF_SECRET_ERR, strlen (MEMIF_SECRET_ERR));
+	      err = MEMIF_ERR_SECRET;
+	      goto error;
+	    }
+	}
+      else
+	{
+	  DBG ("MEMIF_NOSECRET_ERR");
+	  strncpy ((char *) err_string,
+		   MEMIF_NOSECRET_ERR, strlen (MEMIF_NOSECRET_ERR));
+	  err = MEMIF_ERR_NOSECRET;
+	  goto error;
+	}
+    }
+
+  c->read_fn = memif_conn_fd_read_ready;
+  c->write_fn = memif_conn_fd_write_ready;
+  c->error_fn = memif_conn_fd_error;
+
+  elt2.key = c->fd;
+  elt2.data_struct = c;
+
+  add_list_elt (&elt2, &lm->control_list, &lm->control_list_len);
+  free_list_elt (lm->pending_list, lm->pending_list_len, fd);
+
+  return err;
+
+error:
+  memif_msg_send_disconnect (fd, err_string, 0);
+  lm->control_fd_update (fd, MEMIF_FD_EVENT_DEL);
+  free_list_elt (lm->pending_list, lm->pending_list_len, fd);
+  close (fd);
+  fd = -1;
+  return err;
+}
+
+/* receive region information and add new region to connection (if possible) */
+static_fn int
+memif_msg_receive_add_region (memif_connection_t * c, memif_msg_t * msg,
+			      int fd)
+{
+  memif_msg_add_region_t *ar = &msg->add_region;
+  memif_region_t *mr;
+  if (fd < 0)
+    return MEMIF_ERR_NO_SHMFD;
+
+  if (ar->index > MEMIF_MAX_REGION)
+    return MEMIF_ERR_MAXREG;
+
+  mr =
+    (memif_region_t *) realloc (c->regions,
+				sizeof (memif_region_t) * (ar->index + 1));
+  if (mr == NULL)
+    return memif_syscall_error_handler (errno);
+  c->regions = mr;
+  c->regions[ar->index].fd = fd;
+  c->regions[ar->index].region_size = ar->size;
+  c->regions[ar->index].shm = NULL;
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* receive ring information and add new ring to connection queue
+   (based on direction S2M | M2S) */
+static_fn int
+memif_msg_receive_add_ring (memif_connection_t * c, memif_msg_t * msg, int fd)
+{
+  memif_msg_add_ring_t *ar = &msg->add_ring;
+
+  memif_queue_t *mq;
+
+  if (fd < 0)
+    return MEMIF_ERR_NO_INTFD;
+
+  if (ar->flags & MEMIF_MSG_ADD_RING_FLAG_S2M)
+    {
+      if (ar->index > MEMIF_MAX_S2M_RING)
+	return MEMIF_ERR_MAXRING;
+      if (ar->index >= c->args.num_s2m_rings)
+	return MEMIF_ERR_MAXRING;
+
+      mq =
+	(memif_queue_t *) realloc (c->rx_queues,
+				   sizeof (memif_queue_t) * (ar->index + 1));
+      if (mq == NULL)
+	return memif_syscall_error_handler (errno);
+      c->rx_queues = mq;
+      c->rx_queues[ar->index].int_fd = fd;
+      c->rx_queues[ar->index].log2_ring_size = ar->log2_ring_size;
+      c->rx_queues[ar->index].region = ar->region;
+      c->rx_queues[ar->index].offset = ar->offset;
+      c->run_args.num_s2m_rings++;
+    }
+  else
+    {
+      if (ar->index > MEMIF_MAX_M2S_RING)
+	return MEMIF_ERR_MAXRING;
+      if (ar->index >= c->args.num_m2s_rings)
+	return MEMIF_ERR_MAXRING;
+
+      mq =
+	(memif_queue_t *) realloc (c->tx_queues,
+				   sizeof (memif_queue_t) * (ar->index + 1));
+      if (mq == NULL)
+	return memif_syscall_error_handler (errno);
+      c->tx_queues = mq;
+      c->tx_queues[ar->index].int_fd = fd;
+      c->tx_queues[ar->index].log2_ring_size = ar->log2_ring_size;
+      c->tx_queues[ar->index].region = ar->region;
+      c->tx_queues[ar->index].offset = ar->offset;
+      c->run_args.num_m2s_rings++;
+    }
+
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+/* slave -> master */
+static_fn int
+memif_msg_receive_connect (memif_connection_t * c, memif_msg_t * msg)
+{
+  memif_msg_connect_t *cm = &msg->connect;
+  libmemif_main_t *lm = &libmemif_main;
+  memif_list_elt_t elt;
+
+  int err;
+  err = memif_connect1 (c);
+  if (err != MEMIF_ERR_SUCCESS)
+    return err;
+
+  strncpy ((char *) c->remote_if_name, (char *) cm->if_name,
+	   strlen ((char *) cm->if_name));
+
+  int i;
+  if (c->on_interrupt != NULL)
+    {
+      for (i = 0; i < c->run_args.num_m2s_rings; i++)
+	{
+	  elt.key = c->rx_queues[i].int_fd;
+	  elt.data_struct = c;
+	  add_list_elt (&elt, &lm->interrupt_list, &lm->interrupt_list_len);
+
+	  lm->control_fd_update (c->rx_queues[i].int_fd, MEMIF_FD_EVENT_READ);
+	}
+
+    }
+
+  c->on_connect ((void *) c, c->private_ctx);
+
+  return err;
+}
+
+/* master -> slave */
+static_fn int
+memif_msg_receive_connected (memif_connection_t * c, memif_msg_t * msg)
+{
+  memif_msg_connect_t *cm = &msg->connect;
+  libmemif_main_t *lm = &libmemif_main;
+
+  int err;
+  err = memif_connect1 (c);
+  if (err != MEMIF_ERR_SUCCESS)
+    return err;
+
+  strncpy ((char *) c->remote_if_name, (char *) cm->if_name,
+	   strlen ((char *) cm->if_name));
+
+  int i;
+  if (c->on_interrupt != NULL)
+    {
+      for (i = 0; i < c->run_args.num_s2m_rings; i++)
+	lm->control_fd_update (c->rx_queues[i].int_fd, MEMIF_FD_EVENT_READ);
+    }
+
+  c->on_connect ((void *) c, c->private_ctx);
+
+  return err;
+}
+
+static_fn int
+memif_msg_receive_disconnect (memif_connection_t * c, memif_msg_t * msg)
+{
+  memif_msg_disconnect_t *d = &msg->disconnect;
+
+  memset (c->remote_disconnect_string, 0,
+	  sizeof (c->remote_disconnect_string));
+  strncpy ((char *) c->remote_disconnect_string, (char *) d->string,
+	   strlen ((char *) d->string));
+
+  /* on returning error, handle function will call memif_disconnect () */
+  DBG ("disconnect received: %s, mode: %d",
+       c->remote_disconnect_string, c->args.mode);
+  return MEMIF_ERR_DISCONNECT;
+}
+
+static_fn int
+memif_msg_receive (int ifd)
+{
+  char ctl[CMSG_SPACE (sizeof (int)) +
+	   CMSG_SPACE (sizeof (struct ucred))] = { 0 };
+  struct msghdr mh = { 0 };
+  struct iovec iov[1];
+  memif_msg_t msg = { 0 };
+  ssize_t size;
+  int err = MEMIF_ERR_SUCCESS;	/* 0 */
+  int fd = -1;
+  int i;
+  libmemif_main_t *lm = &libmemif_main;
+  memif_connection_t *c = NULL;
+  memif_socket_t *ms = NULL;
+  memif_list_elt_t *elt = NULL;
+
+  iov[0].iov_base = (void *) &msg;
+  iov[0].iov_len = sizeof (memif_msg_t);
+  mh.msg_iov = iov;
+  mh.msg_iovlen = 1;
+  mh.msg_control = ctl;
+  mh.msg_controllen = sizeof (ctl);
+
+  DBG ("recvmsg fd %d", ifd);
+  size = recvmsg (ifd, &mh, 0);
+  DBG ("done");
+  if (size != sizeof (memif_msg_t))
+    {
+      if (size == 0)
+	return MEMIF_ERR_DISCONNECTED;
+      else
+	return MEMIF_ERR_MFMSG;
+    }
+
+  struct ucred *cr = 0;
+  struct cmsghdr *cmsg;
+
+  cmsg = CMSG_FIRSTHDR (&mh);
+  while (cmsg)
+    {
+      if (cmsg->cmsg_level == SOL_SOCKET)
+	{
+	  if (cmsg->cmsg_type == SCM_CREDENTIALS)
+	    {
+	      cr = (struct ucred *) CMSG_DATA (cmsg);
+	    }
+	  else if (cmsg->cmsg_type == SCM_RIGHTS)
+	    {
+	      int *fdp = (int *) CMSG_DATA (cmsg);
+	      fd = *fdp;
+	    }
+	}
+      cmsg = CMSG_NXTHDR (&mh, cmsg);
+    }
+
+  DBG ("Message type %u received", msg.type);
+
+  get_list_elt (&elt, lm->control_list, lm->control_list_len, ifd);
+  if (elt != NULL)
+    c = (memif_connection_t *) elt->data_struct;
+
+  switch (msg.type)
+    {
+    case MEMIF_MSG_TYPE_ACK:
+      break;
+
+    case MEMIF_MSG_TYPE_HELLO:
+      if ((err = memif_msg_receive_hello (c, &msg)) != MEMIF_ERR_SUCCESS)
+	return err;
+      if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      if ((err = memif_msg_enq_init (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      if ((err = memif_msg_enq_add_region (c, 0)) != MEMIF_ERR_SUCCESS)
+	return err;
+      for (i = 0; i < c->run_args.num_s2m_rings; i++)
+	{
+	  if ((err =
+	       memif_msg_enq_add_ring (c, i,
+				       MEMIF_RING_S2M)) != MEMIF_ERR_SUCCESS)
+	    return err;
+	}
+      for (i = 0; i < c->run_args.num_m2s_rings; i++)
+	{
+	  if ((err =
+	       memif_msg_enq_add_ring (c, i,
+				       MEMIF_RING_M2S)) != MEMIF_ERR_SUCCESS)
+	    return err;
+	}
+      if ((err = memif_msg_enq_connect (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    case MEMIF_MSG_TYPE_INIT:
+      get_list_elt (&elt, lm->pending_list, lm->pending_list_len, ifd);
+      if (elt == NULL)
+	return -1;
+      ms = (memif_socket_t *) elt->data_struct;
+      if ((err = memif_msg_receive_init (ms, ifd, &msg)) != MEMIF_ERR_SUCCESS)
+	return err;
+      /* c->remote_pid = cr->pid */
+      /* c->remote_uid = cr->uid */
+      /* c->remote_gid = cr->gid */
+      get_list_elt (&elt, lm->control_list, lm->control_list_len, ifd);
+      if (elt == NULL)
+	return -1;
+      c = (memif_connection_t *) elt->data_struct;
+      if ((err = memif_msg_enq_ack (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    case MEMIF_MSG_TYPE_ADD_REGION:
+      if ((err =
+	   memif_msg_receive_add_region (c, &msg, fd)) != MEMIF_ERR_SUCCESS)
+	return err;
+      if ((err = memif_msg_enq_ack (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    case MEMIF_MSG_TYPE_ADD_RING:
+      if ((err =
+	   memif_msg_receive_add_ring (c, &msg, fd)) != MEMIF_ERR_SUCCESS)
+	return err;
+      if ((err = memif_msg_enq_ack (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    case MEMIF_MSG_TYPE_CONNECT:
+      if ((err = memif_msg_receive_connect (c, &msg)) != MEMIF_ERR_SUCCESS)
+	return err;
+      if ((err = memif_msg_enq_connected (c)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    case MEMIF_MSG_TYPE_CONNECTED:
+      if ((err = memif_msg_receive_connected (c, &msg)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    case MEMIF_MSG_TYPE_DISCONNECT:
+      if ((err = memif_msg_receive_disconnect (c, &msg)) != MEMIF_ERR_SUCCESS)
+	return err;
+      break;
+
+    default:
+      return MEMIF_ERR_UNKNOWN_MSG;;
+      break;
+    }
+
+  if (c != NULL)
+    c->flags |= MEMIF_CONNECTION_FLAG_WRITE;
+/*    libmemif_main_t *lm = &libmemif_main;
+    lm->control_fd_update (c->fd, MEMIF_FD_EVENT_READ | MEMIF_FD_EVENT_MOD); */
+  return MEMIF_ERR_SUCCESS;	/* 0 */
+}
+
+int
+memif_conn_fd_error (memif_connection_t * c)
+{
+  DBG ("connection fd error");
+  strncpy ((char *) c->remote_disconnect_string, "connection fd error", 19);
+  int err = memif_disconnect_internal (c);
+  return err;
+}
+
+/* calls memif_msg_receive to handle pending messages on socket */
+int
+memif_conn_fd_read_ready (memif_connection_t * c)
+{
+  int err;
+  err = memif_msg_receive (c->fd);
+  if (err != 0)
+    {
+      err = memif_disconnect_internal (c);
+    }
+  return err;
+}
+
+/* get msg from msg queue buffer and send it to socket */
+int
+memif_conn_fd_write_ready (memif_connection_t * c)
+{
+  int err = MEMIF_ERR_SUCCESS;	/* 0 */
+
+
+  if ((c->flags & MEMIF_CONNECTION_FLAG_WRITE) == 0)
+    goto done;
+
+  memif_msg_queue_elt_t *e = c->msg_queue;
+  if (e == NULL)
+    goto done;
+
+  c->msg_queue = c->msg_queue->next;
+
+  c->flags &= ~MEMIF_CONNECTION_FLAG_WRITE;
+/*
+    libmemif_main_t *lm = &libmemif_main;
+
+    lm->control_fd_update (c->fd,
+        MEMIF_FD_EVENT_READ | MEMIF_FD_EVENT_WRITE | MEMIF_FD_EVENT_MOD);
+*/
+  err = memif_msg_send (c->fd, &e->msg, e->fd);
+  free (e);
+  goto done;
+
+done:
+  return err;
+}
+
+int
+memif_conn_fd_accept_ready (memif_socket_t * ms)
+{
+  int addr_len;
+  struct sockaddr_un client;
+  int conn_fd;
+  libmemif_main_t *lm = &libmemif_main;
+
+  DBG ("accept called");
+
+  addr_len = sizeof (client);
+  conn_fd =
+    accept (ms->fd, (struct sockaddr *) &client, (socklen_t *) & addr_len);
+
+  if (conn_fd < 0)
+    {
+      return memif_syscall_error_handler (errno);
+    }
+  DBG ("accept fd %d", ms->fd);
+  DBG ("conn fd %d", conn_fd);
+
+  memif_list_elt_t elt;
+  elt.key = conn_fd;
+  elt.data_struct = ms;
+
+  add_list_elt (&elt, &lm->pending_list, &lm->pending_list_len);
+  lm->control_fd_update (conn_fd, MEMIF_FD_EVENT_READ | MEMIF_FD_EVENT_WRITE);
+
+  return memif_msg_send_hello (conn_fd);
+}
+
+int
+memif_read_ready (int fd)
+{
+  int err;
+  DBG ("call recv");
+  err = memif_msg_receive (fd);
+  DBG ("recv finished");
+  return err;
+}
diff --git a/extras/libmemif/src/socket.h b/extras/libmemif/src/socket.h
new file mode 100644
index 0000000..a8e9fbc
--- /dev/null
+++ b/extras/libmemif/src/socket.h
@@ -0,0 +1,89 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#ifndef _SOCKET_H_
+#define _SOCKET_H
+
+#include <memif_private.h>
+
+/* interface identification errors (disconnect messages)*/
+#define MEMIF_VER_ERR       "incompatible version"
+#define MEMIF_ID_ERR        "unmatched interface id"
+#define MEMIF_SLAVE_ERR     "cannot connect to salve"
+#define MEMIF_CONN_ERR      "already connected"
+#define MEMIF_MODE_ERR      "mode mismatch"
+#define MEMIF_SECRET_ERR    "incorrect secret"
+#define MEMIF_NOSECRET_ERR  "secret required"
+
+/* socket.c */
+
+int memif_conn_fd_read_ready (memif_connection_t * c);
+
+int memif_conn_fd_write_ready (memif_connection_t * c);
+
+int memif_conn_fd_error (memif_connection_t * c);
+
+int memif_conn_fd_accept_ready (memif_socket_t * ms);
+
+int memif_read_ready (int fd);
+
+int memif_msg_send_disconnect (int fd, uint8_t * err_string,
+			       uint32_t err_code);
+
+/* when compiling unit tests, compile functions without static keyword
+   and declare functions in header file */
+#ifdef MEMIF_UNIT_TEST
+#define static_fn
+
+int memif_msg_send (int fd, memif_msg_t * msg, int afd);
+
+int memif_msg_enq_ack (memif_connection_t * c);
+
+int memif_msg_send_hello (int fd);
+
+int memif_msg_enq_init (memif_connection_t * c);
+
+int memif_msg_enq_add_region (memif_connection_t * c, uint8_t region);
+
+int memif_msg_enq_add_ring (memif_connection_t * c, uint8_t index,
+			    uint8_t dir);
+
+int memif_msg_receive_hello (memif_connection_t * c, memif_msg_t * msg);
+
+int memif_msg_receive_init (memif_socket_t * ms, int fd, memif_msg_t * msg);
+
+int memif_msg_receive_add_region (memif_connection_t * c, memif_msg_t * msg,
+				  int fd);
+
+int memif_msg_receive_add_ring (memif_connection_t * c, memif_msg_t * msg,
+				int fd);
+
+int memif_msg_enq_connect (memif_connection_t * c);
+
+int memif_msg_enq_connected (memif_connection_t * c);
+
+int memif_msg_receive_connect (memif_connection_t * c, memif_msg_t * msg);
+
+int memif_msg_receive_connected (memif_connection_t * c, memif_msg_t * msg);
+
+int memif_msg_receive_disconnect (memif_connection_t * c, memif_msg_t * msg);
+
+#else
+#define static_fn static
+#endif /* MEMIF_UNIT_TEST */
+
+#endif /* _SOCKET_H_ */
diff --git a/extras/libmemif/test/main_test.c b/extras/libmemif/test/main_test.c
new file mode 100644
index 0000000..deb8acb
--- /dev/null
+++ b/extras/libmemif/test/main_test.c
@@ -0,0 +1,1079 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <main_test.h>
+
+#include <memif_private.h>
+
+#define SOCKET_FILENAME "/run/vpp/memif.sock"
+
+uint8_t ready_called;
+#define read_call  (1 << 0)
+#define write_call (1 << 1)
+#define error_call (1 << 2)
+
+int
+read_fn (memif_connection_t * c)
+{
+  ready_called |= read_call;
+  return 0;
+}
+
+int
+write_fn (memif_connection_t * c)
+{
+  ready_called |= write_call;
+  return 0;
+}
+
+int
+error_fn (memif_connection_t * c)
+{
+  ready_called |= error_call;
+  return 0;
+}
+
+static void
+register_fd_ready_fn (memif_connection_t * c,
+		      memif_fn * read_fn, memif_fn * write_fn,
+		      memif_fn * error_fn)
+{
+  c->read_fn = read_fn;
+  c->write_fn = write_fn;
+  c->error_fn = error_fn;
+}
+
+START_TEST (test_init)
+{
+  int err;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  ck_assert_ptr_ne (lm, NULL);
+  ck_assert_ptr_ne (lm->control_fd_update, NULL);
+  ck_assert_int_gt (lm->timerfd, 2);
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+}
+
+END_TEST
+START_TEST (test_init_epoll)
+{
+  int err;
+
+  if ((err = memif_init (NULL, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  ck_assert_ptr_ne (lm, NULL);
+  ck_assert_ptr_ne (lm->control_fd_update, NULL);
+  ck_assert_int_gt (lm->timerfd, 2);
+  ck_assert_int_gt (memif_epfd, -1);
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+}
+
+END_TEST
+START_TEST (test_create)
+{
+  int err;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  ck_assert_ptr_ne (c, NULL);
+
+  ck_assert_uint_eq (c->args.interface_id, args.interface_id);
+  ck_assert_uint_eq (c->args.is_master, args.is_master);
+  ck_assert_uint_eq (c->args.mode, args.mode);
+
+  ck_assert_uint_eq (c->args.num_s2m_rings, MEMIF_DEFAULT_TX_QUEUES);
+  ck_assert_uint_eq (c->args.num_m2s_rings, MEMIF_DEFAULT_RX_QUEUES);
+  ck_assert_uint_eq (c->args.buffer_size, MEMIF_DEFAULT_BUFFER_SIZE);
+  ck_assert_uint_eq (c->args.log2_ring_size, MEMIF_DEFAULT_LOG2_RING_SIZE);
+
+  ck_assert_ptr_eq (c->msg_queue, NULL);
+  ck_assert_ptr_eq (c->regions, NULL);
+  ck_assert_ptr_eq (c->tx_queues, NULL);
+  ck_assert_ptr_eq (c->rx_queues, NULL);
+
+  ck_assert_int_eq (c->fd, -1);
+
+  ck_assert_ptr_ne (c->on_connect, NULL);
+  ck_assert_ptr_ne (c->on_disconnect, NULL);
+  ck_assert_ptr_ne (c->on_interrupt, NULL);
+
+  ck_assert_str_eq (c->args.interface_name, args.interface_name);
+  ck_assert_str_eq (c->args.instance_name, args.instance_name);
+  ck_assert_str_eq (c->args.socket_filename, SOCKET_FILENAME);
+
+  struct itimerspec timer;
+  timerfd_gettime (lm->timerfd, &timer);
+
+  ck_assert_msg (timer.it_interval.tv_sec == lm->arm.it_interval.tv_sec,
+		 "timerfd not armed!");
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_create_master)
+{
+  int err, rv;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.is_master = 1;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  ck_assert_ptr_ne (c, NULL);
+
+  ck_assert_uint_eq (c->args.interface_id, args.interface_id);
+  ck_assert_uint_eq (c->args.is_master, args.is_master);
+  ck_assert_uint_eq (c->args.mode, args.mode);
+
+  ck_assert_uint_eq (c->args.num_s2m_rings, MEMIF_DEFAULT_TX_QUEUES);
+  ck_assert_uint_eq (c->args.num_m2s_rings, MEMIF_DEFAULT_RX_QUEUES);
+  ck_assert_uint_eq (c->args.buffer_size, MEMIF_DEFAULT_BUFFER_SIZE);
+  ck_assert_uint_eq (c->args.log2_ring_size, MEMIF_DEFAULT_LOG2_RING_SIZE);
+
+  ck_assert_ptr_eq (c->msg_queue, NULL);
+  ck_assert_ptr_eq (c->regions, NULL);
+  ck_assert_ptr_eq (c->tx_queues, NULL);
+  ck_assert_ptr_eq (c->rx_queues, NULL);
+
+  ck_assert_int_eq (c->fd, -1);
+
+  ck_assert_ptr_ne (c->on_connect, NULL);
+  ck_assert_ptr_ne (c->on_disconnect, NULL);
+  ck_assert_ptr_ne (c->on_interrupt, NULL);
+
+  ck_assert_str_eq (c->args.interface_name, args.interface_name);
+  ck_assert_str_eq (c->args.instance_name, args.instance_name);
+  ck_assert_str_eq (c->args.socket_filename, SOCKET_FILENAME);
+
+  struct stat file_stat;
+
+  rv = stat (SOCKET_FILENAME, &file_stat);
+  ck_assert_int_eq (rv, 0);
+
+  ck_assert (S_ISSOCK (file_stat.st_mode));
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_create_mult)
+{
+  int err;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_handle_t conn1 = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  args.interface_id = 1;
+
+  if ((err = memif_create (&conn1, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+  memif_connection_t *c1 = (memif_connection_t *) conn1;
+
+  ck_assert_ptr_ne (c, NULL);
+  ck_assert_ptr_ne (c1, NULL);
+
+  ck_assert_uint_eq (c->args.interface_id, 0);
+  ck_assert_uint_eq (c->args.is_master, args.is_master);
+  ck_assert_uint_eq (c->args.mode, args.mode);
+  ck_assert_uint_eq (c1->args.interface_id, 1);
+  ck_assert_uint_eq (c1->args.is_master, args.is_master);
+  ck_assert_uint_eq (c1->args.mode, args.mode);
+
+  ck_assert_uint_eq (c->args.num_s2m_rings, MEMIF_DEFAULT_TX_QUEUES);
+  ck_assert_uint_eq (c->args.num_m2s_rings, MEMIF_DEFAULT_RX_QUEUES);
+  ck_assert_uint_eq (c->args.buffer_size, MEMIF_DEFAULT_BUFFER_SIZE);
+  ck_assert_uint_eq (c->args.log2_ring_size, MEMIF_DEFAULT_LOG2_RING_SIZE);
+  ck_assert_uint_eq (c1->args.num_s2m_rings, MEMIF_DEFAULT_TX_QUEUES);
+  ck_assert_uint_eq (c1->args.num_m2s_rings, MEMIF_DEFAULT_RX_QUEUES);
+  ck_assert_uint_eq (c1->args.buffer_size, MEMIF_DEFAULT_BUFFER_SIZE);
+  ck_assert_uint_eq (c1->args.log2_ring_size, MEMIF_DEFAULT_LOG2_RING_SIZE);
+
+  ck_assert_ptr_eq (c->msg_queue, NULL);
+  ck_assert_ptr_eq (c->regions, NULL);
+  ck_assert_ptr_eq (c->tx_queues, NULL);
+  ck_assert_ptr_eq (c->rx_queues, NULL);
+  ck_assert_ptr_eq (c1->msg_queue, NULL);
+  ck_assert_ptr_eq (c1->regions, NULL);
+  ck_assert_ptr_eq (c1->tx_queues, NULL);
+  ck_assert_ptr_eq (c1->rx_queues, NULL);
+
+  ck_assert_int_eq (c->fd, -1);
+  ck_assert_int_eq (c1->fd, -1);
+
+  ck_assert_ptr_ne (c->on_connect, NULL);
+  ck_assert_ptr_ne (c->on_disconnect, NULL);
+  ck_assert_ptr_ne (c->on_interrupt, NULL);
+  ck_assert_ptr_ne (c1->on_connect, NULL);
+  ck_assert_ptr_ne (c1->on_disconnect, NULL);
+  ck_assert_ptr_ne (c1->on_interrupt, NULL);
+
+  ck_assert_str_eq (c->args.interface_name, args.interface_name);
+  ck_assert_str_eq (c->args.instance_name, args.instance_name);
+  ck_assert_str_eq (c->args.socket_filename, SOCKET_FILENAME);
+  ck_assert_str_eq (c1->args.interface_name, args.interface_name);
+  ck_assert_str_eq (c1->args.instance_name, args.instance_name);
+  ck_assert_str_eq (c1->args.socket_filename, SOCKET_FILENAME);
+
+  struct itimerspec timer;
+  timerfd_gettime (lm->timerfd, &timer);
+
+  ck_assert_msg (timer.it_interval.tv_sec == lm->arm.it_interval.tv_sec,
+		 "timerfd not armed!");
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_control_fd_handler)
+{
+  int err;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  if ((err =
+       memif_control_fd_handler (lm->timerfd,
+				 MEMIF_FD_EVENT_READ)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_NO_FILE, "err code: %u, err msg: %s", err,
+		   memif_strerror (err));
+
+  register_fd_ready_fn (c, read_fn, write_fn, error_fn);
+  c->fd = 69;
+  lm->control_list[0].key = c->fd;
+  lm->control_list[0].data_struct = c;
+
+  if ((err =
+       memif_control_fd_handler (c->fd,
+				 MEMIF_FD_EVENT_READ)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert (ready_called & read_call);
+
+  if ((err =
+       memif_control_fd_handler (c->fd,
+				 MEMIF_FD_EVENT_WRITE)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert (ready_called & write_call);
+
+  if ((err =
+       memif_control_fd_handler (c->fd,
+				 MEMIF_FD_EVENT_ERROR)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert (ready_called & error_call);
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_buffer_alloc)
+{
+  int err, i;
+  uint8_t qid;
+  uint16_t buf;
+  memif_buffer_t *bufs;
+  uint16_t max_buf = 10;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  c->fd = 69;
+
+  /* test buffer allocation qid 0 (positive) */
+
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  qid = 0;
+  if ((err =
+       memif_buffer_alloc (conn, qid, bufs, max_buf,
+			   &buf)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (buf, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_uint_eq (bufs[i].buffer_len, MEMIF_DEFAULT_BUFFER_SIZE);
+
+  /* test buffer allocation qid 1 (positive) */
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  qid = 1;
+  if ((err =
+       memif_buffer_alloc (conn, qid, bufs, max_buf,
+			   &buf)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (buf, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_uint_eq (bufs[i].buffer_len, MEMIF_DEFAULT_BUFFER_SIZE);
+
+  /* test buffer allocation qid 2 (negative) */
+
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  qid = 2;
+  if ((err =
+       memif_buffer_alloc (conn, qid, bufs, max_buf,
+			   &buf)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_QID, "err code: %u, err msg: %s", err,
+		   memif_strerror (err));
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  free (bufs);
+  bufs = NULL;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_tx_burst)
+{
+  int err, i;
+  uint16_t max_buf = 10, buf, tx;
+  uint8_t qid;
+  memif_buffer_t *bufs;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  c->fd = 69;
+
+  /* test transmit qid 0 (positive) */
+
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+  qid = 0;
+  if ((err =
+       memif_buffer_alloc (conn, qid, bufs, max_buf,
+			   &buf)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (buf, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_uint_eq (bufs[i].buffer_len, MEMIF_DEFAULT_BUFFER_SIZE);
+
+  if ((err =
+       memif_tx_burst (conn, qid, bufs, max_buf, &tx)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (tx, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_eq (bufs[i].data, NULL);
+
+  /* test transmit qid 1 (positive) */
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+  qid = 1;
+  if ((err =
+       memif_buffer_alloc (conn, qid, bufs, max_buf,
+			   &buf)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (buf, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_uint_eq (bufs[i].buffer_len, MEMIF_DEFAULT_BUFFER_SIZE);
+
+  if ((err =
+       memif_tx_burst (conn, qid, bufs, max_buf, &tx)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (tx, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_eq (bufs[i].data, NULL);
+
+  /* test transmit qid 2 (negative) */
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+  qid = 2;
+  if ((err =
+       memif_tx_burst (conn, qid, bufs, max_buf, &tx)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_QID, "err code: %u, err msg: %s", err,
+		   memif_strerror (err));
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+  free (bufs);
+  bufs = NULL;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_rx_burst)
+{
+  int err, i;
+  uint16_t max_buf = 10, buf, rx;
+  uint8_t qid;
+  memif_buffer_t *bufs;
+  memif_queue_t *mq;
+  memif_ring_t *ring;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  c->fd = 69;
+
+  /* test receive qid 0 (positive) */
+  qid = 0;
+  mq = &c->rx_queues[qid];
+  ring = mq->ring;
+  ring->head += max_buf;
+
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  if ((err =
+       memif_rx_burst (conn, qid, bufs, max_buf, &rx)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (rx, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_ne (bufs[i].data, NULL);
+
+  /* test receive qid 1 (positive) */
+  qid = 1;
+  mq = &c->rx_queues[qid];
+  ring = mq->ring;
+  ring->head += max_buf;
+
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  if ((err =
+       memif_rx_burst (conn, qid, bufs, max_buf, &rx)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (rx, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_ne (bufs[i].data, NULL);
+
+  /* test receive qid 2 (negative) */
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  if ((err =
+       memif_rx_burst (conn, qid, bufs, max_buf, &rx)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_QID, "err code: %u, err msg: %s", err,
+		   memif_strerror (err));
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+  free (bufs);
+  bufs = NULL;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_buffer_free)
+{
+  int err, i;
+  uint16_t max_buf = 10, buf, rx;
+  uint8_t qid;
+  memif_buffer_t *bufs;
+  memif_queue_t *mq;
+  memif_ring_t *ring;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  c->fd = 69;
+
+  /* test buffer free qid 0 (positive) */
+  qid = 0;
+  mq = &c->rx_queues[qid];
+  ring = mq->ring;
+  ring->head += 10;
+
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  if ((err =
+       memif_rx_burst (conn, qid, bufs, max_buf, &rx)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (rx, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_ne (bufs[i].data, NULL);
+
+  if ((err =
+       memif_buffer_free (conn, qid, bufs, max_buf,
+			  &buf)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (buf, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_eq (bufs[i].data, NULL);
+  ck_assert_uint_eq (ring->head, ring->tail);
+
+  /* test buffer free qid 1 (positive) */
+  qid = 1;
+  mq = &c->rx_queues[qid];
+  ring = mq->ring;
+  ring->head += 10;
+
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  if ((err =
+       memif_rx_burst (conn, qid, bufs, max_buf, &rx)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (rx, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_ne (bufs[i].data, NULL);
+
+  if ((err =
+       memif_buffer_free (conn, qid, bufs, max_buf,
+			  &buf)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (buf, max_buf);
+  for (i = 0; i < max_buf; i++)
+    ck_assert_ptr_eq (bufs[i].data, NULL);
+  ck_assert_uint_eq (ring->head, ring->tail);
+
+
+  /* test buffer free qid 2 (negative) */
+  qid = 2;
+  free (bufs);
+  bufs = malloc (sizeof (memif_buffer_t) * max_buf);
+
+  if ((err =
+       memif_buffer_free (conn, qid, bufs, max_buf,
+			  &buf)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_QID, "err code: %u, err msg: %s", err,
+		   memif_strerror (err));
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+  free (bufs);
+  bufs = NULL;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_get_details)
+{
+  int err, i;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_details_t md;
+  memset (&md, 0, sizeof (md));
+  ssize_t buflen = 2048;
+  char *buf = malloc (buflen);
+  memset (buf, 0, buflen);
+
+  if ((err = memif_get_details (conn, &md, buf, buflen)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_str_eq (md.if_name, c->args.interface_name);
+  ck_assert_str_eq (md.inst_name, c->args.instance_name);
+  ck_assert_str_eq (md.remote_if_name, c->remote_if_name);
+  ck_assert_str_eq (md.remote_inst_name, c->remote_name);
+  ck_assert_str_eq (md.secret, c->args.secret);
+  ck_assert_str_eq (md.socket_filename, c->args.socket_filename);
+
+  ck_assert_uint_eq (md.id, c->args.interface_id);
+  ck_assert_uint_ne (md.role, c->args.is_master);
+  ck_assert_uint_eq (md.mode, c->args.mode);
+  for (i = 0; i < md.rx_queues_num; i++)
+    {
+      ck_assert_uint_eq (md.rx_queues[i].qid, i);
+      ck_assert_uint_eq (md.rx_queues[i].ring_size,
+			 (1 << c->args.log2_ring_size));
+      ck_assert_uint_eq (md.rx_queues[i].buffer_size, c->args.buffer_size);
+    }
+  for (i = 0; i < md.tx_queues_num; i++)
+    {
+      ck_assert_uint_eq (md.tx_queues[i].qid, i);
+      ck_assert_uint_eq (md.tx_queues[i].ring_size,
+			 (1 << c->args.log2_ring_size));
+      ck_assert_uint_eq (md.tx_queues[i].buffer_size, c->args.buffer_size);
+    }
+  ck_assert_uint_eq (md.link_up_down, 0);
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_init_regions_and_queues)
+{
+  int err;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_ptr_ne (c->regions, NULL);
+  ck_assert_ptr_ne (c->tx_queues, NULL);
+  ck_assert_ptr_ne (c->rx_queues, NULL);
+
+  ck_assert_ptr_ne (c->regions->shm, NULL);
+  ck_assert_ptr_ne (c->tx_queues->ring, NULL);
+  ck_assert_ptr_ne (c->rx_queues->ring, NULL);
+
+  ck_assert_int_ne (c->regions->fd, -1);
+  ck_assert_uint_eq (c->tx_queues->ring->cookie, MEMIF_COOKIE);
+  ck_assert_uint_eq (c->rx_queues->ring->cookie, MEMIF_COOKIE);
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_connect1)
+{
+  int err;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if ((err = memif_connect1 (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST
+START_TEST (test_disconnect_internal)
+{
+  int err;
+  ready_called = 0;
+  memif_conn_handle_t conn = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+  args.num_s2m_rings = 2;
+  args.num_m2s_rings = 2;
+
+  libmemif_main_t *lm = &libmemif_main;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  strncpy ((char *) args.interface_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err = memif_create (&conn, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *c = (memif_connection_t *) conn;
+
+  c->run_args.num_s2m_rings = 2;
+  c->run_args.num_m2s_rings = 2;
+  c->run_args.log2_ring_size = 10;
+  c->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if ((err = memif_disconnect_internal (c)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_int_eq (c->fd, -1);
+
+  ck_assert_ptr_eq (c->tx_queues, NULL);
+  ck_assert_ptr_eq (c->rx_queues, NULL);
+  ck_assert_ptr_eq (c->regions, NULL);
+  ck_assert_ptr_eq (c->msg_queue, NULL);
+
+  struct itimerspec timer;
+  timerfd_gettime (lm->timerfd, &timer);
+
+  ck_assert_msg (timer.it_interval.tv_sec == lm->arm.it_interval.tv_sec,
+		 "timerfd not armed!");
+
+  if (lm->timerfd > 0)
+    close (lm->timerfd);
+  lm->timerfd = -1;
+
+  memif_delete (&conn);
+  ck_assert_ptr_eq (conn, NULL);
+}
+
+END_TEST Suite * main_suite ()
+{
+  Suite *s;
+
+  TCase *tc_api;
+  TCase *tc_internal;
+
+  /* create main test suite */
+  s = suite_create ("Libmemif main");
+
+  /* create api test case */
+  tc_api = tcase_create ("Api calls");
+  /* add tests to test case */
+  tcase_add_test (tc_api, test_init);
+  tcase_add_test (tc_api, test_init_epoll);
+  tcase_add_test (tc_api, test_create);
+  tcase_add_test (tc_api, test_create_master);
+  tcase_add_test (tc_api, test_create_mult);
+  tcase_add_test (tc_api, test_control_fd_handler);
+  tcase_add_test (tc_api, test_buffer_alloc);
+  tcase_add_test (tc_api, test_tx_burst);
+  tcase_add_test (tc_api, test_rx_burst);
+  tcase_add_test (tc_api, test_buffer_free);
+  tcase_add_test (tc_api, test_get_details);
+
+  /* create internal test case */
+  tc_internal = tcase_create ("Internal");
+  /* add tests to test case */
+  tcase_add_test (tc_internal, test_init_regions_and_queues);
+  tcase_add_test (tc_internal, test_connect1);
+  tcase_add_test (tc_internal, test_disconnect_internal);
+
+  /* add test cases to test suite */
+  suite_add_tcase (s, tc_api);
+  suite_add_tcase (s, tc_internal);
+
+  /* return main test suite to test runner */
+  return s;
+}
diff --git a/extras/libmemif/test/main_test.h b/extras/libmemif/test/main_test.h
new file mode 100644
index 0000000..300d8a8
--- /dev/null
+++ b/extras/libmemif/test/main_test.h
@@ -0,0 +1,25 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#ifndef _MAIN_TEST_H_
+#define _MAIN_TEST_H_
+
+#include <unit_test.h>
+
+Suite *main_suite ();
+
+#endif /* _MAIN_TEST_H_ */
diff --git a/extras/libmemif/test/socket_test.c b/extras/libmemif/test/socket_test.c
new file mode 100644
index 0000000..f148495
--- /dev/null
+++ b/extras/libmemif/test/socket_test.c
@@ -0,0 +1,625 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <socket_test.h>
+
+#include <memif_private.h>
+#include <socket.h>
+
+static int
+get_queue_len (memif_msg_queue_elt_t * q)
+{
+  int r = 0;
+  memif_msg_queue_elt_t *c = q;
+  while (c != NULL)
+    {
+      r++;
+      c = c->next;
+    }
+  return r;
+}
+
+static void
+queue_free (memif_msg_queue_elt_t ** e)
+{
+  if (*e == NULL)
+    return;
+  queue_free (&(*e)->next);
+  free (*e);
+  *e = NULL;
+  return;
+}
+
+START_TEST (test_msg_queue)
+{
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+  conn.fd = -1;
+
+  int i, len = 10;
+
+  for (i = 0; i < len; i++)
+    {
+      if (i % 2)
+	memif_msg_enq_ack (&conn);
+      else
+	memif_msg_enq_init (&conn);
+    }
+
+  ck_assert_int_eq (len, get_queue_len (conn.msg_queue));
+
+  int pop = 6;
+
+  for (i = 0; i < pop; i++)
+    {
+      if (i % 2)
+	{
+	  ck_assert_uint_eq (conn.msg_queue->msg.type, MEMIF_MSG_TYPE_ACK);
+	}
+      else
+	{
+	  ck_assert_uint_eq (conn.msg_queue->msg.type, MEMIF_MSG_TYPE_INIT);
+	}
+      conn.flags |= MEMIF_CONNECTION_FLAG_WRITE;
+      /* function will return -1 because no socket is created */
+      memif_conn_fd_write_ready (&conn);
+    }
+
+  ck_assert_int_eq ((len - pop), get_queue_len (conn.msg_queue));
+
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_enq_ack)
+{
+  int err;
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+
+  if ((err = memif_msg_enq_ack (&conn)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+  memif_msg_queue_elt_t *e = conn.msg_queue;
+
+  ck_assert_uint_eq (e->msg.type, MEMIF_MSG_TYPE_ACK);
+  ck_assert_int_eq (e->fd, -1);
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_enq_init)
+{
+  int err;
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+
+  conn.args.interface_id = 69;
+  conn.args.mode = 0;
+
+  strncpy ((char *) conn.args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+  strncpy ((char *) conn.args.secret, TEST_SECRET, strlen (TEST_SECRET));
+
+  if ((err = memif_msg_enq_init (&conn)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_queue_elt_t *e = conn.msg_queue;
+
+  ck_assert_uint_eq (e->msg.type, MEMIF_MSG_TYPE_INIT);
+  ck_assert_int_eq (e->fd, -1);
+
+  memif_msg_init_t *i = &e->msg.init;
+
+  ck_assert_uint_eq (i->version, MEMIF_VERSION);
+  ck_assert_uint_eq (i->id, conn.args.interface_id);
+  ck_assert_uint_eq (i->mode, conn.args.mode);
+  ck_assert_str_eq (i->name, conn.args.instance_name);
+  ck_assert_str_eq (i->secret, conn.args.secret);
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_enq_add_region)
+{
+  int err;
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+  conn.regions = (memif_region_t *) malloc (sizeof (memif_region_t));
+  memif_region_t *mr = conn.regions;
+  mr->fd = 5;
+  mr->region_size = 2048;
+  uint8_t region_index = 0;
+
+  if ((err =
+       memif_msg_enq_add_region (&conn, region_index)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_queue_elt_t *e = conn.msg_queue;
+
+  ck_assert_uint_eq (e->msg.type, MEMIF_MSG_TYPE_ADD_REGION);
+  ck_assert_int_eq (e->fd, mr->fd);
+
+  memif_msg_add_region_t *ar = &e->msg.add_region;
+
+  ck_assert_uint_eq (ar->index, region_index);
+  ck_assert_uint_eq (ar->size, mr->region_size);
+
+  free (conn.regions);
+  conn.regions = NULL;
+  mr = NULL;
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_enq_add_ring)
+{
+  int err;
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+  conn.rx_queues = (memif_queue_t *) malloc (sizeof (memif_queue_t));
+  conn.tx_queues = (memif_queue_t *) malloc (sizeof (memif_queue_t));
+
+  memif_queue_t *mq = conn.tx_queues;
+  uint8_t dir = MEMIF_RING_S2M;
+  mq->int_fd = 5;
+  mq->offset = 0;
+  mq->log2_ring_size = 10;
+
+  if ((err = memif_msg_enq_add_ring (&conn, 0, dir)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_queue_elt_t *e = conn.msg_queue;
+
+  ck_assert_uint_eq (e->msg.type, MEMIF_MSG_TYPE_ADD_RING);
+  ck_assert_int_eq (e->fd, mq->int_fd);
+
+  memif_msg_add_ring_t *ar = &e->msg.add_ring;
+
+  ck_assert_uint_eq (ar->index, 0);
+  ck_assert_uint_eq (ar->offset, mq->offset);
+  ck_assert_uint_eq (ar->log2_ring_size, mq->log2_ring_size);
+  ck_assert (ar->flags & MEMIF_MSG_ADD_RING_FLAG_S2M);
+
+  dir = MEMIF_RING_M2S;
+  if ((err = memif_msg_enq_add_ring (&conn, 0, dir)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_enq_connect)
+{
+  int err;
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+  memset (conn.args.interface_name, 0, sizeof (conn.args.interface_name));
+  strncpy ((char *) conn.args.interface_name, TEST_IF_NAME,
+	   strlen (TEST_IF_NAME));
+
+  if ((err = memif_msg_enq_connect (&conn)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_queue_elt_t *e = conn.msg_queue;
+
+  ck_assert_uint_eq (e->msg.type, MEMIF_MSG_TYPE_CONNECT);
+  ck_assert_int_eq (e->fd, -1);
+  ck_assert_str_eq (e->msg.connect.if_name, TEST_IF_NAME);
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_enq_connected)
+{
+  int err;
+  memif_connection_t conn;
+  conn.msg_queue = NULL;
+  memset (conn.args.interface_name, 0, sizeof (conn.args.interface_name));
+  strncpy ((char *) conn.args.interface_name, TEST_IF_NAME,
+	   strlen (TEST_IF_NAME));
+
+  if ((err = memif_msg_enq_connected (&conn)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_queue_elt_t *e = conn.msg_queue;
+
+  ck_assert_uint_eq (e->msg.type, MEMIF_MSG_TYPE_CONNECTED);
+  ck_assert_int_eq (e->fd, -1);
+  ck_assert_str_eq (e->msg.connect.if_name, TEST_IF_NAME);
+  queue_free (&conn.msg_queue);
+}
+
+END_TEST
+START_TEST (test_send)
+{
+  int err;
+  int fd = -1, afd = 5;
+  memif_msg_t msg;
+  memset (&msg, 0, sizeof (msg));
+
+  if ((err = memif_msg_send (fd, &msg, afd)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_BAD_FD,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+}
+
+END_TEST
+START_TEST (test_send_hello)
+{
+  int err;
+  memif_connection_t conn;
+  conn.fd = -1;
+  memset (conn.args.instance_name, 0, sizeof (conn.args.instance_name));
+  strncpy ((char *) conn.args.instance_name, TEST_APP_NAME,
+	   strlen (TEST_APP_NAME));
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if ((err = memif_msg_send_hello (conn.fd)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_BAD_FD,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+}
+
+END_TEST
+START_TEST (test_send_disconnect)
+{
+  int err;
+  memif_connection_t conn;
+  conn.fd = -1;
+
+  /* only possible fail if memif_msg_send fails...  */
+  /* obsolete without socket */
+  if ((err =
+       memif_msg_send_disconnect (conn.fd, "unit_test_dc",
+				  0)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_BAD_FD, "err code: %u, err msg: %s", err,
+		   memif_strerror (err));
+}
+
+END_TEST
+START_TEST (test_recv_hello)
+{
+  int err;
+  memif_connection_t conn;
+  memif_msg_t msg;
+
+  memif_msg_hello_t *h = &msg.hello;
+
+  msg.type = MEMIF_MSG_TYPE_HELLO;
+
+  h->min_version = MEMIF_VERSION;
+  h->max_version = MEMIF_VERSION;
+  h->max_s2m_ring = 1;
+  h->max_m2s_ring = 1;
+  h->max_log2_ring_size = 14;
+  strncpy ((char *) h->name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  memset (conn.remote_name, 0, sizeof (conn.remote_name));
+
+  conn.args.num_s2m_rings = 4;
+  conn.args.num_m2s_rings = 6;
+  conn.args.log2_ring_size = 10;
+
+  if ((err = memif_msg_receive_hello (&conn, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_uint_eq (conn.run_args.num_s2m_rings, 2);
+  ck_assert_uint_eq (conn.run_args.num_m2s_rings, 2);
+  ck_assert_uint_eq (conn.run_args.log2_ring_size, 10);
+  ck_assert_str_eq (conn.remote_name, TEST_IF_NAME);
+
+  h->max_version = 9;
+  if ((err = memif_msg_receive_hello (&conn, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_PROTO,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+}
+
+END_TEST
+START_TEST (test_recv_init)
+{
+  int err;
+  memif_connection_t conn;
+
+  conn.args.interface_id = 69;
+  conn.args.is_master = 1;
+  conn.fd = -1;
+  conn.args.mode = 0;
+  memset (conn.args.secret, '\0', 24);
+  strncpy ((char *) conn.args.secret, TEST_SECRET, strlen (TEST_SECRET));
+
+  memif_msg_t msg;
+
+  memif_msg_init_t *i = &msg.init;
+
+  msg.type = MEMIF_MSG_TYPE_INIT;
+
+  i->version = MEMIF_VERSION;
+  i->id = 69;
+  i->mode = 0;
+  memset (i->name, '\0', 32);
+  memset (i->secret, '\0', 24);
+  strncpy ((char *) i->name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+  strncpy ((char *) i->secret, TEST_SECRET, strlen (TEST_SECRET));
+
+  memif_socket_t ms;
+  ms.interface_list_len = 1;
+  ms.interface_list = malloc (sizeof (memif_list_elt_t));
+  memif_list_elt_t elt;
+  elt.key = 69;
+  elt.data_struct = &conn;
+  add_list_elt (&elt, &ms.interface_list, &ms.interface_list_len);
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  i->version = 9;
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_PROTO,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+  i->version = MEMIF_VERSION;
+
+  i->id = 78;
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_ID,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+  i->id = 69;
+
+  i->mode = 1;
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_MODE,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+  i->mode = 0;
+
+  i->secret[0] = '\0';
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_SECRET,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+  strncpy ((char *) i->secret, TEST_SECRET, strlen (TEST_SECRET));
+
+  conn.args.is_master = 0;
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_ACCSLAVE,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+  conn.args.is_master = 1;
+
+  conn.fd = 5;
+  if ((err = memif_msg_receive_init (&ms, -1, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg ((err == MEMIF_ERR_ALRCONN) || (err == MEMIF_ERR_BAD_FD),
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+}
+
+END_TEST
+START_TEST (test_recv_add_region)
+{
+  int err;
+  memif_connection_t conn;
+  conn.regions = NULL;
+  memif_msg_t msg;
+  msg.type = MEMIF_MSG_TYPE_ADD_REGION;
+  msg.add_region.size = 2048;
+  msg.add_region.index = 0;
+
+  int fd = 5;
+
+  if ((err =
+       memif_msg_receive_add_region (&conn, &msg, fd)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_region_t *mr = conn.regions;
+
+  ck_assert_uint_eq (mr->fd, fd);
+  ck_assert_uint_eq (mr->region_size, 2048);
+  ck_assert_ptr_eq (mr->shm, NULL);
+}
+
+END_TEST
+START_TEST (test_recv_add_ring)
+{
+  int err;
+  memif_connection_t conn;
+  int fd = 5;
+  memif_msg_t msg;
+  conn.args.num_s2m_rings = 2;
+  conn.args.num_m2s_rings = 2;
+  conn.rx_queues = NULL;
+  conn.tx_queues = NULL;
+
+  msg.type = MEMIF_MSG_TYPE_ADD_RING;
+  memif_msg_add_ring_t *ar = &msg.add_ring;
+
+  ar->log2_ring_size = 10;
+  ar->region = 0;
+  ar->offset = 0;
+  ar->flags = 0;
+  ar->flags |= MEMIF_MSG_ADD_RING_FLAG_S2M;
+  ar->index = 1;
+
+  if ((err =
+       memif_msg_receive_add_ring (&conn, &msg, fd)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+
+  ar->offset = 2048;
+  ar->flags &= ~MEMIF_MSG_ADD_RING_FLAG_S2M;
+
+  if ((err =
+       memif_msg_receive_add_ring (&conn, &msg, fd)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+}
+
+END_TEST
+START_TEST (test_recv_connect)
+{
+  int err;
+  memif_conn_handle_t c = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+
+  args.interface_id = 0;
+  args.is_master = 0;
+  args.mode = 0;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if ((err = memif_create (&c, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *conn = (memif_connection_t *) c;
+
+  conn->run_args.num_s2m_rings = 1;
+  conn->run_args.num_m2s_rings = 1;
+  conn->run_args.log2_ring_size = 10;
+  conn->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (conn)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_t msg;
+  memset (&msg, 0, sizeof (msg));
+  msg.type = MEMIF_MSG_TYPE_CONNECT;
+
+  memset (msg.connect.if_name, 0, sizeof (msg.connect.if_name));
+  strncpy ((char *) msg.connect.if_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+
+  if ((err = memif_msg_receive_connect (conn, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_str_eq (conn->remote_if_name, TEST_IF_NAME);
+}
+
+END_TEST
+START_TEST (test_recv_connected)
+{
+  int err;
+  memif_conn_handle_t c = NULL;
+  memif_conn_args_t args;
+  memset (&args, 0, sizeof (args));
+
+  args.interface_id = 0;
+  args.is_master = 0;
+  args.mode = 0;
+
+  if ((err =
+       memif_init (control_fd_update, TEST_APP_NAME)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  if ((err = memif_create (&c, &args, on_connect,
+			   on_disconnect, on_interrupt,
+			   NULL)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_connection_t *conn = (memif_connection_t *) c;
+
+  conn->run_args.num_s2m_rings = 1;
+  conn->run_args.num_m2s_rings = 1;
+  conn->run_args.log2_ring_size = 10;
+  conn->run_args.buffer_size = 2048;
+
+  if ((err = memif_init_regions_and_queues (conn)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  memif_msg_t msg;
+  memset (&msg, 0, sizeof (msg));
+  msg.type = MEMIF_MSG_TYPE_CONNECT;
+
+  memset (msg.connect.if_name, 0, sizeof (msg.connect.if_name));
+  strncpy ((char *) msg.connect.if_name, TEST_IF_NAME, strlen (TEST_IF_NAME));
+
+  if ((err = memif_msg_receive_connected (conn, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_abort_msg ("err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_str_eq (conn->remote_if_name, TEST_IF_NAME);
+}
+
+END_TEST
+START_TEST (test_recv_disconnect)
+{
+  int err;
+  memif_connection_t conn;
+  memif_msg_t msg;
+  msg.type = MEMIF_MSG_TYPE_DISCONNECT;
+  memset (msg.disconnect.string, 0, sizeof (msg.disconnect.string));
+  strncpy ((char *) msg.disconnect.string, "unit_test_dc", 12);
+
+  if ((err = memif_msg_receive_disconnect (&conn, &msg)) != MEMIF_ERR_SUCCESS)
+    ck_assert_msg (err == MEMIF_ERR_DISCONNECT,
+		   "err code: %u, err msg: %s", err, memif_strerror (err));
+
+  ck_assert_str_eq (conn.remote_disconnect_string, "unit_test_dc");
+}
+
+END_TEST Suite * socket_suite ()
+{
+  Suite *s;
+  TCase *tc_msg_queue;
+  TCase *tc_msg_enq;
+  TCase *tc_msg_send;
+  TCase *tc_msg_recv;
+
+  /* create socket test suite */
+  s = suite_create ("Socket messaging");
+
+  /* create msg queue test case */
+  tc_msg_queue = tcase_create ("Message queue");
+  /* add tests to test case */
+  tcase_add_test (tc_msg_queue, test_msg_queue);
+
+  /* create msg enq test case */
+  tc_msg_enq = tcase_create ("Message enqueue");
+  /* add tests to test case */
+  tcase_add_test (tc_msg_enq, test_enq_ack);
+  tcase_add_test (tc_msg_enq, test_enq_init);
+  tcase_add_test (tc_msg_enq, test_enq_add_region);
+  tcase_add_test (tc_msg_enq, test_enq_add_ring);
+  tcase_add_test (tc_msg_enq, test_enq_connect);
+  tcase_add_test (tc_msg_enq, test_enq_connected);
+
+  /* create msg send test case */
+  tc_msg_send = tcase_create ("Message send");
+  /* add tests to test case */
+  tcase_add_test (tc_msg_send, test_send);
+  tcase_add_test (tc_msg_send, test_send_hello);
+  tcase_add_test (tc_msg_send, test_send_disconnect);
+
+  /* create msg recv test case */
+  tc_msg_recv = tcase_create ("Message receive");
+  /* add tests to test case */
+  tcase_add_test (tc_msg_recv, test_recv_hello);
+  tcase_add_test (tc_msg_recv, test_recv_init);
+  tcase_add_test (tc_msg_recv, test_recv_add_region);
+  tcase_add_test (tc_msg_recv, test_recv_add_ring);
+  tcase_add_test (tc_msg_recv, test_recv_connect);
+  tcase_add_test (tc_msg_recv, test_recv_connected);
+  tcase_add_test (tc_msg_recv, test_recv_disconnect);
+
+  /* add test cases to test suite */
+  suite_add_tcase (s, tc_msg_queue);
+  suite_add_tcase (s, tc_msg_enq);
+  suite_add_tcase (s, tc_msg_send);
+  suite_add_tcase (s, tc_msg_recv);
+
+  /* return socket test suite to test runner */
+  return s;
+}
diff --git a/extras/libmemif/test/socket_test.h b/extras/libmemif/test/socket_test.h
new file mode 100644
index 0000000..02ec69c
--- /dev/null
+++ b/extras/libmemif/test/socket_test.h
@@ -0,0 +1,25 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#ifndef _SOCKET_TEST_H_
+#define _SOCKET_TEST_H_
+
+#include <unit_test.h>
+
+Suite *socket_suite ();
+
+#endif /* _SOCKET_TEST_H_ */
diff --git a/extras/libmemif/test/unit_test.c b/extras/libmemif/test/unit_test.c
new file mode 100644
index 0000000..a305de9
--- /dev/null
+++ b/extras/libmemif/test/unit_test.c
@@ -0,0 +1,63 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <main_test.h>
+#include <socket_test.h>
+
+int
+on_connect (memif_conn_handle_t conn, void *ctx)
+{
+  return 0;
+}
+
+int
+on_disconnect (memif_conn_handle_t conn, void *ctx)
+{
+  return 0;
+}
+
+int
+on_interrupt (memif_conn_handle_t conn, void *ctx, uint16_t qid)
+{
+  return 0;
+}
+
+int
+control_fd_update (int fd, uint8_t events)
+{
+  return 0;
+}
+
+int
+main (void)
+{
+  int num_fail;
+  Suite *main, *socket;
+  SRunner *sr;
+
+  main = main_suite ();
+  socket = socket_suite ();
+
+  sr = srunner_create (main);
+
+  srunner_add_suite (sr, socket);
+
+  srunner_run_all (sr, CK_VERBOSE);
+  num_fail = srunner_ntests_failed (sr);
+  srunner_free (sr);
+  return (num_fail == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/extras/libmemif/test/unit_test.h b/extras/libmemif/test/unit_test.h
new file mode 100644
index 0000000..fae3cba
--- /dev/null
+++ b/extras/libmemif/test/unit_test.h
@@ -0,0 +1,38 @@
+/*
+ *------------------------------------------------------------------
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#ifndef _UNIT_TEST_H_
+#define _UNIT_TEST_H_
+
+#include <stdlib.h>
+#include <check.h>
+
+#include <libmemif.h>
+
+#define TEST_APP_NAME "unit_test_app"
+#define TEST_IF_NAME  "unit_test_if"
+#define TEST_SECRET   "psst"
+
+int on_connect (memif_conn_handle_t conn, void *ctx);
+
+int on_disconnect (memif_conn_handle_t conn, void *ctx);
+
+int on_interrupt (memif_conn_handle_t conn, void *ctx, uint16_t qid);
+
+int control_fd_update (int fd, uint8_t events);
+
+#endif /* _UNIT_TEST_H_ */
