Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
70773d14
Commit
70773d14
authored
11 years ago
by
Christian Mehlis
Browse files
Options
Downloads
Plain Diff
Merge pull request #719 from mehlis/fix-timeout
ccnl: fix ageing timeout
parents
6c0482b9
8897c676
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sys/net/ccn_lite/ccn-lite-relay.c
+4
-4
4 additions, 4 deletions
sys/net/ccn_lite/ccn-lite-relay.c
sys/net/ccn_lite/ccnl.h
+4
-2
4 additions, 2 deletions
sys/net/ccn_lite/ccnl.h
with
8 additions
and
6 deletions
sys/net/ccn_lite/ccn-lite-relay.c
+
4
−
4
View file @
70773d14
...
@@ -127,13 +127,13 @@ void ccnl_ll_TX(struct ccnl_relay_s *ccnl, struct ccnl_if_s *ifc,
...
@@ -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
)
void
ccnl_ageing
(
void
*
relay
,
void
*
aux
)
{
{
ccnl_do_ageing
(
relay
,
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
)
void
ccnl_retransmit
(
void
*
relay
,
void
*
aux
)
{
{
ccnl_do_retransmit
(
relay
,
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
...
@@ -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
;
f
->
flags
|=
CCNL_FACE_FLAGS_STATIC
;
i
->
broadcast_face
=
f
;
i
->
broadcast_face
=
f
;
ccnl_set_timer
(
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
);
ccnl_set_timer
(
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
);
}
}
#if RIOT_CCNL_POPULATE
#if RIOT_CCNL_POPULATE
...
...
This diff is collapsed.
Click to expand it.
sys/net/ccn_lite/ccnl.h
+
4
−
2
View file @
70773d14
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#define CCNL_MAX_INTERFACES 2
/* transceiver and msg interfaces */
#define CCNL_MAX_INTERFACES 2
/* transceiver and msg interfaces */
#define CCNL_INTEREST_TIMEOUT_SEC 0
#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_SEC 2
#define CCNL_CONTENT_TIMEOUT_USEC 0
#define CCNL_CONTENT_TIMEOUT_USEC 0
...
@@ -44,13 +44,15 @@
...
@@ -44,13 +44,15 @@
#define CCNL_CHECK_TIMEOUT_USEC 0
#define CCNL_CHECK_TIMEOUT_USEC 0
#define CCNL_CHECK_RETRANSMIT_SEC 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_NAME_COMP 16
#define CCNL_MAX_IF_QLEN 64
#define CCNL_MAX_IF_QLEN 64
#define CCNL_MAX_NONCES 256 // for detected dups
#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:
// our own CCN-lite extensions for the ccnb encoding:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment