mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
enable nonces in interests
This commit is contained in:
parent
9fa0844f3f
commit
87d8e4f99c
@ -36,7 +36,7 @@ USEMODULE += posix
|
||||
USEMODULE += ps
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += hwtimer
|
||||
|
||||
USEMODULE += random
|
||||
USEMODULE += transceiver
|
||||
ifeq ($(BOARD),msba2)
|
||||
USEMODULE += cc110x_ng
|
||||
|
@ -235,7 +235,8 @@ static void riot_ccn_pit_test(char *str)
|
||||
memset(segment_string, 0, 16);
|
||||
snprintf(segment_string, 16, "%d", segment);
|
||||
prefix[i] = segment_string;
|
||||
int interest_len = mkInterest(prefix, NULL, (unsigned char *) small_buf);
|
||||
unsigned int interest_nonce = genrand_uint32();
|
||||
int interest_len = mkInterest(prefix, &interest_nonce, (unsigned char *) small_buf);
|
||||
|
||||
rmsg.payload = &small_buf;
|
||||
rmsg.size = interest_len;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "msg.h"
|
||||
#include "random.h"
|
||||
|
||||
#include "ccnl.h"
|
||||
#include "ccnl-core.h"
|
||||
@ -57,7 +58,8 @@ int ccnl_riot_client_get(unsigned int relay_pid, char *name, char *reply_buf)
|
||||
puts("ccnl_riot_client_get: malloc failed");
|
||||
return 0;
|
||||
}
|
||||
int interest_len = mkInterest(prefix, NULL, interest_pkg);
|
||||
unsigned int interest_nonce = genrand_uint32();
|
||||
int interest_len = mkInterest(prefix, &interest_nonce, interest_pkg);
|
||||
DEBUGMSG(1, "relay_pid=%u interest_len=%d\n", relay_pid, interest_len);
|
||||
|
||||
riot_ccnl_msg_t rmsg;
|
||||
|
Loading…
Reference in New Issue
Block a user