From 33088f5c66b037641c75ca556c7467e0fb6389c8 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Thu, 26 May 2016 18:12:33 +0200 Subject: [PATCH 1/2] pkg ccn-lite: update revision --- pkg/ccn-lite/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ccn-lite/Makefile b/pkg/ccn-lite/Makefile index 25b211db3a..e43612caa6 100644 --- a/pkg/ccn-lite/Makefile +++ b/pkg/ccn-lite/Makefile @@ -1,6 +1,6 @@ PKG_NAME=ccn-lite PKG_URL=https://github.com/cn-uofbasel/ccn-lite/ -PKG_VERSION=9e48d328e162e97f091d913ada0bf50f58d1d3d7 +PKG_VERSION=1ae5bddc68334bc062c148b877894ba8155112c4 .PHONY: all From 8f49e8f9d3a73e061c45b2361f971198439ded05 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Thu, 21 Apr 2016 21:57:39 +0200 Subject: [PATCH 2/2] pkg ccn-lite: add prototypes for producer function --- pkg/ccn-lite/ccn-lite-riot.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/ccn-lite/ccn-lite-riot.h b/pkg/ccn-lite/ccn-lite-riot.h index be164bfe1e..5b1f6865ba 100644 --- a/pkg/ccn-lite/ccn-lite-riot.h +++ b/pkg/ccn-lite/ccn-lite-riot.h @@ -136,6 +136,12 @@ extern "C" { */ extern struct ccnl_relay_s ccnl_relay; +/** + * @brief Function pointer type for local producer function + */ +typedef int (*ccnl_producer_func)(struct ccnl_relay_s *relay, struct + ccnl_face_s *from, struct ccnl_pkt_s *pkt); + /** * @brief Start the main CCN-Lite event-loop * @@ -208,6 +214,16 @@ int ccnl_fib_rem_entry(struct ccnl_relay_s *relay, struct ccnl_prefix_s *pfx, st */ void ccnl_fib_show(struct ccnl_relay_s *relay); +/** + * @brief Set a local producer function + * + * Setting a local producer function allows to generate content on the fly or + * react otherwise on any kind of incoming interest. + * + * @param[in] func The function to be called first for any incoming interest + */ +void ccnl_set_local_producer(ccnl_producer_func func); + #ifdef __cplusplus } #endif