-
Notifications
You must be signed in to change notification settings - Fork 17
Overview
The NDN-Lite library implements the Named Data Networking Stack with the high-level application support functionalities and low-level OS/hardware adaptations for Internet of Things (IoT) scenarios.
The architecture of NDN-Lite library is independent of the OS and the development kit. The exposed API makes the library easily pluggable to IoT Software Development Kit (SDK) and IoT Operating Systems, by creating a thin adaptation layer between the platform and the NDN-Lite.
The library was designed to provide more than core NDN network stack. The library allows applications to directly integrate supporting functionalities including Access Control, Service Discovery, Schematized Trust and so on.
The following block diagram presents the architecture of the project.

In the current version, this library implements the following features:
NDN Layer:
- NDN Encoding Decoding, which is compatible with NDN TLV format 0.3.
- NDN IoT Forwarder, a lightweight forwarding module implementation for IoT. Will support Content Store in the near future.
- Abstract Face that can be inherited by OS/SDK specific adaptations.
- DirectFace to support app-forwarder communication for single-thread applications.
- DummyFace for test only.
Security:
- Crypto front end which supports OS/SDK specific crypto back-end implementation.
- A default pure-software crypto backend using tinycrypto and micro-ecc.
- Interest and Data signing and verification.
- AES Encrypted Content TLV for Data packet.
Application Support Layer:
- Ease-of-use Security Bootstrapping Module to achieve efficient and secured trust anchor installation and identity certificate issuance. Check the protocol details at here.
- Lightweight Name-based Access Control to provide data confidentiality and control of access to data. Check the protocol details at here.
- Lightweight Service Discovery Protocol Module to enable an application provide services to the network or utilize existing services in the network system. Check the protocol details at here.
Platform Adaptation:
- Nordic NRF 802154 Raw Driver Adaptation, including an adaptation layer and a face implementation called
ndn-nrf-802154-face. - Nordic SDK adaptation, including an adaptation layer and a face implementation called
ndn-nrf-ble-face.
-
./encodedirectory: NDN packet encoding and decoding. -
./forwarderdirectory: NDN lightweight forwarder implementation and Network Face abstraction. -
./facedirectory: The implementation of network face and application face. Each face instance may require the support from the hardware/OS adaptation -
./securitydirectory: Security support. -
./app-supportdirectory: Access Control, Service Discovery, and other high-level modules that can facilitate application development. -
./adaptationdirectory: Hardware/OS adaptation. When using NDN-Lite, developers are supposed to select one or more adaptations for the platform/OS they are using for their application development.
git clone https://github.com/Zhiyi-Zhang/ndn_standalone.git
2. Select the adaptation layer and network face implementation that can work with your project's platform.
Warning: You are only supposed to use the adaptation layer that is designed for your platform and the face implementation(s) that can work with your platform. Using incompatible adaptation and faces will lead to compilation failures.
If there is no existing adaptation layer and faces for your current development platform, you can easily create a new adaptation layer with your customized face implementation following the instructions described in later sections.
You can config which security/crypto backend to use by defining the macro value to be 1 with compiler's c flags.
You can check ./security/config.h for details.
By default, you can use the software backend provided by NDN-Lite.
However, to achieve the best performance, it is recommended to use the platform-specific back end.
If there is no existing backend for your current development platform, you can easily create a new backend following the instructions described in later sections.
An example would be:
# In the MakeFile
SRC_FILES := \
ndn-lite/encode/data.c \
ndn-lite/encode/decoder.c \
ndn-lite/encode/encoder.c \
ndn-lite/encode/interest.c \
... # and all the needed files under ./encode, ./security, ./forwarder, ./face, ./app-support, and ./adaptation
CFLAGS += -I/path/to/ndn-lite
To create a Face implementation based on platform-specific network API, one needs to create an adaptation layer.
- Under the
./adaptationdirectory, create a new folder with the name that can reflect the platform. - In the folder, create new header and/or source files to include platform-specific header files and implement your helper functions.
- Under the
./facedirectory, create a new header file and a new source file for the face (use the face name as the file name, e.g., ndn-nrf-802154-face). - Implement a new Face structure in the header and source files. Developers need to make sure that the first structure element is an
ndn_face_intfinstance. - In the source file, implement the functions defined in the
ndn_face_intfstructure. - In the header file, create a construction function to create a face instance or get the face instance if the face is a singleton. The function pointers binding should also be done in this function.
Existing examples:
- Nordic SDK Adaptation with
ndn-nrf-ble-face: The files under./adaptation/ndn-nrf-ble-adaptation/is the adaptation layer and the files./face/ndn-nrf-ble-face.c,./face/ndn-nrf-ble-face.hare the face implementation. - NRF 802154 driver Adaptation with
ndn-nrf-802154-face: The files under./adaptation/ndn-nrf-802154-driver/is the adaptation layer and the files./face/ndn-nrf-802154-face.c,./face/ndn-nrf-802154-face.hare the face implementation.
To create a new security/crypto backend for an OS/SDK platform, please follow the steps.
- Under the
./adaptationdirectory, create a new folder with the name that can reflect the platform. Of course, you don't need to create a new directory if the adaptation for the platform already exists. - In the folder, create new header and/or source files to include platform-specific header files and implement your helper functions.
- Under the
./securitydirectory, create a new folder with the name can reflect the platform (e.g.,./security/nordic-sdk-crypto-back/). - If you want to use platform-specific APIs for digital signature generation and verification, implement the APIs defined in
./security/sign-verify.h. - If you want to use platform-specific APIs for AES encryption and decryption, implement the APIs defined in
./security/aes.h. - If you want to use platform-specific APIs for randomness, implement the APIs defined in
./security/random.h.
In the ./security/config.h file, create a new macro for your backend and config the included files.