Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import ccn lite test cases #49

Merged
merged 1 commit into from Nov 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 55 additions & 0 deletions ccn-lite-client/HOWTO
@@ -0,0 +1,55 @@
simple appserver (all in one shell)
====================================================

0. create tap devices: *./cpu/native/tapsetup.sh create 3*
1. build ccn-lite-client: *CFLAGS="-DHAVE_VALGRIND_VALGRIND_H" make -B clean all*
2. start: *./bin/ccn-lite-client.elf tap0* (valgrind support included)
3. start ccn thread: *ccn* [enter] (this starts the ccn relay network stack)
4. start appserver thread: *appserver* [enter] (this starts the userland appserver, which registers for "/riot/appserver/"
5. request content: *interest /riot/appserver/test* [enter] (ask the relay for this "file", userland code splits this up in
chunks and requests them from the relay. In the relay the name "/riot/appserver" is registered to the RIOT MSG face with
thread of the appserver. Interest is forwarded to appserver which replies with content....
6. tear down ccn network stack: *haltccn* [enter]
7. now you can hit *ctrl+c* to stop the RIOT process [in valgrind you can notice that there is no leak]

simple forward (needs two shells)
====================================================

SHELL 1 | SHELL 2
--------------------------------------------------------------------------------------------------------------
0. create tap devices: *./cpu/native/tapsetup.sh create 3* |
1. build ccn-lite-client: *make -B clean all* | build ccn-lite: *make clean all*
2. start: *./bin/ccn-lite-client.elf tap0* | start: *./bin/ccn-lite-relay.elf tap1*
3. start ccn thread: *ccn* [enter] | [it starts ccn automaticly]
4. set address: *addr 1* [enter] | [it picks address 42 automaticly]
5. register prefix the ccn-lite stack: *prefix /riot/ newTRANSface 42* [enter] | [it populates the cache automaticly]
6. request content: *interest /riot/text* [enter] |
7. tear down ccn network stack: *haltccn* [enter]

advanced forward (needs three [four] shells)
====================================================

SHELL 1 | SHELL 2 | SHELL 3 | SHELL 4 (currently a bug in the native port on heavy traffic)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0. create tap devices: *./cpu/native/tapsetup.sh create 3* | | |
1. build ccn-lite-client: *make -B clean all* | | build ccn-lite: make clean all | ping -Itapbr0 8.8.8.8
2. start: *./bin/ccn-lite-client.elf tap0* | start: *./bin/ccn-lite-client.elf tap1* | start: ./bin/ccn-lite-relay.elf tap2 |
3. start ccn thread: *ccn* [enter] | start ccn thread: *ccn* [enter] | [it starts ccn automaticly] |
4. set address: *addr 1* [enter] | set address: *addr 2* [enter] | [it picks address 42 automaticly] |
5. *prefix /riot/ newTRANSface 2* [enter] | *prefix /riot/ newTRANSface 42* [enter] | [it populates the cache automaticly] |
6. request content: *interest /riot/text* [enter] | | |


overdosed forward (needs three [four] shells)
====================================================

SHELL 1 | SHELL 2 | SHELL 3 | SHELL 4
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0. create tap devices: *./cpu/native/tapsetup.sh create 3* | | |
1. build ccn-lite-client: *make -B clean all* | | | ping -Itapbr0 8.8.8.8
2. start: *./bin/ccn-lite-client.elf tap0* | start: *./bin/ccn-lite-client.elf tap1* | start: *./bin/ccn-lite-client.elf tap2* |
3. start ccn thread: *ccn* [enter] | start ccn thread: *ccn* [enter] | start ccn thread: *ccn* [enter] |
4. set address: *addr 1* [enter] | set address: *addr 2* [enter] | set address: *addr 3* [enter] |
5. | | start appserver: *appserver* [enter] |
6. *prefix /riot/ newTRANSface 2* [enter] | *prefix /riot/ newTRANSface 3* [enter] | |
7. request content: *interest /riot/appserver/test* [enter] | | |
52 changes: 52 additions & 0 deletions ccn-lite-client/Makefile
@@ -0,0 +1,52 @@
####
#### Sample Makefile for building apps with the RIOT OS
####
#### The Sample Filesystem Layout is:
#### /this makefile
#### ../../RIOT
#### ../../boards for board definitions (if you have one or more)
####

# name of your project
export PROJECT=ccn-lite-client

# for easy switching of boards
ifeq ($(strip $(BOARD)),)
export BOARD=native
endif

# this has to be the absolute path of the RIOT-base dir
export RIOTBASE =$(CURDIR)/../../RIOT
export RIOTBOARD =$(CURDIR)/../../boards

ifeq ($(BOARD),stm32f4discovery)
include Makefile.$(BOARD)
endif

## Modules to include.

USEMODULE += config
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += uart0
USEMODULE += posix
USEMODULE += ps
USEMODULE += auto_init

USEMODULE += transceiver
ifeq ($(BOARD),msba2)
USEMODULE += cc110x_ng
else ifeq ($(BOARD),native)
USEMODULE += nativenet
endif

USEMODULE += rtc
USEMODULE += crypto
USEMODULE += ccn_lite
USEMODULE += ccn_lite_client
USEMODULE += bloom
USEMODULE += hashes

export INCLUDES=-I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/net/ccn_lite/include

include $(RIOTBASE)/Makefile.include