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
bb3fc099
Commit
bb3fc099
authored
9 years ago
by
Martine Lenders
Browse files
Options
Downloads
Plain Diff
Merge pull request #4277 from cgundogan/pr/nhdp/fixes
nhdp: various fixes
parents
f9687cb4
7fb889fa
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/routing/nhdp/nhdp.c
+7
-5
7 additions, 5 deletions
sys/net/routing/nhdp/nhdp.c
sys/net/routing/nhdp/nhdp.h
+1
-0
1 addition, 0 deletions
sys/net/routing/nhdp/nhdp.h
with
8 additions
and
5 deletions
sys/net/routing/nhdp/nhdp.c
+
7
−
5
View file @
bb3fc099
...
@@ -18,13 +18,15 @@
...
@@ -18,13 +18,15 @@
* @}
* @}
*/
*/
#include
"conn/udp.h"
#include
"net/gnrc/conn.h"
#include
"net/conn/udp.h"
#include
"msg.h"
#include
"msg.h"
#include
"netapi.h"
#include
"
net/gnrc/
netapi.h"
#include
"net/gnrc/netif.h"
#include
"net/gnrc/netif.h"
#include
"thread.h"
#include
"thread.h"
#include
"utlist.h"
#include
"utlist.h"
#include
"mutex.h"
#include
"mutex.h"
#include
"net/ipv6/addr.h"
#include
"rfc5444/rfc5444_writer.h"
#include
"rfc5444/rfc5444_writer.h"
...
@@ -284,7 +286,6 @@ static void *_nhdp_runner(void *arg)
...
@@ -284,7 +286,6 @@ static void *_nhdp_runner(void *arg)
*/
*/
static
void
*
_nhdp_receiver
(
void
*
arg
__attribute__
((
unused
)))
static
void
*
_nhdp_receiver
(
void
*
arg
__attribute__
((
unused
)))
{
{
uint32_t
fromlen
;
char
nhdp_rcv_buf
[
NHDP_MAX_RFC5444_PACKET_SZ
];
char
nhdp_rcv_buf
[
NHDP_MAX_RFC5444_PACKET_SZ
];
msg_t
msg_q
[
NHDP_MSG_QUEUE_SIZE
];
msg_t
msg_q
[
NHDP_MSG_QUEUE_SIZE
];
...
@@ -302,9 +303,10 @@ static void *_nhdp_receiver(void *arg __attribute__((unused)))
...
@@ -302,9 +303,10 @@ static void *_nhdp_receiver(void *arg __attribute__((unused)))
while
(
1
)
{
while
(
1
)
{
ipv6_addr_t
rcv_addr
;
ipv6_addr_t
rcv_addr
;
uint16_t
rcv_port
;
uint16_t
rcv_port
;
size_t
addr_len
=
sizeof
(
rcv_addr
);
int32_t
rcv_size
=
conn_udp_recvfrom
(
&
conn
,
(
void
*
)
nhdp_rcv_buf
,
int32_t
rcv_size
=
conn_udp_recvfrom
(
&
conn
,
(
void
*
)
nhdp_rcv_buf
,
NHDP_MAX_RFC5444_PACKET_SZ
,
&
rcv_addr
,
NHDP_MAX_RFC5444_PACKET_SZ
,
&
rcv_addr
,
sizeof
(
rcv_addr
)
,
&
rcv_port
);
&
addr_len
,
&
rcv_port
);
if
(
rcv_size
>
0
)
{
if
(
rcv_size
>
0
)
{
/* Packet received, let the reader handle it */
/* Packet received, let the reader handle it */
...
@@ -314,7 +316,7 @@ static void *_nhdp_receiver(void *arg __attribute__((unused)))
...
@@ -314,7 +316,7 @@ static void *_nhdp_receiver(void *arg __attribute__((unused)))
}
}
}
}
gnrc
_udp_close
(
&
conn
);
conn
_udp_close
(
&
conn
);
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sys/net/routing/nhdp/nhdp.h
+
1
−
0
View file @
bb3fc099
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#define NHDP_H_
#define NHDP_H_
#include
"timex.h"
#include
"timex.h"
#include
"vtimer.h"
#include
"kernel_types.h"
#include
"kernel_types.h"
#include
"nhdp_metric.h"
#include
"nhdp_metric.h"
...
...
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