1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/ndn-ping
Marian Buschsieweke 12140ffb0e
examples,tests: Drop redundant dependency
When depending on one or more shell commands, the shell is pulled in
as dependency anyway.
2023-04-19 16:58:10 +02:00
..
main.c examples: ndn-riot: import of ndn-ping application 2018-05-24 10:58:26 +02:00
Makefile examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
Makefile.ci examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
ndn_ping.c examples/ndn_ping: fix problem with NDEBUG 2020-03-12 13:32:22 +01:00
README.md examples: adapt doc on tapsetup for new sudo requirement 2020-01-03 21:00:54 +01:00

ndn-ping

This application demonstrates the usage of the package ndn-riot. This example basically enables the user to setup a ndn data server, and a ndn client that can request the data. Any board with a default netdev can be used to run this example.

Setting up for native

Create tap and tapbr devices using RIOT's tapsetup script before stating the application:

sudo ./RIOTDIR/dist/tools/tapsetup/tapsetup

Then run the application on 2 different terminals :

# on the first terminal
make PORT=tap0 term
# on the second terminal
make PORT=tap1 term

Usage

The user can run shell commands (type "help" to see the list). Only one command is relative to ndn : ndnping.

Start a server

ndnping server name_uri server_id

Replace name_uri by a ndn name (for example /test), and server_id by a number. server_id will be appended to the name of the data sent by the server. This can help when several servers are running using the same name_uri, but is not useful in our example.

A server will start and answer to any interest message matching the name.

Start a client

ndnping client name_uri max_count

Replace name_uri by a ndn name, and max_count by a number. max_count is the number of interest message that will be sent.

A client will start, send a first interest message and wait for a data message. Once data is received or timeout is reached, the client can send the next interest message, or stop when the last interest have been sent.