vpp/docs/interfacing/cpp/index.rst
Nathan Skrzypczak cbb4e460c4 docs: C & C++ apis examples
Type: docs

Change-Id: I5b6c388332bdd3a29777d728c3357816c8411ea2
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-13 23:22:32 +00:00

27 lines
570 B
ReStructuredText

.. _cppvpp:
==============
C++ api client
==============
This describes how to write a C++ api client connecting to VPP's binary API.
Connecting to VPP is done with :
::
auto err = con.connect("example_client", nullptr, 32, 32);
You can specify the path to the api socket/shared memory you want to connect to
with the second parameter (set to ``nullptr``, meaning default)
.. literalinclude:: ./api_example/api_example.cc
:language: cpp
To build this you could use the following makefile
.. literalinclude:: ./api_example/Makefile
:language: makefile