Skip to content

Setting up the environment

Daniele Lacamera edited this page Jun 10, 2018 · 17 revisions

For development and testing we use a Linux system, therefore further instructions will be for such a system.

Prerequisite packages

Please make sure you have the latest version of the following two packages installed on your OS:

  • git (to download the picoTCP repository)
  • check (to run the unit tests)
  • vde2, libvdeplug, libpcap (to run functional tests and examples)

e.g. for Ubuntu 14.04 and Ubuntu 16.04:

$ sudo apt-get install git
$ sudo apt-get install check
$ sudo apt-get install vde2
$ sudo apt-get install libvdeplug2-dev   
$ sudo apt-get install libpcap0.8-dev   
$ sudo apt-get install openvpn

e.g. for Fedora:

$ sudo dnf install git
$ sudo dnf install check-devel
$ sudo dnf install libasan.x86_64
$ sudo dnf install vde2
$ sudo dnf install libvdeplug2-dev   
$ sudo dnf install libpcap0.8-dev   

e.g. for OpenSUSE and derivates:

$ sudo zypper install git
$ sudo zypper install check-devel
$ sudo zypper install vde2
$ sudo zypper install libvdeplug3-devel
$ sudo zypper install libpcap-devel

Get picoTCP

The picoTCP source code is hosted on GitHub at https://gitlab.com/picotcp/picotcp. The easiest way to get a hold of a copy is to use Git and make a clone:

$ git clone https://gitlab.com/picotcp/picotcp

Or if you have a gitlab account setup with a ssh public key (recommended):

$ git clone git@gitlab.com:picotcp/picotcp.git

Building picoTCP

Make sure you are in the picoTCP directory and compile picoTCP with:

$ make

You should now have the picoTCP library (libpicotcp.a) statically compiled for your own machine’s architecture under picotcp/build/lib.

Virtual devices

Sometimes you just want to mess around with some code without having hardware near at hand. picoTCP has tun/tap and vde support so it can run natively on your Linux distribution of choice without a problem! For more info we refer to:Kernel and The VDE project

We use these virtual devices in the tests, for the examples but also during development.

What's next?

Clone this wiki locally