aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/transport.md
blob: 7f8293a78f48f7a3a25aeab438f2e794732fb78e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# The Transport Library

## Introduction

This library provides transport services and socket API for applications willing to communicate
using the hICN protocol stack.

Overview:

- Implementation of the hICN core objects (interest, data, name..) exploiting the API provided by [libhicn](../lib).
- Connectors for connecting the application to either the hicn-plugin or the hicn-light forwarder.
- Transport protocols (RAAQM, CBR, RTP)
- Transport services (authentication, integrity, segmentation, reassembly, naming)
- Interfaces for Applications (from low-level interfaces for interest-data interaction to high level interfaces for Application Data Unit interaction)

## Build Dependencies

- libparc
- libmemif (linux only, if compiling with VPP support)
- libasio

If you wish to use the library for connecting to the vpp hicn-plugin, you will need to also install vpp, the vpp libraries and the libmemif libraries:

- DEB packages:
  - vpp
  - vpp-lib
  - vpp-dev

You can get them either from from the vpp packages ot the source code. Check the [VPP wiki](https://wiki.fd.io/view/VPP) for instructions.

Libmemif is in the vpp-lib and vpp-dev packages.

### macOS

We recommend to use [HomeBrew](https://brew.sh/) for installing the libasio dependency:

```bash
 brew install asio
```

Download, compile and install libparc:

```bash
 git clone -b cframework/master https://gerrit.fd.io/r/cicn cframework && cd cframework
 mkdir -p libparc.build && cd libparc.build
 cmake ../libparc
 make
 make install
```

Libparc will be installed by default under `/usr/local/lib` and `/usr/local/include`.

Since VPP does not support macOS, the hicn-plugin connector is not built.

## Build the library

From the project root folder:

```bash
 cd libtransport
 mkdir build && cd build
 cmake ..
 make
```

### Compile options

The build process can be customized with the following options:

- `CMAKE_INSTALL_PREFIX`: The path where you want to install the library.
- `CMAKE_BUILD_TYPE`: The build configuration. Options: `Release`, `Debug`. Default is `Release`.
- `ASIO_HOME`: The folder containing the libasio headers.
- `LIBPARC_HOME`: The folder containing the libparc headers and libraries.
- `VPP_HOME`: The folder containing the installation of VPP.
- `LIBMEMIF_HOME`: The folder containing the libmemif headers and libraries.
- `BUILD_MEMIF_CONNECTOR`: On linux, set this value to `ON` for building the VPP connector.

An option can be set using cmake -D`OPTION`=`VALUE`.

### Install the library

For installing the library, from the cmake build folder:

```bash
 sudo make install
```