ccnl: fix ageing timeout
This commit is contained in:
parent
6c0482b976
commit
8897c67677
@ -127,13 +127,13 @@ void ccnl_ll_TX(struct ccnl_relay_s *ccnl, struct ccnl_if_s *ifc,
|
||||
void ccnl_ageing(void *relay, void *aux)
|
||||
{
|
||||
ccnl_do_ageing(relay, aux);
|
||||
ccnl_set_timer(CCNL_CHECK_TIMEOUT_SEC * (1000*1000) + CCNL_CHECK_TIMEOUT_USEC, ccnl_ageing, relay, 0);
|
||||
ccnl_set_timer(TIMEOUT_TO_US(CCNL_CHECK_TIMEOUT_SEC, CCNL_CHECK_TIMEOUT_USEC), ccnl_ageing, relay, 0);
|
||||
}
|
||||
|
||||
void ccnl_retransmit(void *relay, void *aux)
|
||||
{
|
||||
ccnl_do_retransmit(relay, aux);
|
||||
ccnl_set_timer(CCNL_CHECK_RETRANSMIT_SEC * (1000*1000) + CCNL_CHECK_RETRANSMIT_USEC, ccnl_retransmit, relay, 0);
|
||||
ccnl_set_timer(TIMEOUT_TO_US(CCNL_CHECK_RETRANSMIT_SEC, CCNL_CHECK_RETRANSMIT_USEC), ccnl_retransmit, relay, 0);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@ -203,8 +203,8 @@ void ccnl_relay_config(struct ccnl_relay_s *relay, int max_cache_entries, int fi
|
||||
f->flags |= CCNL_FACE_FLAGS_STATIC;
|
||||
i->broadcast_face = f;
|
||||
|
||||
ccnl_set_timer(CCNL_CHECK_TIMEOUT_USEC, ccnl_ageing, relay, 0);
|
||||
ccnl_set_timer(CCNL_CHECK_RETRANSMIT_USEC, ccnl_retransmit, relay, 0);
|
||||
ccnl_set_timer(TIMEOUT_TO_US(CCNL_CHECK_TIMEOUT_SEC, CCNL_CHECK_TIMEOUT_USEC), ccnl_ageing, relay, 0);
|
||||
ccnl_set_timer(TIMEOUT_TO_US(CCNL_CHECK_RETRANSMIT_SEC, CCNL_CHECK_RETRANSMIT_USEC), ccnl_retransmit, relay, 0);
|
||||
}
|
||||
|
||||
#if RIOT_CCNL_POPULATE
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#define CCNL_MAX_INTERFACES 2 /* transceiver and msg interfaces */
|
||||
|
||||
#define CCNL_INTEREST_TIMEOUT_SEC 0
|
||||
#define CCNL_INTEREST_TIMEOUT_USEC (CCNL_CHECK_RETRANSMIT_USEC * (CCNL_MAX_INTEREST_RETRANSMIT + 1))
|
||||
#define CCNL_INTEREST_TIMEOUT_USEC ((CCNL_CHECK_RETRANSMIT_USEC) * ((CCNL_MAX_INTEREST_RETRANSMIT) + 1))
|
||||
|
||||
#define CCNL_CONTENT_TIMEOUT_SEC 2
|
||||
#define CCNL_CONTENT_TIMEOUT_USEC 0
|
||||
@ -44,13 +44,15 @@
|
||||
#define CCNL_CHECK_TIMEOUT_USEC 0
|
||||
|
||||
#define CCNL_CHECK_RETRANSMIT_SEC 0
|
||||
#define CCNL_CHECK_RETRANSMIT_USEC ( 100 * 1000)
|
||||
#define CCNL_CHECK_RETRANSMIT_USEC (100 * 1000)
|
||||
|
||||
#define CCNL_MAX_NAME_COMP 16
|
||||
#define CCNL_MAX_IF_QLEN 64
|
||||
|
||||
#define CCNL_MAX_NONCES 256 // for detected dups
|
||||
|
||||
#define TIMEOUT_TO_US(SEC, USEC) ((SEC)*1000*1000 + (USEC))
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// our own CCN-lite extensions for the ccnb encoding:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user