Skip to main content

Overview

The Mango SDK development package (libmango-dev) provides user APIs, Libraries and example applications. It includes a set of reference applications such as TCP/IP full offload, AI preprocessing, device emulation, and RDMA PCC.

~$ sudo apt install libmango-dev
~$ ls /usr/include/mango
libmango.h typedef.h
~$ ls /usr/share/mango-sdk/example/
ai dma file pcc tcp tls sdd ...

How to Build Examples

To build example applications, make sure you have installed libmango-dev package and the associated build tools.

~$ sudo apt intall libmango-dev meson pkg-config

For example, run the following command to build all examples.

~$ cd /usr/share/mango-sdk/example
~$ meson build
~$ ninja -C build
info

The prebuilt applications are also available from libmango-example package.

How to Develop Your Apps

To use MB-SDK APIs, you have to include libmango.h in C/C++ source files, which is available from libmango-dev package.

For example, here is a simple program to print a library version.

version.c
#include <stdio.h>
#include <libmango.h>

int main() {
int ver_major, ver_minor, ver_micro;

mango_get_version(&ver_major, &ver_minor, &ver_micro);

printf("libmango version %u.%u.%u\n", ver_major, ver_minor, ver_micro);

return 0;
}

You can compile and link the program as follows.

~$ gcc version.c `pkg-config libmango --cflags --libs`
~$ ./a.out
libmango version 0.5.3

List of Supported APIs

Refer to the full list of supported APIs in each section.