This is work in progress! Everything can change at any moment! :-)
PiCN is a...
- prototyping-friendly, modular and extensible library for content-centric networkig (CCN).
- a set of tools and network nodes.
- our platform to build the next generation of NFN.
- a simple Simulation System for ICN and NFN
PiCN is written in Python 3.6+ and tested on Linux, Mac OS X and Windows. More than 400 unit tests are included.
- Link Layer (UDP faces)
- Packet Encoding Layer (NDN packet format + link protocol)
- CCN Layer (basic forwarding logic, data structs)
- Chunking Layer
- Computation Layer (next-gen NFN implementation)
- Management interface to each layer
- Forwarder
- Setup Tool to start, connect, configure and inspect multiple nodes (with NDN testbed access)
- Peek Tool
- Management Tool
Let us setup a simple network which consists of a data repository and a forwarding node:
Clone PiCN from github:
you@machine:~$ git clone https://github.com/cn-uofbasel/PiCN.git
Add the PiCN-tools to your PATH (bash):
you@machine:~$ PATH=$PATH:`pwd`/PiCN/starter
or config python library:
you@machine:~$ cd PiCN && export PYTHONPATH=${PYTHONPATH}:`pwd`
Prepare content for a repository:
you@machine:~$ mkdir /tmp/repo
you@machine:~$ touch /tmp/repo/example && echo "HELLO WORLD" > /tmp/repo/example
...
Start a repository node and a forwarder:
you@machine:~$ picn-repo --format ndntlv /tmp/repo /the/prefix 10000 &
you@machine:~$ picn-relay --format ndntlv --port 9000 &
...
Configure a forwarding rule from the forwarder to the repository:
you@machine:~$ picn-mgmt --ip 127.0.0.1 --port 9000 newface 127.0.0.1:10000:0
you@machine:~$ picn-mgmt --ip 127.0.0.1 --port 9000 newforwardingrule /the:0
...
Note: you can also install a forwarding rule, which forwards an interest to multiple faces in parallel (Assuming there are faces with the face-id 0 and 1. All interests with the prefix "/prefix" will be forwarded to the faces with face-id 0 and 1 in parallel):
you@machine:~$ picn-mgmt --ip 127.0.0.1 --port 9000 newforwardingrule /prefix:0,1
...
Fetch content from the repository via the forwarding node:
you@machine:~$ picn-fetch --format ndntlv 127.0.0.1 9000 /the/prefix/example
HELLO WORLD
NFN is a computation engine for ICN. It enables user to express a how data should be transformed before they are delivered, and the network will find a way to deliver the result.
More details: PiCN NFN