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
79de5ae6
Commit
79de5ae6
authored
6 years ago
by
Cenk Gündoğan
Browse files
Options
Downloads
Patches
Plain Diff
sixlowpan: minor fixes for non-ipv6 usage
parent
09461f14
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c
+11
-4
11 additions, 4 deletions
sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c
with
11 additions
and
4 deletions
sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c
+
11
−
4
View file @
79de5ae6
...
@@ -67,7 +67,7 @@ void gnrc_sixlowpan_dispatch_recv(gnrc_pktsnip_t *pkt, void *context,
...
@@ -67,7 +67,7 @@ void gnrc_sixlowpan_dispatch_recv(gnrc_pktsnip_t *pkt, void *context,
(
void
)
context
;
(
void
)
context
;
(
void
)
page
;
(
void
)
page
;
#ifdef MODULE_
CCNLITE
#if
n
def MODULE_
GNRC_IPV6
type
=
GNRC_NETTYPE_UNDEF
;
type
=
GNRC_NETTYPE_UNDEF
;
for
(
gnrc_pktsnip_t
*
ptr
=
pkt
;
(
ptr
||
(
type
==
GNRC_NETTYPE_UNDEF
));
for
(
gnrc_pktsnip_t
*
ptr
=
pkt
;
(
ptr
||
(
type
==
GNRC_NETTYPE_UNDEF
));
ptr
=
ptr
->
next
)
{
ptr
=
ptr
->
next
)
{
...
@@ -75,11 +75,10 @@ void gnrc_sixlowpan_dispatch_recv(gnrc_pktsnip_t *pkt, void *context,
...
@@ -75,11 +75,10 @@ void gnrc_sixlowpan_dispatch_recv(gnrc_pktsnip_t *pkt, void *context,
type
=
ptr
->
type
;
type
=
ptr
->
type
;
}
}
}
}
assert
(
network_snip
);
#else
/* MODULE_GNRC_IPV6 */
#else
/* MODULE_CCNLITE */
/* just assume normal IPv6 traffic */
/* just assume normal IPv6 traffic */
type
=
GNRC_NETTYPE_IPV6
;
type
=
GNRC_NETTYPE_IPV6
;
#endif
/* MODULE_
CCNLITE
*/
#endif
/* MODULE_
GNRC_IPV6
*/
if
(
!
gnrc_netapi_dispatch_receive
(
type
,
if
(
!
gnrc_netapi_dispatch_receive
(
type
,
GNRC_NETREG_DEMUX_CTX_ALL
,
pkt
))
{
GNRC_NETREG_DEMUX_CTX_ALL
,
pkt
))
{
DEBUG
(
"6lo: No receivers for this packet found
\n
"
);
DEBUG
(
"6lo: No receivers for this packet found
\n
"
);
...
@@ -200,7 +199,13 @@ static void _receive(gnrc_pktsnip_t *pkt)
...
@@ -200,7 +199,13 @@ static void _receive(gnrc_pktsnip_t *pkt)
}
}
pkt
=
gnrc_pktbuf_remove_snip
(
pkt
,
sixlowpan
);
pkt
=
gnrc_pktbuf_remove_snip
(
pkt
,
sixlowpan
);
#if defined(MODULE_CCN_LITE)
payload
->
type
=
GNRC_NETTYPE_CCN
;
#elif defined(MODULE_GNRC_IPV6)
payload
->
type
=
GNRC_NETTYPE_IPV6
;
payload
->
type
=
GNRC_NETTYPE_IPV6
;
#else
payload
->
type
=
GNRC_NETTYPE_UNDEF
;
#endif
}
}
#ifdef MODULE_GNRC_SIXLOWPAN_FRAG
#ifdef MODULE_GNRC_SIXLOWPAN_FRAG
else
if
(
sixlowpan_frag_is
((
sixlowpan_frag_t
*
)
dispatch
))
{
else
if
(
sixlowpan_frag_is
((
sixlowpan_frag_t
*
)
dispatch
))
{
...
@@ -257,11 +262,13 @@ static void _send(gnrc_pktsnip_t *pkt)
...
@@ -257,11 +262,13 @@ static void _send(gnrc_pktsnip_t *pkt)
return
;
return
;
}
}
#ifdef MODULE_GNRC_IPV6
if
((
pkt
->
next
==
NULL
)
||
(
pkt
->
next
->
type
!=
GNRC_NETTYPE_IPV6
))
{
if
((
pkt
->
next
==
NULL
)
||
(
pkt
->
next
->
type
!=
GNRC_NETTYPE_IPV6
))
{
DEBUG
(
"6lo: Sending packet has no IPv6 header
\n
"
);
DEBUG
(
"6lo: Sending packet has no IPv6 header
\n
"
);
gnrc_pktbuf_release
(
pkt
);
gnrc_pktbuf_release
(
pkt
);
return
;
return
;
}
}
#endif
tmp
=
gnrc_pktbuf_start_write
(
pkt
);
tmp
=
gnrc_pktbuf_start_write
(
pkt
);
...
...
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